example-data.com
Menu
Browse docs and collections

Overview

meals / #329

Rice Cakes

userId
Bradford Doyle @bradford.doyle42
name
Rice Cakes
kind
snack
calories
551
proteinGrams
41.8
carbsGrams
33.6
fatGrams
27.7
eatenAt
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 329,
  "userId": 79,
  "name": "Rice Cakes",
  "kind": "snack",
  "calories": 551,
  "proteinGrams": 41.8,
  "carbsGrams": 33.6,
  "fatGrams": 27.7,
  "eatenAt": "2025-05-28T04:53:47.336Z",
  "createdAt": "2025-05-28T04:59:21.012Z"
}