example-data.com
Menu
Browse docs and collections

Overview

restaurants / #24

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/restaurants/24"
);
const restaurant = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/restaurants.d.ts https://example-data.com/types/restaurants.d.ts
import type { Restaurant } from "./types/restaurants";

const res = await fetch(
  "https://example-data.com/api/v1/restaurants/24"
);
const restaurant = (await res.json()) as Restaurant;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/restaurants/24"
)
restaurant = res.json()

Response

{
  "id": 24,
  "name": "Hirthe, Klein and Baumbach",
  "slug": "hirthe-klein-and-baumbach-24",
  "cuisine": "mexican",
  "priceRange": "$$",
  "rating": 4.2,
  "ratingCount": 2597,
  "countryAlpha2": "NZ",
  "city": "North Giles",
  "neighborhood": "Cornwall",
  "address": "4717 Marcia Street",
  "phone": "+1 202-555-0123 ext 1",
  "website": "https://hirthe-klein-and-baumbach-24.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": 43.767795,
  "longitude": -153.191783,
  "createdAt": "2025-12-02T02:46:06.385Z",
  "updatedAt": "2025-12-02T02:46:06.385Z"
}