example-data.com
Menu
Browse docs and collections

meals

meals

Page 9 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": 193,
      "userId": 47,
      "name": "Pancakes",
      "kind": "breakfast",
      "calories": 558,
      "proteinGrams": 13.4,
      "carbsGrams": 64.4,
      "fatGrams": 27.4,
      "eatenAt": "2025-09-30T06:44:47.325Z",
      "createdAt": "2025-09-30T06:50:58.897Z"
    },
    {
      "id": 194,
      "userId": 48,
      "name": "Chicken Stir-Fry",
      "kind": "dinner",
      "calories": 449,
      "proteinGrams": 16.7,
      "carbsGrams": 27.7,
      "fatGrams": 30.2,
      "eatenAt": "2025-07-25T00:46:22.783Z",
      "createdAt": "2025-07-25T00:59:41.296Z"
    },
    {
      "id": 195,
      "userId": 48,
      "name": "Shrimp and Veggies",
      "kind": "dinner",
      "calories": 492,
      "proteinGrams": 59.7,
      "carbsGrams": 26,
      "fatGrams": 16.6,
      "eatenAt": "2025-06-17T16:30:47.100Z",
      "createdAt": "2025-06-17T16:33:17.629Z"
    }
  ],
  "meta": {
    "page": 9,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=9&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=10&limit=24",
    "prev": "/api/v1/meals?page=8&limit=24"
  }
}