example-data.com
Menu
Browse docs and collections

meals

meals

Page 28 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": 649,
      "userId": 156,
      "name": "Brown Rice and Veggies",
      "kind": "lunch",
      "calories": 574,
      "proteinGrams": 42.4,
      "carbsGrams": 35.1,
      "fatGrams": 29.3,
      "eatenAt": "2025-08-09T13:30:46.223Z",
      "createdAt": "2025-08-09T13:38:07.839Z"
    },
    {
      "id": 650,
      "userId": 156,
      "name": "Pancakes",
      "kind": "breakfast",
      "calories": 629,
      "proteinGrams": 55.1,
      "carbsGrams": 48,
      "fatGrams": 24.1,
      "eatenAt": "2025-10-22T10:40:37.076Z",
      "createdAt": "2025-10-22T11:00:25.365Z"
    },
    {
      "id": 651,
      "userId": 157,
      "name": "Mediterranean Bowl",
      "kind": "dinner",
      "calories": 159,
      "proteinGrams": 11,
      "carbsGrams": 23.8,
      "fatGrams": 2.2,
      "eatenAt": "2025-11-06T03:23:02.737Z",
      "createdAt": "2025-11-06T03:41:52.894Z"
    }
  ],
  "meta": {
    "page": 28,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=28&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=29&limit=24",
    "prev": "/api/v1/meals?page=27&limit=24"
  }
}