example-data.com
Menu
Browse docs and collections

Overview

meals / #959

Avocado Toast

userId
Malvina Ortiz @malvina_ortiz
name
Avocado Toast
kind
breakfast
calories
423
proteinGrams
12.9
carbsGrams
61.4
fatGrams
14
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 959,
  "userId": 234,
  "name": "Avocado Toast",
  "kind": "breakfast",
  "calories": 423,
  "proteinGrams": 12.9,
  "carbsGrams": 61.4,
  "fatGrams": 14,
  "eatenAt": "2025-12-08T22:29:46.162Z",
  "createdAt": "2025-12-08T22:45:59.786Z"
}