/v1/location
A location by id or filtered search
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/rickandmorty-api/v1/location" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/rickandmorty-api/v1/location", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/rickandmorty-api/v1/location");
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/rickandmorty-api/v1/location",
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": {
"location": {
"id": 3,
"url": "https://rickandmortyapi.com/api/location/3",
"name": "Citadel of Ricks",
"type": "Space station",
"dimension": "unknown",
"resident_count": 101
}
},
"meta": {
"timestamp": "2026-06-01T00:04:35.307Z",
"request_id": "d94f2779-6009-4577-a93a-d9b9cc8ec2d6"
},
"status": "ok",
"message": "Location retrieved",
"success": true
}