example-data.com
Menu
Browse docs and collections

Overview

restaurants / #80

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 80,
  "name": "Heathcote Group",
  "slug": "heathcote-group-80",
  "cuisine": "indian",
  "priceRange": "$$",
  "rating": 4,
  "ratingCount": 2315,
  "countryAlpha2": "CN",
  "city": "New Eduardoboro",
  "neighborhood": "Fife",
  "address": "21277 Oak Street",
  "phone": "+1 202-555-0179 ext 1",
  "website": "https://heathcote-group-80.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": -16.293615,
  "longitude": -32.306067,
  "createdAt": "2025-06-12T14:42:39.746Z",
  "updatedAt": "2025-06-12T14:42:39.746Z"
}