UK Parliament Members API
Free UK Parliament Members API with no key: MPs and Lords, constituencies, party affiliation, contact details and voting records. Tested curl example.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the UK Parliament Members API?
The UK Parliament Members API is a free, key-free API providing data on current and historical MPs and members of the House of Lords, including constituency, party, contact details and voting records.
The UK Parliament publishes a genuinely modern REST API covering both Houses. You can search members by name, constituency, party or House, and retrieve their full biography, committee memberships and voting history.
It is one of the better parliamentary APIs internationally — well documented, with a Swagger definition, consistent pagination and no key requirement. Constituency data makes it straightforward to map a postcode to a sitting MP when combined with a postcode lookup API.
Quick facts
- Base URL
https://members-api.parliament.uk/api- Authentication
- No API key required.
- Rate limit
- No published limit; fair use expected.
- Pricing
- Free under the Open Parliament Licence, with attribution required.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the UK Parliament Members API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Search for members of Parliament
GET https://members-api.parliament.uk/api/Members/Search?skip=0&take=1
curl 'https://members-api.parliament.uk/api/Members/Search?skip=0&take=1'const res = await fetch("https://members-api.parliament.uk/api/Members/Search?skip=0&take=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://members-api.parliament.uk/api/Members/Search?skip=0&take=1", timeout=20)
res.raise_for_status()
print(res.json()){
"items": [
{
"value": {
"id": 172,
"nameListAs": "Abbott, Ms Diane",
"nameDisplayAs": "Ms Diane Abbott",
"nameFullTitle": "Rt Hon Diane Abbott MP",
"nameAddressAs": "Ms Abbott",
"latestParty": {
"id": 15,
"name": "Labour",
"abbreviation": "Lab",
"backgroundColour": "d50000",
"foregroundColour": "ffffff",
"isLordsMainParty": true,
"isLordsSpiritualParty": true,
"governmentType": 0,
"isIndependentParty": false
},
"gender": "F",
"latestHouseMembership": {
"membershipFrom": "Hackney North and Stoke Newington",
"membershipFromId": 4074,
"house": 1,
"membershipStartDate": "1987-06-11T00:00:00",
"membershipEndDate": null,
"membershipEndReason": null,
"membershipEndReasonNotes": null,
"membershipEndReasonId": null,
"membershipStatus": {
"statusIsActive": true,
"statusDescription": "Current Member",
"statusNotes": null,
"statusId": 0,
"status": 0,
"statusStartDate": "2024-07-04T00:00:00"
}
},
"thumbnailUrl": "https://members-api.parliament.uk/api/Members/172/Thumbnail"
},
"links": [
{
"rel": "self",
"href": "/Members/172",
"method": "GET"
},
{
"rel": "overview",
"href": "/Members/172",
"method": "GET"
},
{Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
skip | integer | Optional | Pagination offset. 0 |
take | integer | Optional | Number of results, maximum 20. 20 |
Name | string | Optional | Search by member name. Abbott |
House | integer | Optional | 1 for Commons, 2 for Lords. 1 |
IsCurrentMember | boolean | Optional | Restrict to sitting members. true |
Response fields
items[].value.idinteger- Member identifier used across other endpoints.
items[].value.nameDisplayAsstring- Name formatted for display.
items[].value.nameFullTitlestring- Full title including honorifics.
items[].value.latestPartyobject- Current party with name and colour.
items[].value.latestHouseMembershipobject- Constituency, House and membership dates.
totalResultsinteger- Total members matching the search.
What you can build with the UK Parliament Members API
- Build a 'find your MP' feature from a postcode lookup
- Track voting records on specific divisions
- Display party composition of the Commons or Lords
- Support civic tech and accountability journalism
Common errors and how to fix them
400
`take` exceeds the maximum of 20.
Fix: Page through with `skip` rather than requesting a larger page.
Empty items array
No members matched the filters.
Fix: Name matching is partial but case-sensitive in places; try a surname alone.
UK Parliament Members API — frequently asked questions
Is the UK Parliament API free?
Yes, no API key is required. Data is published under the Open Parliament Licence, which requires attribution.
Can I find an MP from a postcode?
Not directly — this API works by constituency, not postcode. Combine it with a postcode lookup API such as Postcodes.io, which returns the constituency for a postcode.
Does it include the House of Lords?
Yes. Set the House parameter to 2 for Lords or 1 for Commons; omit it to search both.
Are voting records available?
Yes, through the related divisions endpoints, which return how each member voted on specific parliamentary divisions.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
CSV to JSON Converter
Convert CSV to a JSON array of objects online. Header-row detection, comma/semicolon/tab delimiters and pretty-printed output — 100% in your browser.
Alternatives to UK Parliament Members API
If UK Parliament Members does not fit, these government & open data apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| Federal Register | Free US Federal Register API with no key: executive orders, rules, notices and proposed regulations with full text search back to 1994. Tested curl example. | No key | Yes | 19 Aug 2026 |
| USAspending | Free US federal spending API with no key: agency budgets, contracts, grants and award data covering trillions in government spending. Tested curl example. | No key | No | 19 Aug 2026 |
| UK Police Data | Free UK Police API with no key: street-level crime data, police forces, neighbourhood teams and stop-and-search records by location and month. Tested example. | No key | Yes | 19 Aug 2026 |
| FBI Wanted | Free FBI Wanted API with no key: most wanted fugitives, missing persons and case data with photos, descriptions and reward details. Tested curl example. | No key | No | 19 Aug 2026 |
| UK Parliament Petitions | Free UK Parliament petitions API with no key: every open petition with signature counts, constituency and country breakdowns, plus government responses and debates. Tested example. | No key | Yes | 21 Aug 2026 |
| data.gov.ua | Free Ukrainian open data API with no key: 36,000+ datasets with a legal basis recorded on every record and file hashes on every resource. Tested example and live response. | No key | No | 21 Aug 2026 |
UK Parliament Members is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.