example-data.com
Menu
Browse docs and collections

meals

meals

Page 13 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": 289,
      "userId": 71,
      "name": "Granola Bowl",
      "kind": "breakfast",
      "calories": 737,
      "proteinGrams": 51.2,
      "carbsGrams": 54.8,
      "fatGrams": 34.8,
      "eatenAt": "2026-02-23T20:34:52.890Z",
      "createdAt": "2026-02-23T20:50:53.784Z"
    },
    {
      "id": 290,
      "userId": 71,
      "name": "Lentil Soup",
      "kind": "lunch",
      "calories": 582,
      "proteinGrams": 41.7,
      "carbsGrams": 56.3,
      "fatGrams": 21.1,
      "eatenAt": "2026-02-24T08:40:45.861Z",
      "createdAt": "2026-02-24T08:53:44.298Z"
    },
    {
      "id": 291,
      "userId": 71,
      "name": "Grilled Steak",
      "kind": "dinner",
      "calories": 734,
      "proteinGrams": 34.8,
      "carbsGrams": 74.4,
      "fatGrams": 33,
      "eatenAt": "2026-02-05T06:18:03.822Z",
      "createdAt": "2026-02-05T06:41:16.029Z"
    }
  ],
  "meta": {
    "page": 13,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=13&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=14&limit=24",
    "prev": "/api/v1/meals?page=12&limit=24"
  }
}