example-data.com
Menu
Browse docs and collections

Overview

places / #114

Market Square of Germany

Market Square of Germany

shopping · Berlin · ★ 4.1 (198)

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/places/114"
);
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/114"
);
const place = (await res.json()) as Place;

Python example

import requests

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

Response

{
  "id": 114,
  "name": "Market Square of Germany",
  "slug": "market-square-of-germany-114",
  "kind": "shopping",
  "city": "Berlin",
  "countryAlpha2": "DE",
  "latitude": -41.151459,
  "longitude": -24.027263,
  "rating": 4.1,
  "ratingCount": 198,
  "description": "Absconditus solus agnosco bonus adhuc optio deleo. Vesco tunc vito trepide absque tibi congregatio. Cursim conqueror statua amplus.",
  "imageUrl": "https://picsum.photos/seed/place-114/1200/800",
  "createdAt": "2021-09-02T12:56:39.544Z"
}