example-data.com
Menu
Browse docs and collections

meals

meals

Page 11 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": 241,
      "userId": 59,
      "name": "Oatmeal with Berries",
      "kind": "breakfast",
      "calories": 360,
      "proteinGrams": 10.6,
      "carbsGrams": 60.6,
      "fatGrams": 8.4,
      "eatenAt": "2025-12-19T01:56:43.781Z",
      "createdAt": "2025-12-19T01:57:08.938Z"
    },
    {
      "id": 242,
      "userId": 59,
      "name": "Pasta with Marinara",
      "kind": "dinner",
      "calories": 529,
      "proteinGrams": 35.5,
      "carbsGrams": 53,
      "fatGrams": 19.4,
      "eatenAt": "2025-09-26T10:42:11.473Z",
      "createdAt": "2025-09-26T10:45:42.805Z"
    },
    {
      "id": 243,
      "userId": 59,
      "name": "Grilled Chicken Salad",
      "kind": "lunch",
      "calories": 468,
      "proteinGrams": 54.2,
      "carbsGrams": 43.1,
      "fatGrams": 8.7,
      "eatenAt": "2025-09-27T08:18:16.343Z",
      "createdAt": "2025-09-27T08:31:23.000Z"
    }
  ],
  "meta": {
    "page": 11,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=11&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=12&limit=24",
    "prev": "/api/v1/meals?page=10&limit=24"
  }
}