example-data.com
Menu
Browse docs and collections

meals

meals

Page 42 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": 985,
      "userId": 241,
      "name": "Pasta with Marinara",
      "kind": "dinner",
      "calories": 614,
      "proteinGrams": 44.9,
      "carbsGrams": 53.2,
      "fatGrams": 24.6,
      "eatenAt": "2025-11-30T21:48:41.241Z",
      "createdAt": "2025-11-30T21:52:06.412Z"
    },
    {
      "id": 986,
      "userId": 241,
      "name": "Smoothie Bowl",
      "kind": "breakfast",
      "calories": 423,
      "proteinGrams": 13.7,
      "carbsGrams": 67.8,
      "fatGrams": 10.8,
      "eatenAt": "2026-05-11T03:54:03.068Z",
      "createdAt": "2026-05-11T03:57:18.685Z"
    },
    {
      "id": 987,
      "userId": 241,
      "name": "Protein Shake",
      "kind": "breakfast",
      "calories": 444,
      "proteinGrams": 8.2,
      "carbsGrams": 36.7,
      "fatGrams": 29.4,
      "eatenAt": "2025-11-19T15:16:32.731Z",
      "createdAt": "2025-11-19T15:16:35.614Z"
    }
  ],
  "meta": {
    "page": 42,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=42&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=43&limit=24",
    "prev": "/api/v1/meals?page=41&limit=24"
  }
}