example-data.com
Menu
Browse docs and collections

meals

meals

Page 6 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": 121,
      "userId": 27,
      "name": "Brown Rice and Veggies",
      "kind": "lunch",
      "calories": 519,
      "proteinGrams": 21.6,
      "carbsGrams": 32.9,
      "fatGrams": 33.4,
      "eatenAt": "2025-12-30T23:05:53.830Z",
      "createdAt": "2025-12-30T23:10:00.007Z"
    },
    {
      "id": 122,
      "userId": 28,
      "name": "Cottage Cheese",
      "kind": "snack",
      "calories": 605,
      "proteinGrams": 27.4,
      "carbsGrams": 51.4,
      "fatGrams": 32.2,
      "eatenAt": "2026-03-24T15:05:00.304Z",
      "createdAt": "2026-03-24T15:14:19.387Z"
    },
    {
      "id": 123,
      "userId": 28,
      "name": "Apple and Peanut Butter",
      "kind": "snack",
      "calories": 675,
      "proteinGrams": 29.7,
      "carbsGrams": 73.6,
      "fatGrams": 29.1,
      "eatenAt": "2026-05-12T23:48:52.811Z",
      "createdAt": "2026-05-12T23:57:25.239Z"
    }
  ],
  "meta": {
    "page": 6,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=6&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=7&limit=24",
    "prev": "/api/v1/meals?page=5&limit=24"
  }
}