example-data.com
Menu
Browse docs and collections

meals

meals

Page 40 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": 937,
      "userId": 228,
      "name": "Turkey Sandwich",
      "kind": "lunch",
      "calories": 559,
      "proteinGrams": 26.5,
      "carbsGrams": 43.1,
      "fatGrams": 31.2,
      "eatenAt": "2026-02-18T11:46:04.588Z",
      "createdAt": "2026-02-18T11:47:25.936Z"
    },
    {
      "id": 938,
      "userId": 228,
      "name": "Hard Boiled Eggs",
      "kind": "snack",
      "calories": 443,
      "proteinGrams": 26,
      "carbsGrams": 72,
      "fatGrams": 5.7,
      "eatenAt": "2025-12-04T01:58:51.816Z",
      "createdAt": "2025-12-04T02:18:28.953Z"
    },
    {
      "id": 939,
      "userId": 228,
      "name": "Trail Mix",
      "kind": "snack",
      "calories": 178,
      "proteinGrams": 6,
      "carbsGrams": 23.1,
      "fatGrams": 6.8,
      "eatenAt": "2025-06-25T05:06:16.195Z",
      "createdAt": "2025-06-25T05:06:57.392Z"
    }
  ],
  "meta": {
    "page": 40,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=40&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=41&limit=24",
    "prev": "/api/v1/meals?page=39&limit=24"
  }
}