example-data.com
Menu
Browse docs and collections

meals

meals

Page 39 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": 913,
      "userId": 223,
      "name": "Oatmeal with Berries",
      "kind": "breakfast",
      "calories": 617,
      "proteinGrams": 33.7,
      "carbsGrams": 56.2,
      "fatGrams": 28.6,
      "eatenAt": "2026-03-22T03:51:41.105Z",
      "createdAt": "2026-03-22T04:16:20.380Z"
    },
    {
      "id": 914,
      "userId": 223,
      "name": "Avocado Toast",
      "kind": "breakfast",
      "calories": 361,
      "proteinGrams": 38.6,
      "carbsGrams": 34.2,
      "fatGrams": 7.8,
      "eatenAt": "2025-07-20T19:43:56.493Z",
      "createdAt": "2025-07-20T20:11:32.926Z"
    },
    {
      "id": 915,
      "userId": 223,
      "name": "Tuna Wrap",
      "kind": "lunch",
      "calories": 603,
      "proteinGrams": 53.8,
      "carbsGrams": 29.4,
      "fatGrams": 30,
      "eatenAt": "2026-04-04T06:49:21.836Z",
      "createdAt": "2026-04-04T07:17:29.861Z"
    }
  ],
  "meta": {
    "page": 39,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=39&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=40&limit=24",
    "prev": "/api/v1/meals?page=38&limit=24"
  }
}