example-data.com
Menu
Browse docs and collections

Overview

restaurants / #84

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 84,
  "name": "Price LLC",
  "slug": "price-llc-84",
  "cuisine": "italian",
  "priceRange": "$",
  "rating": 2.9,
  "ratingCount": 556,
  "countryAlpha2": "IS",
  "city": "Aspen Hill",
  "neighborhood": "Greene County",
  "address": "48860 D'Amore Dale",
  "phone": "+1 202-555-0183 ext 1",
  "website": "https://price-llc-84.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": 15.809416,
  "longitude": 82.500582,
  "createdAt": "2025-06-24T02:39:48.089Z",
  "updatedAt": "2025-06-24T02:39:48.089Z"
}