UK Political API — Constituency Intelligence
Public affairs consultancies, charities running constituency campaigns, and political researchers currently piece together data from the Parliament Members API, the Petitions service, Hansard, and the Electoral Commission — all separate services with different formats. The Political Intelligence endpoint unifies the key democratic data for any UK postcode into a single call: who represents the constituency, what petitions are active, how engaged is the local electorate, and what is the political context.
What You Get
- •Current MP: name, party, constituency, gender, and date elected
- •Political Engagement Index (0-100): non-partisan measure of civic activity
- •Active petitions: top parliamentary petitions with national signature counts
- •Local petition engagement: constituency-level signature counts for top petitions
- •Constituency context: constituency name, local authority, and region
Data Sources
UK Parliament Members API
The official register of Members of Parliament and Lords. Provides biographical data, party affiliation, constituency, election date, and contact information. Updated in real time as MPs are elected or stand down.
UK Parliament Petitions
Active and historical government and parliamentary petitions. Includes total signature counts and constituency-level breakdowns showing how many signatures came from each parliamentary constituency.
Scoring Algorithm
Political Engagement Index
Non-partisan measure of civic activity. Weighted composite: MP representation stability (25%), national petition activity (30%), local petition engagement (25%), democratic infrastructure (20%). Measures civic engagement levels, not political leanings.
Use Cases
Public Affairs & Lobbying
Consultancies targeting constituency campaigns need to know who the MP is, their party, and how engaged the local electorate is with parliamentary petitions. One call replaces manual lookups across Parliament's website.
Charity Campaign Targeting
Charities running campaigns need to identify constituencies where petition engagement is highest. The local signature data reveals which areas are most responsive to parliamentary action.
Political Research
Academics and think tanks studying political engagement patterns can batch-query postcodes to map the Political Engagement Index across the country, identifying hotspots of civic activity.
Journalism & Media
Journalists covering political stories need constituency context quickly: who's the MP, what party, how long have they served, what are locals petitioning about. This endpoint provides the background in one call.
Example
Request
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://www.ukdatapi.com/api/v1/political/SW1A%201AA?depth=standard"
Response
{
"data": {
"location": { "postcode": "SW1A 1AA", "constituency": "Cities of London and Westminster", "local_authority": "Westminster", "region": "London" },
"engagement_score": {
"score": 72,
"rating": "ENGAGED",
"signals": [
{ "factor": "mp_representation", "contribution": 21, "weight": 0.25, "detail": "Current MP serving for 1 year(s)" },
{ "factor": "petition_activity", "contribution": 21, "weight": 0.30, "detail": "50 active parliamentary petitions nationally" }
]
},
"mp": { "name": "Rachel Blake", "party": "Labour (Co-op)", "constituency": "Cities of London and Westminster", "member_since": "2024-07-04" },
"petitions": {
"active_count": 50,
"top_petitions": [
{ "action": "Call a General Election", "signature_count": 3084715, "local_signatures": 1250 }
]
}
}
}Pricing
| Depth | Credits |
|---|---|
| Summary | 3 |
| Standard | 8 |
| Full | 16 |
Related Endpoints
GET /api/v1/location/{postcode}
UK Location Intelligence API
Profile any UK postcode: crime rates, flood risk, food hygiene, demographics, earnings, health indicators. 7 government sources in one call.
GET /api/v1/legal/{query}
UK Legal API
UK legislation API: search Acts of Parliament, Statutory Instruments, and pending bills. legislation.gov.uk and Parliament data in one call.
GET /api/v1/demographics/{postcode}
UK Demographics API
Demographics API: Census 2021 population, housing tenure, economic activity, IMD deprivation indices (32,844 LSOAs), and proprietary Consumer Spending Power Index (0-100). From £0.008/call.