example-data.com
Menu
Browse docs and collections

Overview

meals / #1004

Apple and Peanut Butter

userId
Santa Corwin @santa.corwin59
name
Apple and Peanut Butter
kind
snack
calories
479
proteinGrams
6.7
carbsGrams
35.3
fatGrams
34.6
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 1004,
  "userId": 247,
  "name": "Apple and Peanut Butter",
  "kind": "snack",
  "calories": 479,
  "proteinGrams": 6.7,
  "carbsGrams": 35.3,
  "fatGrams": 34.6,
  "eatenAt": "2026-04-27T18:49:40.033Z",
  "createdAt": "2026-04-27T18:55:30.515Z"
}