example-data.com
Menu
Browse docs and collections

meals

meals

Page 31 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": 721,
      "userId": 176,
      "name": "Almonds",
      "kind": "snack",
      "calories": 447,
      "proteinGrams": 31.9,
      "carbsGrams": 62.4,
      "fatGrams": 7.8,
      "eatenAt": "2025-06-02T22:32:07.481Z",
      "createdAt": "2025-06-02T22:55:56.557Z"
    },
    {
      "id": 722,
      "userId": 177,
      "name": "Protein Shake",
      "kind": "breakfast",
      "calories": 139,
      "proteinGrams": 5.5,
      "carbsGrams": 23.5,
      "fatGrams": 2.6,
      "eatenAt": "2026-05-17T05:16:20.419Z",
      "createdAt": "2026-05-17T05:44:53.281Z"
    },
    {
      "id": 723,
      "userId": 177,
      "name": "Protein Bar",
      "kind": "snack",
      "calories": 204,
      "proteinGrams": 30.9,
      "carbsGrams": 7.9,
      "fatGrams": 5.4,
      "eatenAt": "2026-01-31T03:07:04.709Z",
      "createdAt": "2026-01-31T03:28:24.994Z"
    }
  ],
  "meta": {
    "page": 31,
    "limit": 24,
    "total": 1016,
    "totalPages": 43
  },
  "links": {
    "self": "/api/v1/meals?page=31&limit=24",
    "first": "/api/v1/meals?page=1&limit=24",
    "last": "/api/v1/meals?page=43&limit=24",
    "next": "/api/v1/meals?page=32&limit=24",
    "prev": "/api/v1/meals?page=30&limit=24"
  }
}