example-data.com
Menu
Browse docs and collections

Overview

restaurants / #58

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 58,
  "name": "Johns - Adams",
  "slug": "johns-adams-58",
  "cuisine": "indian",
  "priceRange": "$$$",
  "rating": 2.6,
  "ratingCount": 96,
  "countryAlpha2": "GR",
  "city": "Bradleyburgh",
  "neighborhood": "North Yorkshire",
  "address": "8355 Church Lane",
  "phone": "+1 202-555-0157 ext 1",
  "website": "https://johns-adams-58.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": -19.753042,
  "longitude": -31.52039,
  "createdAt": "2025-03-21T18:14:38.406Z",
  "updatedAt": "2025-03-21T18:14:38.406Z"
}