example-data.com
Menu
Browse docs and collections

Overview

places / #142

Golden Sands of Poland

Golden Sands of Poland

beach · Warsaw · ★ 4.3 (1602)

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 142,
  "name": "Golden Sands of Poland",
  "slug": "golden-sands-of-poland-142",
  "kind": "beach",
  "city": "Warsaw",
  "countryAlpha2": "PL",
  "latitude": -14.136085,
  "longitude": -90.195362,
  "rating": 4.3,
  "ratingCount": 1602,
  "description": "Arto corpus vir amplus arma clam velociter consuasor sono toties. A aufero ancilla repellendus tabgo aperiam beneficium. Decor occaecati admiratio conduco cogito solio uberrime.",
  "imageUrl": "https://picsum.photos/seed/place-142/1200/800",
  "createdAt": "2024-05-20T06:39:52.687Z"
}