example-data.com
Menu
Browse docs and collections

meals

meals

Page 8 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": 169,
      "userId": 42,
      "name": "Tuna Wrap",
      "kind": "lunch",
      "calories": 446,
      "proteinGrams": 47.5,
      "carbsGrams": 48.8,
      "fatGrams": 6.7,
      "eatenAt": "2025-10-23T16:38:29.064Z",
      "createdAt": "2025-10-23T16:43:00.046Z"
    },
    {
      "id": 170,
      "userId": 42,
      "name": "Egg White Omelette",
      "kind": "breakfast",
      "calories": 748,
      "proteinGrams": 48.4,
      "carbsGrams": 53.5,
      "fatGrams": 37.8,
      "eatenAt": "2026-01-11T09:33:47.548Z",
      "createdAt": "2026-01-11T10:03:41.627Z"
    },
    {
      "id": 171,
      "userId": 43,
      "name": "Roasted Chicken",
      "kind": "dinner",
      "calories": 617,
      "proteinGrams": 56,
      "carbsGrams": 50.7,
      "fatGrams": 21.1,
      "eatenAt": "2026-02-05T10:33:11.969Z",
      "createdAt": "2026-02-05T10:41:55.775Z"
    }
  ],
  "meta": {
    "page": 8,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=8&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=9&limit=24",
    "prev": "/api/v1/meals?page=7&limit=24"
  }
}