example-data.com
Menu
Browse docs and collections

Overview

restaurants / #44

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 44,
  "name": "Gulgowski, Terry and Funk",
  "slug": "gulgowski-terry-and-funk-44",
  "cuisine": "mexican",
  "priceRange": "$$$$",
  "rating": 4.9,
  "ratingCount": 2495,
  "countryAlpha2": "VN",
  "city": "North Stephaniefort",
  "neighborhood": "Fayette County",
  "address": "85020 Vance Loaf",
  "phone": "+1 202-555-0143 ext 1",
  "website": "https://gulgowski-terry-and-funk-44.example.com",
  "hasDelivery": false,
  "isOpen": true,
  "latitude": 41.749255,
  "longitude": -158.279474,
  "createdAt": "2025-02-24T17:22:11.135Z",
  "updatedAt": "2025-02-24T17:22:11.135Z"
}