example-data.com
Menu
Browse docs and collections

meals

meals

Page 25 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": 577,
      "userId": 139,
      "name": "Hummus and Veggies",
      "kind": "snack",
      "calories": 328,
      "proteinGrams": 15.8,
      "carbsGrams": 40.9,
      "fatGrams": 11.2,
      "eatenAt": "2026-02-26T15:34:06.442Z",
      "createdAt": "2026-02-26T15:55:01.654Z"
    },
    {
      "id": 578,
      "userId": 139,
      "name": "Tofu Curry",
      "kind": "dinner",
      "calories": 496,
      "proteinGrams": 29.9,
      "carbsGrams": 19.8,
      "fatGrams": 33,
      "eatenAt": "2025-10-25T11:28:03.473Z",
      "createdAt": "2025-10-25T11:52:24.924Z"
    },
    {
      "id": 579,
      "userId": 139,
      "name": "Apple and Peanut Butter",
      "kind": "snack",
      "calories": 451,
      "proteinGrams": 6.2,
      "carbsGrams": 79.3,
      "fatGrams": 12.1,
      "eatenAt": "2026-02-27T21:19:51.962Z",
      "createdAt": "2026-02-27T21:26:09.990Z"
    }
  ],
  "meta": {
    "page": 25,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=25&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=26&limit=24",
    "prev": "/api/v1/meals?page=24&limit=24"
  }
}