example-data.com
Menu
Browse docs and collections

Overview

restaurants / #31

Schoen, Cole and Bauch

ethiopian · Thompsonberg · $$ · ★ 3.1 (2855)

996 School Street

Phone
+1 202-555-0130 ext 1

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 31,
  "name": "Schoen, Cole and Bauch",
  "slug": "schoen-cole-and-bauch-31",
  "cuisine": "ethiopian",
  "priceRange": "$$",
  "rating": 3.1,
  "ratingCount": 2855,
  "countryAlpha2": "NZ",
  "city": "Thompsonberg",
  "neighborhood": "Buckinghamshire",
  "address": "996 School Street",
  "phone": "+1 202-555-0130 ext 1",
  "website": null,
  "hasDelivery": true,
  "isOpen": true,
  "latitude": 23.864719,
  "longitude": 170.876077,
  "createdAt": "2024-09-02T09:17:01.123Z",
  "updatedAt": "2024-09-02T09:17:01.123Z"
}