example-data.com
Menu
Browse docs and collections

meals

meals

Page 2 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": 25,
      "userId": 6,
      "name": "Oatmeal with Berries",
      "kind": "breakfast",
      "calories": 320,
      "proteinGrams": 54.8,
      "carbsGrams": 17.2,
      "fatGrams": 3.5,
      "eatenAt": "2025-08-29T18:44:35.584Z",
      "createdAt": "2025-08-29T19:01:12.792Z"
    },
    {
      "id": 26,
      "userId": 7,
      "name": "Falafel Bowl",
      "kind": "lunch",
      "calories": 773,
      "proteinGrams": 51.8,
      "carbsGrams": 69,
      "fatGrams": 32.2,
      "eatenAt": "2025-09-13T01:50:43.853Z",
      "createdAt": "2025-09-13T01:53:42.696Z"
    },
    {
      "id": 27,
      "userId": 7,
      "name": "Almonds",
      "kind": "snack",
      "calories": 575,
      "proteinGrams": 49.3,
      "carbsGrams": 9.5,
      "fatGrams": 37.7,
      "eatenAt": "2025-10-26T08:38:14.060Z",
      "createdAt": "2025-10-26T08:53:21.375Z"
    }
  ],
  "meta": {
    "page": 2,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=2&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=3&limit=24",
    "prev": "/api/v1/meals?page=1&limit=24"
  }
}