example-data.com
Menu
Browse docs and collections

Overview

restaurants / #14

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 14,
  "name": "Vandervort, Bogisich and Hilll",
  "slug": "vandervort-bogisich-and-hilll-14",
  "cuisine": "vietnamese",
  "priceRange": "$$$$",
  "rating": 4.3,
  "ratingCount": 519,
  "countryAlpha2": "BR",
  "city": "Lake Gino",
  "neighborhood": "East Sussex",
  "address": "88713 Romaguera View",
  "phone": "+1 202-555-0113 ext 1",
  "website": "https://vandervort-bogisich-and-hilll-14.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": -13.026946,
  "longitude": -98.215779,
  "createdAt": "2025-02-17T04:26:56.979Z",
  "updatedAt": "2025-02-17T04:26:56.979Z"
}