example-data.com
Menu
Browse docs and collections

Overview

meals / #571

Protein Bar

userId
April Kihn @april.kihn55
name
Protein Bar
kind
snack
calories
387
proteinGrams
14
carbsGrams
26.2
fatGrams
25.1
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/meals/571"
);
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/571"
);
const meal = (await res.json()) as Meal;

Python example

import requests

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

Response

{
  "id": 571,
  "userId": 137,
  "name": "Protein Bar",
  "kind": "snack",
  "calories": 387,
  "proteinGrams": 14,
  "carbsGrams": 26.2,
  "fatGrams": 25.1,
  "eatenAt": "2025-11-11T09:49:16.912Z",
  "createdAt": "2025-11-11T10:02:43.249Z"
}