Overview
API to get and search for information regarding Bills, their stages, associated amendments and publications.
Bills API is an open data API from parliament.uk. It needs no API key. It is served over HTTPS. Its OpenAPI description documents 19 endpoints.
At a glance
- Authentication
- No auth
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Open Data
- Base URL
https://bills-api.parliament.uk- Version
- v1
- Endpoints
- 19
- OpenAPI
- Specification ↗
- Spec updated
- 2021-07-05
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://bills-api.parliament.uk/api/v1/BillTypes" \
-H "Accept: application/json"const response = await fetch("https://bills-api.parliament.uk/api/v1/BillTypes", {
method: "GET",
headers: {
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://bills-api.parliament.uk/api/v1/BillTypes",
headers={
"Accept": "application/json",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /api/v1/BillTypes | Returns a list of Bill types. |
| GET | /api/v1/Bills | Returns a list of Bills. |
| GET | /api/v1/Bills/{billId} | Return a Bill. |
| GET | /api/v1/Bills/{billId}/NewsArticles | Returns a list of news articles for a Bill. |
| GET | /api/v1/Bills/{billId}/Publications | Return a list of Bill publications. |
| GET | /api/v1/Bills/{billId}/Stages | Returns all Bill stages. |
| GET | /api/v1/Bills/{billId}/Stages/{billStageId} | Returns a Bill stage. |
| GET | /api/v1/Bills/{billId}/Stages/{billStageId}/Amendments | Returns a list of amendments. |
| GET | /api/v1/Bills/{billId}/Stages/{billStageId}/Amendments/{amendmentId} | Returns an amendment. |
| GET | /api/v1/Bills/{billId}/Stages/{stageId}/Publications | Return a list of Bill stage publications. |
| GET | /api/v1/PublicationTypes | Returns a list of publication types. |
| GET | /api/v1/Publications/{publicationId}/Documents/{documentId} | Return information on a document. |
| GET | /api/v1/Publications/{publicationId}/Documents/{documentId}/Download | Return a document. |
| GET | /api/v1/Rss/Bills/{id}.rss | Returns an Rss feed of a certain Bill. |
| GET | /api/v1/Rss/allbills.rss | Returns an Rss feed of all Bills. |
| GET | /api/v1/Rss/privatebills.rss | Returns an Rss feed of private Bills. |
| GET | /api/v1/Rss/publicbills.rss | Returns an Rss feed of public Bills. |
| GET | /api/v1/Sittings | Returns a list of Sittings. |
| GET | /api/v1/Stages | Returns a list of Bill stages. |
Questions
Does the Bills API API need an API key?
No. The Bills API API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.
Does the Bills API API support HTTPS?
Yes, the Bills API API is served over HTTPS.
How many endpoints does the Bills API API have?
Its OpenAPI description lists 19 endpoints in version v1. All of them are shown on this page.
What are alternatives to the Bills 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).