example-data.com
Menu
Browse docs and collections

meals

meals

Page 30 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": 697,
      "userId": 169,
      "name": "Tuna Wrap",
      "kind": "lunch",
      "calories": 359,
      "proteinGrams": 41.7,
      "carbsGrams": 14.4,
      "fatGrams": 15,
      "eatenAt": "2026-02-16T09:12:10.673Z",
      "createdAt": "2026-02-16T09:27:36.323Z"
    },
    {
      "id": 698,
      "userId": 169,
      "name": "Tofu Curry",
      "kind": "dinner",
      "calories": 678,
      "proteinGrams": 42.7,
      "carbsGrams": 45.5,
      "fatGrams": 36.1,
      "eatenAt": "2026-04-06T12:32:33.399Z",
      "createdAt": "2026-04-06T12:36:29.430Z"
    },
    {
      "id": 699,
      "userId": 170,
      "name": "Mediterranean Bowl",
      "kind": "dinner",
      "calories": 707,
      "proteinGrams": 44.5,
      "carbsGrams": 59.6,
      "fatGrams": 32.3,
      "eatenAt": "2025-12-29T03:40:08.629Z",
      "createdAt": "2025-12-29T03:53:45.618Z"
    }
  ],
  "meta": {
    "page": 30,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=30&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=31&limit=24",
    "prev": "/api/v1/meals?page=29&limit=24"
  }
}