example-data.com
Menu
Browse docs and collections

Overview

places / #17

Espresso Lane of United Kingdom

Espresso Lane of United Kingdom

cafe · London · ★ 4.7 (3555)

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/places/17"
);
const place = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/places.d.ts https://example-data.com/types/places.d.ts
import type { Place } from "./types/places";

const res = await fetch(
  "https://example-data.com/api/v1/places/17"
);
const place = (await res.json()) as Place;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/places/17"
)
place = res.json()

Response

{
  "id": 17,
  "name": "Espresso Lane of United Kingdom",
  "slug": "espresso-lane-of-united-kingdom-17",
  "kind": "cafe",
  "city": "London",
  "countryAlpha2": "GB",
  "latitude": 68.683448,
  "longitude": 108.800752,
  "rating": 4.7,
  "ratingCount": 3555,
  "description": "Coerceo benevolentia deludo. Repellat subnecto calamitas abutor valens absconditus error vito. Ars debitis optio pecco derideo adficio creptio allatus eos astrum.",
  "imageUrl": "https://picsum.photos/seed/place-17/1200/800",
  "createdAt": "2023-03-28T08:51:42.306Z"
}