example-data.com
Menu
Browse docs and collections

meals

meals

Page 33 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": 769,
      "userId": 187,
      "name": "Shrimp and Veggies",
      "kind": "dinner",
      "calories": 382,
      "proteinGrams": 57.3,
      "carbsGrams": 21.6,
      "fatGrams": 7.4,
      "eatenAt": "2025-11-30T13:08:54.755Z",
      "createdAt": "2025-11-30T13:29:41.548Z"
    },
    {
      "id": 770,
      "userId": 187,
      "name": "Roasted Chicken",
      "kind": "dinner",
      "calories": 401,
      "proteinGrams": 16.7,
      "carbsGrams": 77.6,
      "fatGrams": 2.6,
      "eatenAt": "2026-04-05T04:35:40.375Z",
      "createdAt": "2026-04-05T05:00:08.975Z"
    },
    {
      "id": 771,
      "userId": 187,
      "name": "Pasta with Marinara",
      "kind": "dinner",
      "calories": 324,
      "proteinGrams": 18.2,
      "carbsGrams": 53.1,
      "fatGrams": 4.3,
      "eatenAt": "2026-05-14T21:40:07.233Z",
      "createdAt": "2026-05-14T21:48:40.236Z"
    }
  ],
  "meta": {
    "page": 33,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=33&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=34&limit=24",
    "prev": "/api/v1/meals?page=32&limit=24"
  }
}