Skip to content

Bills API API

by parliament.uk

No authHTTPSOpen Data
Open documentation ↗

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
Spec updated
2021-07-05

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://bills-api.parliament.uk/api/v1/BillTypes" \
  -H "Accept: application/json"
JavaScript
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);
Python
import requests

response = requests.request(
    "GET",
    "https://bills-api.parliament.uk/api/v1/BillTypes",
    headers={
    "Accept": "application/json",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/api/v1/BillTypesReturns a list of Bill types.
GET/api/v1/BillsReturns a list of Bills.
GET/api/v1/Bills/{billId}Return a Bill.
GET/api/v1/Bills/{billId}/NewsArticlesReturns a list of news articles for a Bill.
GET/api/v1/Bills/{billId}/PublicationsReturn a list of Bill publications.
GET/api/v1/Bills/{billId}/StagesReturns all Bill stages.
GET/api/v1/Bills/{billId}/Stages/{billStageId}Returns a Bill stage.
GET/api/v1/Bills/{billId}/Stages/{billStageId}/AmendmentsReturns a list of amendments.
GET/api/v1/Bills/{billId}/Stages/{billStageId}/Amendments/{amendmentId}Returns an amendment.
GET/api/v1/Bills/{billId}/Stages/{stageId}/PublicationsReturn a list of Bill stage publications.
GET/api/v1/PublicationTypesReturns a list of publication types.
GET/api/v1/Publications/{publicationId}/Documents/{documentId}Return information on a document.
GET/api/v1/Publications/{publicationId}/Documents/{documentId}/DownloadReturn a document.
GET/api/v1/Rss/Bills/{id}.rssReturns an Rss feed of a certain Bill.
GET/api/v1/Rss/allbills.rssReturns an Rss feed of all Bills.
GET/api/v1/Rss/privatebills.rssReturns an Rss feed of private Bills.
GET/api/v1/Rss/publicbills.rssReturns an Rss feed of public Bills.
GET/api/v1/SittingsReturns a list of Sittings.
GET/api/v1/StagesReturns 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.

Compare alternatives →

Listed from APIs.guru (CC0).