Skip to content

UK Parliament Search Service API

by parliament.uk

No authHTTPSOpen Data
Open documentation ↗

Overview

Performs search on parliament.uk domain. Implements [OpenSearch specification](https://github.com/dewitt/opensearch). Throttled at 10 requests per second per IP address.

UK Parliament Search Service is an open data API from parliament.uk. It needs no API key. It is served over HTTPS. Its OpenAPI description documents 3 endpoints.

At a glance

Authentication
No auth
HTTPS
Yes
CORS
Unknown
Category
Open Data
Base URL
https://api.parliament.uk/search
Version
Live
Endpoints
3
Spec updated
2023-03-06

Make a first request

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

cURL
curl -X GET "https://api.parliament.uk/search/description" \
  -H "Accept: application/json"
JavaScript
const response = await fetch("https://api.parliament.uk/search/description", {
  method: "GET",
  headers: {
    "Accept": "application/json",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

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

Endpoints

MethodPathWhat it does
GET/descriptionOpenSearch description document
GET/querySearch results
GET/query.{extension}Search results

Questions

Does the UK Parliament Search Service API need an API key?

No. The UK Parliament Search Service API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.

Does the UK Parliament Search Service API support HTTPS?

Yes, the UK Parliament Search Service API is served over HTTPS.

How many endpoints does the UK Parliament Search Service API have?

Its OpenAPI description lists 3 endpoints in version Live. All of them are shown on this page.

What are alternatives to the UK Parliament Search Service API?

Other Open Data APIs include Search Services, Wayback API, Wikipedia, Nasdaq Data Link, University of Oslo.

Compare alternatives →

Listed from APIs.guru (CC0).