Ayes & Noes — UK Parliament API
Free, read-only JSON API for the UK House of Commons: MPs, parties, divisions (recorded votes) and Early Day Motions. Built on official UK Parliament open…
Government & public#government
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Free, read-only JSON API for the UK House of Commons: MPs, parties, divisions (recorded votes) and Early Day Motions. Built on official UK Parliament open data (Open Parliament Licence v3.0). Free to use: keyless calls are limited to 50 requests/day per IP; a free API key (sent in the X-Api-Key header) lifts the daily limit into the thousands. Keys are free and issued to sites that show a visible dofollow link back to ayesandnoes.co.uk — request one at https://ayesandnoes.co.uk/developers. Please credit "Ayes & Noes" and link back to ayesandnoes.co.uk. Human docs: https://ayesandnoes.co.uk/developers
Endpoints 9
MPs
- GETList current MPs
/mps - GETGet one MP (with voting summary)
/mps/:id
Parties
- GETList parties with live seat counts
/parties - GETGet one party (with its current MPs)
/parties/:slug
Divisions
- GETList Commons divisions (recorded votes)
/divisions - GETGet one division (with per-party breakdown)
/divisions/:id
Early Day Motions
- GETList Early Day Motions
/edms - GETGet one Early Day Motion (with signatories)
/edms/:id
Debates
- GETList debates
/debatesChamber activity that is not a vote: one row per Hansard debate section, newest first, with how many MPs took part and the leading contributors. Divisions…
API details
- Base URL
https://ayesandnoes.co.uk/api/v1- Authentication
- An API key in the X-Api-Key header
- Operations
- 9 operations on 9 pathsGET 9
- Main resources
- Divisions 2Early Day Motions 2MPs 2Parties 2Debates 1
- Response formats
application/json- Description format
- OpenAPI 3.0.3, API version
1.0.0 - Links
- OpenAPI document · Support
- Listed from
- Ayesandnoes's published OpenAPI description
How to test the Ayes & Noes — UK Parliament API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Ayes & Noes — UK Parliament API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the X-Api-Key header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “List current MPs” (GET /mps), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Ayes & Noes — UK Parliament API?
Free, read-only JSON API for the UK House of Commons: MPs, parties, divisions (recorded votes) and Early Day Motions. Built on official UK Parliament open… It is listed under Government & public and has 9 endpoints.
Who publishes the Ayes & Noes — UK Parliament API?
It is listed from Ayes and Noes's public API description (an OpenAPI document), not published by Ayes and Noes on Swastik Codes. Anyone who controls ayesandnoes.co.uk can claim the profile by adding a DNS TXT record.
What is the base URL of the Ayes & Noes — UK Parliament API?
Requests go to https://ayesandnoes.co.uk/api/v1. Endpoint paths are added to this base URL.
How do I authenticate with the Ayes & Noes — UK Parliament API?
With an API key in the X-Api-Key header.
How many endpoints does the Ayes & Noes — UK Parliament API have?
9 operations on 9 paths (9 GET). The largest groups are Divisions, Early Day Motions, MPs, Parties.
Is forking the Ayes & Noes — UK Parliament API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.