example-data.com
Menu
Browse docs and collections

meals

meals

Page 12 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": 265,
      "userId": 64,
      "name": "Grilled Steak",
      "kind": "dinner",
      "calories": 618,
      "proteinGrams": 24.4,
      "carbsGrams": 66.3,
      "fatGrams": 28.3,
      "eatenAt": "2025-08-08T02:54:04.439Z",
      "createdAt": "2025-08-08T03:17:32.636Z"
    },
    {
      "id": 266,
      "userId": 64,
      "name": "Smoothie Bowl",
      "kind": "breakfast",
      "calories": 432,
      "proteinGrams": 30.3,
      "carbsGrams": 54.2,
      "fatGrams": 10.4,
      "eatenAt": "2026-05-19T18:43:23.576Z",
      "createdAt": "2026-05-19T19:06:49.202Z"
    },
    {
      "id": 267,
      "userId": 64,
      "name": "Grilled Turkey Breast",
      "kind": "dinner",
      "calories": 488,
      "proteinGrams": 28.2,
      "carbsGrams": 23.3,
      "fatGrams": 31.3,
      "eatenAt": "2025-12-02T04:10:22.580Z",
      "createdAt": "2025-12-02T04:22:14.091Z"
    }
  ],
  "meta": {
    "page": 12,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=12&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=13&limit=24",
    "prev": "/api/v1/meals?page=11&limit=24"
  }
}