example-data.com
Menu
Browse docs and collections

meals

meals

Page 27 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": 625,
      "userId": 151,
      "name": "Egg White Omelette",
      "kind": "breakfast",
      "calories": 553,
      "proteinGrams": 45.1,
      "carbsGrams": 46.6,
      "fatGrams": 20.7,
      "eatenAt": "2026-02-01T01:44:36.841Z",
      "createdAt": "2026-02-01T01:53:55.795Z"
    },
    {
      "id": 626,
      "userId": 151,
      "name": "Banana",
      "kind": "snack",
      "calories": 387,
      "proteinGrams": 11,
      "carbsGrams": 28.7,
      "fatGrams": 25.4,
      "eatenAt": "2026-05-19T05:12:45.072Z",
      "createdAt": "2026-05-19T05:33:56.885Z"
    },
    {
      "id": 627,
      "userId": 152,
      "name": "Granola Bowl",
      "kind": "breakfast",
      "calories": 467,
      "proteinGrams": 40,
      "carbsGrams": 56.6,
      "fatGrams": 9,
      "eatenAt": "2026-05-16T10:36:42.223Z",
      "createdAt": "2026-05-16T10:59:48.755Z"
    }
  ],
  "meta": {
    "page": 27,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=27&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=28&limit=24",
    "prev": "/api/v1/meals?page=26&limit=24"
  }
}