example-data.com
Menu
Browse docs and collections

Overview

places / #126

Forest Park of Italy

Forest Park of Italy

park · Rome · ★ 3.9 (3688)

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 126,
  "name": "Forest Park of Italy",
  "slug": "forest-park-of-italy-126",
  "kind": "park",
  "city": "Rome",
  "countryAlpha2": "IT",
  "latitude": -13.478405,
  "longitude": 61.559649,
  "rating": 3.9,
  "ratingCount": 3688,
  "description": "Via carcer tracto commemoro. Claustrum taceo canto. Administratio adstringo aegrotatio triduana suadeo voluptates voluptate cunabula.",
  "imageUrl": "https://picsum.photos/seed/place-126/1200/800",
  "createdAt": "2022-10-21T11:11:43.675Z"
}