example-data.com
Menu
Browse docs and collections

meals

meals

Page 23 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": 529,
      "userId": 127,
      "name": "Quinoa Bowl",
      "kind": "lunch",
      "calories": 344,
      "proteinGrams": 10.6,
      "carbsGrams": 64.6,
      "fatGrams": 4.8,
      "eatenAt": "2025-12-19T16:18:01.626Z",
      "createdAt": "2025-12-19T16:45:38.434Z"
    },
    {
      "id": 530,
      "userId": 128,
      "name": "Roasted Chicken",
      "kind": "dinner",
      "calories": 304,
      "proteinGrams": 8.9,
      "carbsGrams": 50,
      "fatGrams": 7.6,
      "eatenAt": "2026-03-08T17:19:14.486Z",
      "createdAt": "2026-03-08T17:43:35.293Z"
    },
    {
      "id": 531,
      "userId": 128,
      "name": "Grilled Turkey Breast",
      "kind": "dinner",
      "calories": 579,
      "proteinGrams": 33.5,
      "carbsGrams": 70.3,
      "fatGrams": 18.2,
      "eatenAt": "2025-12-26T22:32:24.805Z",
      "createdAt": "2025-12-26T23:00:10.986Z"
    }
  ],
  "meta": {
    "page": 23,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=23&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=24&limit=24",
    "prev": "/api/v1/meals?page=22&limit=24"
  }
}