example-data.com
Menu
Browse docs and collections

Overview

restaurants / #8

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 8,
  "name": "Halvorson - Olson",
  "slug": "halvorson-olson-8",
  "cuisine": "japanese",
  "priceRange": "$$$$",
  "rating": 3.7,
  "ratingCount": 919,
  "countryAlpha2": "AU",
  "city": "Lake Angeloton",
  "neighborhood": "South Glamorgan",
  "address": "5246 Gusikowski Park",
  "phone": "+1 202-555-0107 ext 1",
  "website": "https://halvorson-olson-8.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": 49.297595,
  "longitude": -7.560511,
  "createdAt": "2026-01-17T06:55:29.329Z",
  "updatedAt": "2026-01-17T06:55:29.329Z"
}