example-data.com
Menu
Browse docs and collections

Overview

meals / #747

Apple and Peanut Butter

userId
Cyril Frami @cyril_frami88
name
Apple and Peanut Butter
kind
snack
calories
484
proteinGrams
57.5
carbsGrams
6.3
fatGrams
25.4
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 747,
  "userId": 182,
  "name": "Apple and Peanut Butter",
  "kind": "snack",
  "calories": 484,
  "proteinGrams": 57.5,
  "carbsGrams": 6.3,
  "fatGrams": 25.4,
  "eatenAt": "2025-12-11T08:40:44.698Z",
  "createdAt": "2025-12-11T08:53:58.569Z"
}