example-data.com
Menu
Browse docs and collections

meals

meals

Page 19 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": 433,
      "userId": 105,
      "name": "Rice Cakes",
      "kind": "snack",
      "calories": 598,
      "proteinGrams": 32.2,
      "carbsGrams": 60.7,
      "fatGrams": 25.1,
      "eatenAt": "2025-09-03T17:26:35.689Z",
      "createdAt": "2025-09-03T17:38:28.738Z"
    },
    {
      "id": 434,
      "userId": 105,
      "name": "Hummus and Veggies",
      "kind": "snack",
      "calories": 628,
      "proteinGrams": 48.2,
      "carbsGrams": 78.3,
      "fatGrams": 13.5,
      "eatenAt": "2025-09-05T04:47:18.739Z",
      "createdAt": "2025-09-05T04:54:06.566Z"
    },
    {
      "id": 435,
      "userId": 106,
      "name": "Tuna Wrap",
      "kind": "lunch",
      "calories": 776,
      "proteinGrams": 59.4,
      "carbsGrams": 53.8,
      "fatGrams": 35.9,
      "eatenAt": "2026-05-18T13:11:20.432Z",
      "createdAt": "2026-05-18T13:31:34.123Z"
    }
  ],
  "meta": {
    "page": 19,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=19&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=20&limit=24",
    "prev": "/api/v1/meals?page=18&limit=24"
  }
}