API Documentation
Explore the Civic Core Institute API for UK political transparency data.
Quick Start
Base URL: /api/v1
Authentication: Include your API key in requests:
curl -H "X-API-Key: your_key" https://civiccore.institute/api/v1/mps
Rate Limit: 60 requests per minute per API key
Python Example
import requests
API_KEY = "your_api_key"
BASE_URL = "https://civiccore.institute/api/v1"
headers = {"X-API-Key": API_KEY}
# Get all current MPs
mps = requests.get(
f"{BASE_URL}/mps",
headers=headers
).json()
# Get conflict analysis
conflicts = requests.get(
f"{BASE_URL}/analysis/conflicts",
headers=headers,
params={"minRiskScore": 0.5}
).json()JavaScript Example
const API_KEY = "your_api_key";
const BASE_URL = "https://civiccore.institute/api/v1";
const headers = { "X-API-Key": API_KEY };
// Get party donations
const donations = await fetch(
`${BASE_URL}/parties/labour/donations`,
{ headers }
).then(r => r.json());
// Get sector analysis
const finance = await fetch(
`${BASE_URL}/sectors/finance`,
{ headers }
).then(r => r.json());Loading API documentation...