example-data.com
Menu
Browse docs and collections

Overview

meals / #166

Avocado Toast

userId
Gwendolyn Wyman @gwendolyn.wyman87
name
Avocado Toast
kind
breakfast
calories
638
proteinGrams
37.4
carbsGrams
60.5
fatGrams
27.4
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 166,
  "userId": 40,
  "name": "Avocado Toast",
  "kind": "breakfast",
  "calories": 638,
  "proteinGrams": 37.4,
  "carbsGrams": 60.5,
  "fatGrams": 27.4,
  "eatenAt": "2025-06-09T08:41:53.918Z",
  "createdAt": "2025-06-09T09:06:55.260Z"
}