Government — entry 022 of 90
Data.parliament.uk
The Dataset Explorer's underlying Linked Data API, hosted at `lda.data.parliament.uk`, is still live: a keyless GET against `bills.json` returned real, paginated bill records (2,000+ results) with a wildcard `Access-Control-Allow-Origin` header, and `endpoints.json` lists dozens of other datasets (committees, attendance, members) served the same way. It's a legacy platform, though — Parliament now also runs newer per-domain REST APIs (`members-api.parliament.uk`, `bills-api.parliament.uk`) that cover the same ground with a modern interface and are worth checking first for new integrations.
The UK Parliament's legacy Linked Data API (lda.data.parliament.uk) is still fully live: a keyless GET this run against /bills.json?_pageSize=1 returned a genuine 200, 1,663 B JSON document with a wildcard access-control-allow-origin: * header, confirming the stored cors: yes. It exposes dozens of Parliamentary datasets (bills, committees, attendance, petitions) via /endpoints.json (200, 9,947 B this run), each following the same paged Linked-Data-API envelope. As the entry's own summary already notes, this is a legacy platform — Parliament now also runs newer per-domain REST APIs (members-api.parliament.uk, bills-api.parliament.uk) that cover the same ground with a modern shape and are worth checking first for new integrations.
GreatAPIs Score
Auth quickstart
- No API key, signup, or credit card required — a live GET this run against
/bills.json?_pageSize=1returned a full result set on the first anonymous try. Category-scoped datasets like/commonsdivisions.json?_pageSize=1(200, 1,212 B this run) work the same way with no extra auth.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
List bills, one result page
GEThttps://lda.data.parliament.uk/bills.json?_pageSize=1
{
"format": "linked-data-api",
"version": "0.2",
"result": {
"_about": "http://eldaddp.azurewebsites.net/bills.json?_pageSize=1",
"definition": "http://eldaddp.azurewebsites.net/meta/bills.json",
"first": "http://eldaddp.azurewebsites.net/bills.json?_page=0",
"items": [
{
"_about": "http://data.parliament.uk/resources/754405",
"billType": "Ballot",
"date": { "_value": "2018-12-21", "_datatype": "dateTime" },
"homePage": "http://services.parliament.uk/bills/2017-19/prisonsinterferencewithwirelesstelegraphy.html",
"identifier": { "_value": "2060" },
"label": { "_value": "Prisons (Interference with Wireless Telegraphy)" },
"session": [
{ "_about": "http://data.parliament.uk/resources/730830", "displayName": "2017-2019" }
],
"sponsors": [
{ "_about": "http://data.parliament.uk/resources/754405/sponsors/1", "sponsorPrinted": ["Baroness Pidding"] },
{ "_about": "http://data.parliament.uk/resources/754405/sponsors/2", "sponsorPrinted": ["Maria Caulfield"] }
],
"title": "Prisons (Interference with Wireless Telegraphy) Bill"
}
],
"itemsPerPage": 1,
"next": "http://eldaddp.azurewebsites.net/bills.json?_page=1",
"page": 0,
"startIndex": 1,
"totalResults": 2122,
"type": "http://purl.org/linked-data/api/vocab#Page"
}
}The full live response above is 1,663 B; totalResults reports 2,122 bills as of this run. Every URL inside the envelope (_about, definition, first, next) resolves through the internal eldaddp.azurewebsites.net host rather than the public one you called — see the first gotcha below.
Try it
Developer reference
https://lda.data.parliament.uk- GET/bills.json
- GET/endpoints.json
- GET/commonsdivisions.json
Gotchas & limits
- Every pagination/definition URL inside the response echoes a different, internal host over plain HTTP —
http://eldaddp.azurewebsites.net/...— never the publichttps://lda.data.parliament.ukyou actually called. Confirmed live above:_about,definition,first, andnextin the/bills.jsonresponse are allhttp://eldaddp.azurewebsites.net/...links. Code that follows the returnednextlink literally leaves the public HTTPS host and drops to a different, unencrypted internal one. - A dataset path that doesn't exist returns a real HTML error page, not JSON — a live GET against
/nosuchdataset.jsonthis run returned 404, 1,112 B,content-type: text/html, whose inline stylesheet is literallybody { background-color: pink }. Code that unconditionally callsJSON.parseon the response body will throw on this error path even though every success path is JSON. _pageSizeis honored in full, unlike the Gazette's silent 100-item cap — a live sweep this run at 100/500/1000/2000 against/bills.jsonreturned exactly that many items each time (69,955 B / 345,162 B / 673,378 B / 1,310,772 B), and only flattens out at 2,122 items (the dataset's real total) once the requested size exceeds it.itemsPerPagein the envelope keeps echoing the requested number (confirmed at_pageSize=10000) even onceitemsitself stops growing past 2,122 — don't treat that field as a live count of what came back._pageis 0-indexed while the envelope's ownstartIndexis 1-indexed — confirmed live:_page=0(the default) returnsstartIndex: 1, and_page=1returnsstartIndex: 2, i.e. the second bill, not the start of a second batch. Code that treats_pageandstartIndexas the same counter will be off by one.- The same path answers in three formats by extension alone, live-confirmed this run:
/bills.xml?_pageSize=1returns 200,application/xml, and/bills.rdf?_pageSize=1returns 200,application/rdf+xml— noAcceptheader or query param needed, just swap.jsonfor.xmlor.rdf.