theagentkit
← All projects

UK Parliament Constituency Data

All 650 UK parliamentary constituencies, collected from Parliament's public API.

data-collectionpythonpublic-api

Use Case

A structured, queryable dataset of every UK parliamentary constituency — current MP, party, region, and 2024 general election result — for anything that needs to look this up programmatically instead of clicking through members.parliament.uk by hand: dashboards, chatbots, analysis notebooks, or an AI agent answering questions like "who's the MP for Aldershot?".

The source site (members.parliament.uk) is a JS frontend behind Cloudflare bot protection, so it can't be treated as a data source directly. This project instead goes to the public API that powers it and restructures the response into one clean, self-contained JSON record per constituency.