example-data.com
Menu
Browse docs and collections

meals

meals

Page 26 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": 601,
      "userId": 143,
      "name": "Tofu Curry",
      "kind": "dinner",
      "calories": 384,
      "proteinGrams": 18.4,
      "carbsGrams": 35.7,
      "fatGrams": 18.6,
      "eatenAt": "2026-01-19T02:28:48.126Z",
      "createdAt": "2026-01-19T02:45:24.384Z"
    },
    {
      "id": 602,
      "userId": 144,
      "name": "Protein Shake",
      "kind": "breakfast",
      "calories": 513,
      "proteinGrams": 55.3,
      "carbsGrams": 5.3,
      "fatGrams": 30.1,
      "eatenAt": "2026-01-27T08:04:33.346Z",
      "createdAt": "2026-01-27T08:14:36.443Z"
    },
    {
      "id": 603,
      "userId": 144,
      "name": "Hard Boiled Eggs",
      "kind": "snack",
      "calories": 484,
      "proteinGrams": 50.2,
      "carbsGrams": 16.5,
      "fatGrams": 24.1,
      "eatenAt": "2025-07-19T04:42:11.931Z",
      "createdAt": "2025-07-19T05:04:39.512Z"
    }
  ],
  "meta": {
    "page": 26,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=26&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=27&limit=24",
    "prev": "/api/v1/meals?page=25&limit=24"
  }
}