example-data.com
Menu
Browse docs and collections

Overview

restaurants / #22

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 22,
  "name": "Mitchell, O'Kon and Kunde",
  "slug": "mitchell-o-kon-and-kunde-22",
  "cuisine": "ethiopian",
  "priceRange": "$$",
  "rating": 3.2,
  "ratingCount": 1254,
  "countryAlpha2": "ID",
  "city": "South Janelle",
  "neighborhood": "Grampian",
  "address": "1794 DuBuque Ranch",
  "phone": "+1 202-555-0121 ext 1",
  "website": "https://mitchell-o-kon-and-kunde-22.example.com",
  "hasDelivery": true,
  "isOpen": true,
  "latitude": -42.79146,
  "longitude": -118.05781,
  "createdAt": "2025-12-24T13:51:42.599Z",
  "updatedAt": "2025-12-24T13:51:42.599Z"
}