example-data.com
Menu
Browse docs and collections

Overview

restaurants / #20

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 20,
  "name": "Hickle, Glover and Christiansen",
  "slug": "hickle-glover-and-christiansen-20",
  "cuisine": "mexican",
  "priceRange": "$",
  "rating": 3.7,
  "ratingCount": 2393,
  "countryAlpha2": "AR",
  "city": "Zulauffurt",
  "neighborhood": "Nottinghamshire",
  "address": "854 Harrison Street",
  "phone": "+1 202-555-0119 ext 1",
  "website": "https://hickle-glover-and-christiansen-20.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": -25.566834,
  "longitude": -77.729119,
  "createdAt": "2026-01-31T20:19:54.372Z",
  "updatedAt": "2026-01-31T20:19:54.372Z"
}