example-data.com
Menu
Browse docs and collections

Overview

restaurants / #45

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 45,
  "name": "Simonis - Kshlerin",
  "slug": "simonis-kshlerin-45",
  "cuisine": "thai",
  "priceRange": "$",
  "rating": 2.8,
  "ratingCount": 488,
  "countryAlpha2": "PH",
  "city": "Stanleybury",
  "neighborhood": "Washington County",
  "address": "7540 Dagmar Fall",
  "phone": "+1 202-555-0144 ext 1",
  "website": "https://simonis-kshlerin-45.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": -35.548984,
  "longitude": -3.686326,
  "createdAt": "2025-06-09T13:02:33.410Z",
  "updatedAt": "2025-06-09T13:02:33.410Z"
}