example-data.com
Menu
Browse docs and collections

Overview

restaurants / #12

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/restaurants/12"
);
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/12"
);
const restaurant = (await res.json()) as Restaurant;

Python example

import requests

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

Response

{
  "id": 12,
  "name": "Heller Group",
  "slug": "heller-group-12",
  "cuisine": "mexican",
  "priceRange": "$$$",
  "rating": 4.9,
  "ratingCount": 1908,
  "countryAlpha2": "KE",
  "city": "North Jarret",
  "neighborhood": "Adams County",
  "address": "77620 Pedro Dale",
  "phone": "+1 202-555-0111 ext 1",
  "website": "https://heller-group-12.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": 50.083491,
  "longitude": 24.618331,
  "createdAt": "2025-08-23T19:01:39.954Z",
  "updatedAt": "2025-08-23T19:01:39.954Z"
}