example-data.com
Menu
Browse docs and collections

meals

meals

Page 3 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": 49,
      "userId": 12,
      "name": "Brown Rice and Veggies",
      "kind": "lunch",
      "calories": 326,
      "proteinGrams": 40.6,
      "carbsGrams": 9.5,
      "fatGrams": 13.9,
      "eatenAt": "2025-12-10T15:57:12.468Z",
      "createdAt": "2025-12-10T16:03:56.285Z"
    },
    {
      "id": 50,
      "userId": 12,
      "name": "Rice Cakes",
      "kind": "snack",
      "calories": 394,
      "proteinGrams": 12.4,
      "carbsGrams": 55.9,
      "fatGrams": 13.4,
      "eatenAt": "2026-03-22T11:08:44.664Z",
      "createdAt": "2026-03-22T11:19:30.787Z"
    },
    {
      "id": 51,
      "userId": 12,
      "name": "Beef Tacos",
      "kind": "dinner",
      "calories": 680,
      "proteinGrams": 53,
      "carbsGrams": 45.9,
      "fatGrams": 31.6,
      "eatenAt": "2026-02-03T11:05:32.164Z",
      "createdAt": "2026-02-03T11:18:32.043Z"
    }
  ],
  "meta": {
    "page": 3,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=3&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=4&limit=24",
    "prev": "/api/v1/meals?page=2&limit=24"
  }
}