Vai al contenuto
GET /v1/members

Search MPs & Lords

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/ukparliament-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "count": 1,
        "house": null,
        "query": "Sunak",
        "total": 1,
        "results": [
            {
                "id": 4483,
                "name": "Rishi Sunak",
                "house": "Commons",
                "party": "Conservative",
                "gender": "M",
                "thumbnail": "https://members-api.parliament.uk/api/Members/4483/Thumbnail",
                "full_title": "Rt Hon Rishi Sunak MP",
                "is_current": true,
                "member_since": "2015-05-07T00:00:00",
                "membership_from": "Richmond and Northallerton"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-05-31T10:30:27.940Z",
        "request_id": "034a023f-9755-4d17-b7ab-8c5c7d2dbf10"
    },
    "status": "ok",
    "message": "Members searched",
    "success": true
}