example-data.com
Menu
Browse docs and collections

meals

meals

Page 20 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": 457,
      "userId": 110,
      "name": "Trail Mix",
      "kind": "snack",
      "calories": 532,
      "proteinGrams": 45.5,
      "carbsGrams": 55.7,
      "fatGrams": 14.1,
      "eatenAt": "2025-05-27T08:47:54.463Z",
      "createdAt": "2025-05-27T09:10:23.220Z"
    },
    {
      "id": 458,
      "userId": 110,
      "name": "Cottage Cheese",
      "kind": "snack",
      "calories": 336,
      "proteinGrams": 33.5,
      "carbsGrams": 10.2,
      "fatGrams": 17.9,
      "eatenAt": "2025-10-23T08:55:17.766Z",
      "createdAt": "2025-10-23T09:09:51.798Z"
    },
    {
      "id": 459,
      "userId": 111,
      "name": "Grilled Turkey Breast",
      "kind": "dinner",
      "calories": 557,
      "proteinGrams": 21,
      "carbsGrams": 56.8,
      "fatGrams": 27.3,
      "eatenAt": "2025-08-14T14:05:33.629Z",
      "createdAt": "2025-08-14T14:25:12.176Z"
    }
  ],
  "meta": {
    "page": 20,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=20&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=21&limit=24",
    "prev": "/api/v1/meals?page=19&limit=24"
  }
}