example-data.com
Menu
Browse docs and collections

Overview

meals / #857

Turkey Sandwich

userId
Sonia Nolan @sonia_nolan
name
Turkey Sandwich
kind
lunch
calories
536
proteinGrams
40.9
carbsGrams
41.6
fatGrams
22.9
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 857,
  "userId": 208,
  "name": "Turkey Sandwich",
  "kind": "lunch",
  "calories": 536,
  "proteinGrams": 40.9,
  "carbsGrams": 41.6,
  "fatGrams": 22.9,
  "eatenAt": "2026-03-01T16:11:13.233Z",
  "createdAt": "2026-03-01T16:15:59.720Z"
}