example-data.com
Menu
Browse docs and collections

Overview

restaurants / #55

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 55,
  "name": "Koelpin - Lueilwitz",
  "slug": "koelpin-lueilwitz-55",
  "cuisine": "chinese",
  "priceRange": "$$$",
  "rating": 2.7,
  "ratingCount": 1522,
  "countryAlpha2": "PK",
  "city": "Salem",
  "neighborhood": "Surrey",
  "address": "88477 Felicity Glens",
  "phone": "+1 202-555-0154 ext 1",
  "website": "https://koelpin-lueilwitz-55.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": 44.257564,
  "longitude": -178.691771,
  "createdAt": "2025-07-15T19:48:20.584Z",
  "updatedAt": "2025-07-15T19:48:20.584Z"
}