example-data.com
Menu
Browse docs and collections

Overview

meals / #342

Overnight Oats

userId
Stephan Heller @stephan.heller
name
Overnight Oats
kind
breakfast
calories
632
proteinGrams
41.9
carbsGrams
38.3
fatGrams
34.6
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 342,
  "userId": 82,
  "name": "Overnight Oats",
  "kind": "breakfast",
  "calories": 632,
  "proteinGrams": 41.9,
  "carbsGrams": 38.3,
  "fatGrams": 34.6,
  "eatenAt": "2025-07-26T09:24:46.920Z",
  "createdAt": "2025-07-26T09:29:43.755Z"
}