example-data.com
Menu
Browse docs and collections

Overview

restaurants / #81

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 81,
  "name": "Adams - Schimmel",
  "slug": "adams-schimmel-81",
  "cuisine": "japanese",
  "priceRange": "$$$",
  "rating": 2.7,
  "ratingCount": 2170,
  "countryAlpha2": "PL",
  "city": "Murrayburgh",
  "neighborhood": "Fife",
  "address": "59523 Jast Pine",
  "phone": "+1 202-555-0180 ext 1",
  "website": "https://adams-schimmel-81.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": 7.332477,
  "longitude": 103.57904,
  "createdAt": "2025-05-18T17:00:55.192Z",
  "updatedAt": "2025-05-18T17:00:55.192Z"
}