example-data.com
Menu
Browse docs and collections

Overview

meals / #509

Avocado Toast

userId
Nikko Kuhlman @nikko_kuhlman
name
Avocado Toast
kind
breakfast
calories
429
proteinGrams
11.7
carbsGrams
50.8
fatGrams
19.9
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 509,
  "userId": 122,
  "name": "Avocado Toast",
  "kind": "breakfast",
  "calories": 429,
  "proteinGrams": 11.7,
  "carbsGrams": 50.8,
  "fatGrams": 19.9,
  "eatenAt": "2025-12-30T15:12:25.271Z",
  "createdAt": "2025-12-30T15:41:02.839Z"
}