example-data.com
Menu
Browse docs and collections

meals

meals

Page 14 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": 313,
      "userId": 75,
      "name": "Quinoa Bowl",
      "kind": "lunch",
      "calories": 662,
      "proteinGrams": 58.9,
      "carbsGrams": 21.4,
      "fatGrams": 37.9,
      "eatenAt": "2025-06-26T01:16:22.543Z",
      "createdAt": "2025-06-26T01:31:16.694Z"
    },
    {
      "id": 314,
      "userId": 76,
      "name": "Lentil Soup",
      "kind": "lunch",
      "calories": 531,
      "proteinGrams": 29.9,
      "carbsGrams": 71.9,
      "fatGrams": 13.7,
      "eatenAt": "2025-12-03T06:18:16.199Z",
      "createdAt": "2025-12-03T06:33:08.000Z"
    },
    {
      "id": 315,
      "userId": 76,
      "name": "Pasta with Marinara",
      "kind": "dinner",
      "calories": 362,
      "proteinGrams": 39.6,
      "carbsGrams": 11.8,
      "fatGrams": 17.4,
      "eatenAt": "2025-05-31T00:18:57.691Z",
      "createdAt": "2025-05-31T00:43:10.316Z"
    }
  ],
  "meta": {
    "page": 14,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=14&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=15&limit=24",
    "prev": "/api/v1/meals?page=13&limit=24"
  }
}