Ir al contenido
GET /v1/search

Search & filter sites

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/heritage-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

curl "https://api.oanor.com/heritage-api/v1/search" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/heritage-api/v1/search", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/heritage-api/v1/search");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/heritage-api/v1/search",
    headers={"x-oanor-key": "oanor_test_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "data": {
        "count": 12,
        "limit": 20,
        "query": "castle",
        "total": 12,
        "offset": 0,
        "filters": {
            "country": null,
            "year_to": null,
            "category": null,
            "year_from": null
        },
        "results": [
            {
                "name": "Castles and Town Walls of King Edward in Gwynedd",
                "whc_id": 374,
                "country": "United Kingdom",
                "category": "cultural",
                "criteria": [
                    "i",
                    "iii",
                    "iv"
                ],
                "latitude": 53.139722,
                "longitude": -4.276944,
                "year_inscribed": 1986
            },
            {
                "name": "Forts and Castles, Volta, Greater Accra, Central and Western Regions",
                "whc_id": 34,
                "country": "Ghana",
                "category": "cultural",
                "criteria": [
                    "vi"
                ],
                "latitude": 5.103694,
                "longitude": -1.241,
                "year_inscribed": 1979
            },
            {
                "name": "Durham Castle and Cathedral",
                "whc_id": 370,
                "country": "United Kingdom",
                "category": "cultural",
                "criteria": [
                    "ii",
                    "iv",
                    "vi"
                ],
                "latitude": 54.774722,
                "longitude": -1.576111,
                "year_inscribed": 1986
            },
            {
                "name": "Budapest, including the Banks of the Danube, the Buda Castle Quarter and Andrássy Avenue",
                "whc_id": 400,
                "country": "Hungary",
                "category": "cultural",
                "criteria": [
                    "ii",
                    "iv"
                ],
                "latitude": 47.48242,
                "longitude": 19.07067,
                "year_inscribed": 1987
            },
            {
                "name": "Collegiate Church, Castle, and Old Town of Quedlinburg",
                "whc_id": 535,
                "country": "Germany",
                "category": "cultural",
                "criteria": [
                    "iv"
                ],
                "latitude": 51.78333,
                "longitude": 11.15,
                "year_inscribed": 1994
            },
            {
                "name": "Levoča, Spiš Castle and the associated cultural monuments",
                "whc_id": 620,
                "country": "Slovakia",
                "category": "cultural",
                "criteria": [
                    "iv"
                ],
                "latitude": 48.999444,
                "longitude": 20.7675,
                "year_inscribed": 1993
            },
            {
                "name": "Mir Castle Complex",
                "whc_id
…