example-data.com
Menu
Browse docs and collections

meals

meals

Page 41 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": 961,
      "userId": 234,
      "name": "Egg White Omelette",
      "kind": "breakfast",
      "calories": 427,
      "proteinGrams": 19.7,
      "carbsGrams": 44.3,
      "fatGrams": 19,
      "eatenAt": "2025-08-09T00:21:27.736Z",
      "createdAt": "2025-08-09T00:25:52.573Z"
    },
    {
      "id": 962,
      "userId": 235,
      "name": "Banana",
      "kind": "snack",
      "calories": 417,
      "proteinGrams": 27.4,
      "carbsGrams": 72.4,
      "fatGrams": 2,
      "eatenAt": "2025-07-13T07:49:11.635Z",
      "createdAt": "2025-07-13T07:59:39.527Z"
    },
    {
      "id": 963,
      "userId": 235,
      "name": "Quinoa Bowl",
      "kind": "lunch",
      "calories": 422,
      "proteinGrams": 15.5,
      "carbsGrams": 35.3,
      "fatGrams": 24.3,
      "eatenAt": "2025-10-09T06:21:42.158Z",
      "createdAt": "2025-10-09T06:45:34.304Z"
    }
  ],
  "meta": {
    "page": 41,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=41&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=42&limit=24",
    "prev": "/api/v1/meals?page=40&limit=24"
  }
}