example-data.com
Menu
Browse docs and collections

meals

meals

Page 15 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": 337,
      "userId": 81,
      "name": "Shrimp and Veggies",
      "kind": "dinner",
      "calories": 446,
      "proteinGrams": 11.5,
      "carbsGrams": 57.4,
      "fatGrams": 18.9,
      "eatenAt": "2026-04-04T00:03:27.469Z",
      "createdAt": "2026-04-04T00:30:48.139Z"
    },
    {
      "id": 338,
      "userId": 81,
      "name": "Chicken Stir-Fry",
      "kind": "dinner",
      "calories": 430,
      "proteinGrams": 6.7,
      "carbsGrams": 47.2,
      "fatGrams": 23.8,
      "eatenAt": "2026-01-31T17:30:57.535Z",
      "createdAt": "2026-01-31T17:40:15.937Z"
    },
    {
      "id": 339,
      "userId": 81,
      "name": "Rice Cakes",
      "kind": "snack",
      "calories": 460,
      "proteinGrams": 49.3,
      "carbsGrams": 12.1,
      "fatGrams": 23.8,
      "eatenAt": "2026-04-10T14:49:29.361Z",
      "createdAt": "2026-04-10T15:09:14.821Z"
    }
  ],
  "meta": {
    "page": 15,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=15&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=16&limit=24",
    "prev": "/api/v1/meals?page=14&limit=24"
  }
}