example-data.com
Menu
Browse docs and collections

meals

meals

Page 16 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": 361,
      "userId": 85,
      "name": "Greek Yogurt Parfait",
      "kind": "breakfast",
      "calories": 482,
      "proteinGrams": 56.2,
      "carbsGrams": 20.5,
      "fatGrams": 19.5,
      "eatenAt": "2026-04-07T21:45:16.039Z",
      "createdAt": "2026-04-07T21:54:46.673Z"
    },
    {
      "id": 362,
      "userId": 86,
      "name": "Avocado Toast",
      "kind": "breakfast",
      "calories": 492,
      "proteinGrams": 38.5,
      "carbsGrams": 16.2,
      "fatGrams": 30.3,
      "eatenAt": "2025-09-29T23:43:03.204Z",
      "createdAt": "2025-09-29T23:44:09.764Z"
    },
    {
      "id": 363,
      "userId": 86,
      "name": "Apple and Peanut Butter",
      "kind": "snack",
      "calories": 208,
      "proteinGrams": 21.2,
      "carbsGrams": 5.7,
      "fatGrams": 11.2,
      "eatenAt": "2025-10-07T00:49:26.845Z",
      "createdAt": "2025-10-07T00:54:11.287Z"
    }
  ],
  "meta": {
    "page": 16,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=16&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=17&limit=24",
    "prev": "/api/v1/meals?page=15&limit=24"
  }
}