Overview
An API that allows querying of Commons Votes data.
Commons Votes API is an open data API from parliament.uk. It needs no API key. It is served over HTTPS. Its OpenAPI description documents 5 endpoints.
At a glance
- Authentication
- No auth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Open Data
- Base URL
http://commonsvotes-api.parliament.uk- Version
- v1
- Endpoints
- 5
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-03
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "http://commonsvotes-api.parliament.uk/data/division/DIVISIONID.FORMAT" \
-H "Accept: application/json"const response = await fetch("http://commonsvotes-api.parliament.uk/data/division/DIVISIONID.FORMAT", {
method: "GET",
headers: {
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"http://commonsvotes-api.parliament.uk/data/division/DIVISIONID.FORMAT",
headers={
"Accept": "application/json",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /data/division/{divisionId}.{format} | Return a Division |
| GET | /data/divisions.{format}/groupedbyparty | Return Divisions results grouped by party |
| GET | /data/divisions.{format}/membervoting | Return voting records for a Member |
| GET | /data/divisions.{format}/search | Return a list of Divisions |
| GET | /data/divisions.{format}/searchTotalResults | Return total results count |
Questions
Does the Commons Votes API API need an API key?
No. The Commons Votes API API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.
Does the Commons Votes API API support HTTPS?
Yes, the Commons Votes API API is served over HTTPS.
How many endpoints does the Commons Votes API API have?
Its OpenAPI description lists 5 endpoints in version v1. All of them are shown on this page.
What are alternatives to the Commons Votes API API?
Other Open Data APIs include Search Services, Wayback API, Wikipedia, Nasdaq Data Link, University of Oslo.
Similar open data APIs
Compare alternatives →Search Services
Open DataAPI for Internet Archive's Search-related services
Wayback API
Open DataAPI for Internet Archive's Wayback Machine
Wikipedia
Open DataMediawiki Encyclopedia
Nasdaq Data Link
Open DataThe source for financial, economic, and alternative datasets, serving investment professionals.
University of Oslo
Open DataCourses, lecture videos, detailed information for courses etc. for the University of Oslo (Norway)
Data API
Open DataServes the Clever Data API
Listed from APIs.guru (CC0).