example-data.com
Menu
Browse docs and collections

Overview

restaurants / #76

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 76,
  "name": "Grimes, Durgan and Grady",
  "slug": "grimes-durgan-and-grady-76",
  "cuisine": "korean",
  "priceRange": "$$$",
  "rating": 4,
  "ratingCount": 2013,
  "countryAlpha2": "PT",
  "city": "Fort Estelfield",
  "neighborhood": "Tayside",
  "address": "325 Schoen Canyon",
  "phone": "+1 202-555-0175 ext 1",
  "website": "https://grimes-durgan-and-grady-76.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": 20.681921,
  "longitude": -127.120249,
  "createdAt": "2024-12-17T06:40:43.912Z",
  "updatedAt": "2024-12-17T06:40:43.912Z"
}