example-data.com
Menu
Browse docs and collections

Overview

restaurants / #94

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 94,
  "name": "Morissette, Pagac and Schamberger",
  "slug": "morissette-pagac-and-schamberger-94",
  "cuisine": "mexican",
  "priceRange": "$$",
  "rating": 4.7,
  "ratingCount": 1117,
  "countryAlpha2": "SE",
  "city": "Fort Anjaliville",
  "neighborhood": "Dyfed",
  "address": "7615 Nicolas Gateway",
  "phone": "+1 202-555-0193 ext 1",
  "website": "https://morissette-pagac-and-schamberger-94.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": 18.108643,
  "longitude": -174.264134,
  "createdAt": "2025-02-09T16:43:23.559Z",
  "updatedAt": "2025-02-09T16:43:23.559Z"
}