Search API for everything public under the parliament.uk domain.
Currently powering beta.parliament.uk/search.
This project is compliant with the OpenSearch 1.1 specification.
The search API can be configured to use different search result providers.
The search API currently supports one combination of parameters (matching parameters described in the OpenSearch 1.1 specification).
Query string parameter | Required | Validation | Default | OpenSearch parameter |
---|---|---|---|---|
q | True | string | searchTerms | |
start | False | int, min(1) | 1 | startIndex |
count | False | int, min(1), max(100) | 10 | count |
n.b. Corresponding OpenSearch URL template query string "?q={searchTerms}&start={startPage?}&count={count?}".
e.g. Example query "/search?q=who+is+my+mp&start=1&count=10".
The search API supports 4 feed serialisation formats for its response feeds through the Accept header.
Header | Value |
---|---|
Accept | "application/atom+xml" or "application/rss+xml" or "text/xml" or "application/xml" |
The /description endpoint returns a valid OpenSearch description document.
OpenSearch description documents can be used to add a search engine to your browser or file explorer.
OpenSearch parameters have corresponding search engine providers parameters.
OpenSearch parameter | Query string parameter | Required | Validation | Default |
---|---|---|---|---|
searchTerms | q | True | string | |
startIndex | start | False | int, min(0) | 0 |
count | num | False | int, min(1), max(10) | 10 |
n.b. Google CSE will be completely shut down by April 1st 2018.
OpenSearch parameter | Query string parameter | Required | Validation | Default |
---|---|---|---|---|
searchTerms | q | True | string | |
startIndex | offset | False | int, min(0) | 0 |
count | count | False | int, min(1), max(50) | 10 |
Authors/contributors to this project in alphabetical order:
- Matthieu Bosquet
- Raphael Leung
- Robert Brook
- Samu Lang
- Wojciech Starwiarski
This project is licenced under the Open Parliament Licence.