example-data.com
Menu
Browse docs and collections

Overview

meals / #362

Avocado Toast

userId
Mable West @mable_west
name
Avocado Toast
kind
breakfast
calories
492
proteinGrams
38.5
carbsGrams
16.2
fatGrams
30.3
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 362,
  "userId": 86,
  "name": "Avocado Toast",
  "kind": "breakfast",
  "calories": 492,
  "proteinGrams": 38.5,
  "carbsGrams": 16.2,
  "fatGrams": 30.3,
  "eatenAt": "2025-09-29T23:43:03.204Z",
  "createdAt": "2025-09-29T23:44:09.764Z"
}