example-data.com
Menu
Browse docs and collections

meals

meals

Page 34 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": 793,
      "userId": 192,
      "name": "Egg White Omelette",
      "kind": "breakfast",
      "calories": 629,
      "proteinGrams": 28.5,
      "carbsGrams": 55,
      "fatGrams": 32.8,
      "eatenAt": "2025-06-25T13:35:57.762Z",
      "createdAt": "2025-06-25T14:05:50.031Z"
    },
    {
      "id": 794,
      "userId": 192,
      "name": "Brown Rice and Veggies",
      "kind": "lunch",
      "calories": 369,
      "proteinGrams": 37.7,
      "carbsGrams": 8.8,
      "fatGrams": 20.3,
      "eatenAt": "2026-03-14T22:56:11.561Z",
      "createdAt": "2026-03-14T23:01:38.477Z"
    },
    {
      "id": 795,
      "userId": 192,
      "name": "Protein Shake",
      "kind": "breakfast",
      "calories": 667,
      "proteinGrams": 40.4,
      "carbsGrams": 74.9,
      "fatGrams": 22.9,
      "eatenAt": "2025-11-10T18:04:22.978Z",
      "createdAt": "2025-11-10T18:07:27.187Z"
    }
  ],
  "meta": {
    "page": 34,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=34&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=35&limit=24",
    "prev": "/api/v1/meals?page=33&limit=24"
  }
}