example-data.com
Menu
Browse docs and collections

meals

meals

Page 43 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": 1009,
      "userId": 248,
      "name": "Protein Bar",
      "kind": "snack",
      "calories": 585,
      "proteinGrams": 40.1,
      "carbsGrams": 36.3,
      "fatGrams": 31,
      "eatenAt": "2026-04-28T00:10:08.682Z",
      "createdAt": "2026-04-28T00:29:10.854Z"
    },
    {
      "id": 1010,
      "userId": 248,
      "name": "Oatmeal with Berries",
      "kind": "breakfast",
      "calories": 712,
      "proteinGrams": 25.2,
      "carbsGrams": 71.6,
      "fatGrams": 36.1,
      "eatenAt": "2026-04-27T16:37:58.225Z",
      "createdAt": "2026-04-27T16:57:07.188Z"
    },
    {
      "id": 1011,
      "userId": 248,
      "name": "Veggie Burger",
      "kind": "lunch",
      "calories": 500,
      "proteinGrams": 25.8,
      "carbsGrams": 35.4,
      "fatGrams": 28.3,
      "eatenAt": "2026-03-30T18:00:20.973Z",
      "createdAt": "2026-03-30T18:18:12.715Z"
    }
  ],
  "meta": {
    "page": 43,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=43&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": null,
    "prev": "/api/v1/meals?page=42&limit=24"
  }
}