example-data.com
Menu
Browse docs and collections

meals

meals

Page 4 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": 73,
      "userId": 17,
      "name": "Grilled Chicken Salad",
      "kind": "lunch",
      "calories": 704,
      "proteinGrams": 53.6,
      "carbsGrams": 38.1,
      "fatGrams": 37.5,
      "eatenAt": "2026-01-10T02:20:50.595Z",
      "createdAt": "2026-01-10T02:48:21.672Z"
    },
    {
      "id": 74,
      "userId": 17,
      "name": "Granola Bowl",
      "kind": "breakfast",
      "calories": 729,
      "proteinGrams": 38.9,
      "carbsGrams": 69.5,
      "fatGrams": 32.8,
      "eatenAt": "2026-02-07T15:48:13.143Z",
      "createdAt": "2026-02-07T16:03:40.938Z"
    },
    {
      "id": 75,
      "userId": 17,
      "name": "Oatmeal with Berries",
      "kind": "breakfast",
      "calories": 598,
      "proteinGrams": 47.3,
      "carbsGrams": 57.9,
      "fatGrams": 19.7,
      "eatenAt": "2026-05-20T03:24:52.521Z",
      "createdAt": "2026-05-20T03:25:32.814Z"
    }
  ],
  "meta": {
    "page": 4,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=4&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=5&limit=24",
    "prev": "/api/v1/meals?page=3&limit=24"
  }
}