example-data.com
Menu
Browse docs and collections

meals

meals

Page 38 of 43.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/meals?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/meals?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/meals.d.ts https://example-data.com/types/meals.d.ts
import type { Meal, ListEnvelope } from "./types/meals";

const res = await fetch(
  "https://example-data.com/api/v1/meals?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Meal>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/meals",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 889,
      "userId": 216,
      "name": "Avocado Toast",
      "kind": "breakfast",
      "calories": 473,
      "proteinGrams": 10,
      "carbsGrams": 25.3,
      "fatGrams": 36.9,
      "eatenAt": "2025-12-02T20:11:31.099Z",
      "createdAt": "2025-12-02T20:39:49.581Z"
    },
    {
      "id": 890,
      "userId": 216,
      "name": "Tuna Wrap",
      "kind": "lunch",
      "calories": 583,
      "proteinGrams": 29.9,
      "carbsGrams": 39.3,
      "fatGrams": 34,
      "eatenAt": "2025-06-27T05:18:43.658Z",
      "createdAt": "2025-06-27T05:46:55.944Z"
    },
    {
      "id": 891,
      "userId": 217,
      "name": "Falafel Bowl",
      "kind": "lunch",
      "calories": 624,
      "proteinGrams": 35.6,
      "carbsGrams": 48.1,
      "fatGrams": 32.1,
      "eatenAt": "2026-02-09T02:29:25.582Z",
      "createdAt": "2026-02-09T02:36:57.438Z"
    }
  ],
  "meta": {
    "page": 38,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=38&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=39&limit=24",
    "prev": "/api/v1/meals?page=37&limit=24"
  }
}