example-data.com
Menu
Browse docs and collections

Overview

meals / #423

Protein Bar

userId
Lazaro Rath @lazaro.rath42
name
Protein Bar
kind
snack
calories
422
proteinGrams
38.6
carbsGrams
13
fatGrams
23.9
eatenAt
createdAt

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/meals/423" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/meals/423"
);
const meal = 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 } from "./types/meals";

const res = await fetch(
  "https://example-data.com/api/v1/meals/423"
);
const meal = (await res.json()) as Meal;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/meals/423"
)
meal = res.json()

Response

{
  "id": 423,
  "userId": 102,
  "name": "Protein Bar",
  "kind": "snack",
  "calories": 422,
  "proteinGrams": 38.6,
  "carbsGrams": 13,
  "fatGrams": 23.9,
  "eatenAt": "2025-12-29T14:47:18.949Z",
  "createdAt": "2025-12-29T15:13:17.514Z"
}