example-data.com
Menu
Browse docs and collections

meals

meals

Page 5 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": 97,
      "userId": 22,
      "name": "Egg White Omelette",
      "kind": "breakfast",
      "calories": 532,
      "proteinGrams": 52.7,
      "carbsGrams": 20.6,
      "fatGrams": 26.5,
      "eatenAt": "2026-03-04T04:43:13.047Z",
      "createdAt": "2026-03-04T04:58:04.843Z"
    },
    {
      "id": 98,
      "userId": 23,
      "name": "Pancakes",
      "kind": "breakfast",
      "calories": 463,
      "proteinGrams": 12.9,
      "carbsGrams": 23.3,
      "fatGrams": 35.4,
      "eatenAt": "2025-11-26T23:56:37.400Z",
      "createdAt": "2025-11-27T00:25:50.363Z"
    },
    {
      "id": 99,
      "userId": 23,
      "name": "Cottage Cheese",
      "kind": "snack",
      "calories": 430,
      "proteinGrams": 34.7,
      "carbsGrams": 35,
      "fatGrams": 16.8,
      "eatenAt": "2025-07-31T05:19:52.664Z",
      "createdAt": "2025-07-31T05:35:15.416Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=5&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=6&limit=24",
    "prev": "/api/v1/meals?page=4&limit=24"
  }
}