example-data.com
Menu
Browse docs and collections

Overview

restaurants / #91

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 91,
  "name": "O'Keefe - Cruickshank",
  "slug": "o-keefe-cruickshank-91",
  "cuisine": "korean",
  "priceRange": "$$$",
  "rating": 4.8,
  "ratingCount": 2912,
  "countryAlpha2": "NL",
  "city": "Covina",
  "neighborhood": "Oxfordshire",
  "address": "8634 N 7th Street",
  "phone": "+1 202-555-0190 ext 1",
  "website": "https://o-keefe-cruickshank-91.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": -40.242941,
  "longitude": 176.532578,
  "createdAt": "2025-01-11T10:50:47.440Z",
  "updatedAt": "2025-01-11T10:50:47.440Z"
}