example-data.com
Menu
Browse docs and collections

Overview

restaurants / #92

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 92,
  "name": "Klocko, Gusikowski and Lockman",
  "slug": "klocko-gusikowski-and-lockman-92",
  "cuisine": "ethiopian",
  "priceRange": "$",
  "rating": 2.9,
  "ratingCount": 2349,
  "countryAlpha2": "CO",
  "city": "Lake Vern",
  "neighborhood": "Douglas County",
  "address": "2058 Conroy Bypass",
  "phone": "+1 202-555-0191 ext 1",
  "website": "https://klocko-gusikowski-and-lockman-92.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": -20.799,
  "longitude": 62.552389,
  "createdAt": "2025-01-31T03:03:37.295Z",
  "updatedAt": "2025-01-31T03:03:37.295Z"
}