example-data.com
Menu
Browse docs and collections

Overview

meals / #1007

String Cheese

userId
Ken Towne @ken.towne
name
String Cheese
kind
snack
calories
294
proteinGrams
39.7
carbsGrams
19.8
fatGrams
6.2
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 1007,
  "userId": 248,
  "name": "String Cheese",
  "kind": "snack",
  "calories": 294,
  "proteinGrams": 39.7,
  "carbsGrams": 19.8,
  "fatGrams": 6.2,
  "eatenAt": "2026-03-15T12:32:55.018Z",
  "createdAt": "2026-03-15T12:53:38.520Z"
}