example-data.com
Menu
Browse docs and collections

Overview

restaurants / #87

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 87,
  "name": "Spinka, Runolfsdottir and Brown",
  "slug": "spinka-runolfsdottir-and-brown-87",
  "cuisine": "indian",
  "priceRange": "$$$",
  "rating": 3.1,
  "ratingCount": 1818,
  "countryAlpha2": "GR",
  "city": "Costa Mesa",
  "neighborhood": "Lincolnshire",
  "address": "570 Saul Mountains",
  "phone": "+1 202-555-0186 ext 1",
  "website": "https://spinka-runolfsdottir-and-brown-87.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": -17.134796,
  "longitude": 155.044492,
  "createdAt": "2025-08-21T00:54:40.885Z",
  "updatedAt": "2025-08-21T00:54:40.885Z"
}