Aller au contenu
GET /v1/meta

Totals & top countries

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/castles-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/castles-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/castles-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/castles-api/v1/meta");
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/castles-api/v1/meta",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "Castles worldwide with country, coordinates and year built. Search by name, country and build-year range; /v1/nearby finds castles near a coordinate by great-circle distance.",
        "total": 17727,
        "fields": [
            "name",
            "country",
            "latitude",
            "longitude",
            "built_year"
        ],
        "source": "Wikidata (castles)",
        "countries": 102,
        "with_year": 2921,
        "top_countries": [
            {
                "count": 3557,
                "country": "Germany"
            },
            {
                "count": 2815,
                "country": "Italy"
            },
            {
                "count": 2640,
                "country": "France"
            },
            {
                "count": 2329,
                "country": "Spain"
            },
            {
                "count": 1801,
                "country": "United Kingdom"
            },
            {
                "count": 497,
                "country": "Turkey"
            },
            {
                "count": 423,
                "country": "Poland"
            },
            {
                "count": 421,
                "country": "Iran"
            },
            {
                "count": 375,
                "country": "Ireland"
            },
            {
                "count": 372,
                "country": "Switzerland"
            },
            {
                "count": 349,
                "country": "Czech Republic"
            },
            {
                "count": 289,
                "country": "Austria"
            }
        ],
        "with_coordinates": 16411
    },
    "meta": {
        "timestamp": "2026-05-31T09:27:19.635Z",
        "request_id": "7b91c407-af3d-4e87-a738-1505aff54e4f"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}