Install ElectaMeter

    Add to your home screen for quick access to live political scores.

    Skip to content

    ElectaMeter Public API

    Free, unauthenticated access to live UK political data — opinion polls, betting odds, seat projections, regional breakdowns, and our composite ElectaMeter scores.

    Base URL
    https://electameter.co.uk/api
    Auth
    None required
    Rate Limit
    100 requests / minute

    Quick start

    curl "https://electameter.co.uk/api/parties"
    GET/api/parties

    Returns composite ElectaMeter scores for all UK parties, combining opinion polls, betting odds, and seat projections into a single 0–100 index.

    Query Parameters

    NameTypeRequiredDescription
    weightsstringNoWeighting preset: "balanced" (default), "pollHeavy", "marketHeavy", "seatFocused", or "custom"
    pollsnumberNoCustom poll weight. Combined with betting and seats, then renormalised to 1.0.
    bettingnumberNoCustom betting-market weight.
    seatsnumberNoCustom seat-projection weight.
    housestringNoSet to "1" to subtract documented pollster house-effect offsets.

    Example Request

    curl "https://electameter.co.uk/api/parties"

    Example Response

    JSON
    {
      "parties": [
        {
          "id": "reform",
          "name": "Reform UK",
          "shortName": "REF",
          "color": "#00C4B4",
          "score": 82.4,
          "pollAvg": 26.3,
          "bettingProb": 48.2,
          "seatProjection": 308,
          "change": 1.2
        }
        // ... 6 more parties
      ],
      "weights": { "polls": 0.6, "betting": 0.3, "seats": 0.1 },
      "lastUpdated": "2026-03-04T11:22:19.000Z"
    }
    GET/api/polls

    Returns the 20 most recent opinion polls with per-party vote share percentages, pollster name, date, and sample size.

    Example Request

    curl "https://electameter.co.uk/api/polls"

    Example Response

    JSON
    {
      "polls": [
        {
          "pollster": "YouGov",
          "date": "2026-03-02",
          "reform": 27,
          "labour": 22,
          "conservative": 21,
          "libdem": 14,
          "green": 8,
          "snp": 3,
          "sample": 2041
        }
        // ...
      ],
      "lastUpdated": "2026-03-04T11:22:19.000Z"
    }
    GET/api/polls/history

    Returns the full historical poll dataset for building trend charts. Contains all scraped polls going back to 2024.

    Example Request

    curl "https://electameter.co.uk/api/polls/history"

    Example Response

    JSON
    {
      "polls": [
        {
          "pollster": "Opinium",
          "date": "2024-07-15",
          "reform": 14,
          "labour": 40,
          "conservative": 24,
          "libdem": 10,
          "green": 6,
          "snp": 3,
          "sample": 1500
        }
        // ... hundreds of polls
      ],
      "lastUpdated": "2026-03-04T11:22:19.000Z"
    }
    GET/api/betting

    Returns current betting market data aggregated from multiple bookmakers and prediction markets, with implied probabilities per party.

    Example Request

    curl "https://electameter.co.uk/api/betting"

    Example Response

    JSON
    {
      "odds": [
        {
          "market": "Smarkets Majority",
          "reform": 5.5,
          "labour": 8.2,
          "conservative": 17.99,
          "libdem": 75.19,
          "green": 0
        }
        // ... more markets
      ],
      "lastUpdated": "2026-03-04T11:22:19.000Z"
    }
    GET/api/historical

    Returns historical composite ElectaMeter scores over time, one data point per month per party. Useful for building trend and comparison charts.

    Query Parameters

    NameTypeRequiredDescription
    monthsnumberNoLimit results to the last N months (e.g. 6 for half a year)

    Example Request

    curl "https://electameter.co.uk/api/historical"

    Example Response

    JSON
    {
      "data": [
        {
          "date": "2026-03-01",
          "reform": 82.4,
          "labour": 48.1,
          "conservative": 43.7,
          "libdem": 28.3,
          "green": 19.5,
          "snp": 12.1,
          "plaid": 5.8
        }
        // ... one entry per month
      ],
      "lastUpdated": "2026-03-04T11:22:19.000Z"
    }
    GET/api/regions

    Returns modelled party vote shares for England, Scotland, Wales, London, North England, the Midlands and South England. Nation-only parties (SNP, Plaid) are taken from Scotland/Wales polls where available. Northern Ireland is not modelled.

    Example Request

    curl "https://electameter.co.uk/api/regions"

    Example Response

    JSON
    {
      "regions": {
        "london": {
          "reform": 68,
          "labour": 55,
          "conservative": 38,
          "libdem": 32,
          "green": 24
        }
        // ... more regions
      },
      "lastUpdated": "2026-03-04T11:22:19.000Z"
    }
    GET/api/briefing

    Returns an auto-generated This Week briefing from live scores, movers, the newest poll and seat projections.

    Example Request

    curl "https://electameter.co.uk/api/briefing"

    Example Response

    JSON
    {
      "headline": "Labour leads the ElectaMeter at 69",
      "paragraphs": ["..."],
      "bullets": [{ "label": "Index leader", "detail": "Labour 69" }],
      "disclaimer": "Auto-generated from ElectaMeter data."
    }
    GET/api/leaders

    Preferred PM / leadership rating snapshots scraped from public polling tables.

    Example Request

    curl "https://electameter.co.uk/api/leaders"

    Example Response

    JSON
    {
      "ratings": [
        { "pollster": "YouGov", "date": "2026-08-17", "subject": "Nigel Farage", "rating": 28, "sample": 2441 }
      ]
    }
    GET/api/byelections

    Recent UK Westminster by-elections since the 2024 general election.

    Example Request

    curl "https://electameter.co.uk/api/byelections"

    Example Response

    JSON
    {
      "byelections": [
        { "constituency": "Runcorn and Helsby", "date": "2025-05-01", "winner": "Reform UK", "previousWinner": "Labour", "swing": 17.4 }
      ]
    }
    GET/api/constituencies

    Named 2024 GB constituencies with modelled colours allocated to match Electoral Calculus national totals and ElectaMeter regional weights. Not a per-seat forecast. Northern Ireland omitted.

    Example Request

    curl "https://electameter.co.uk/api/constituencies"

    Example Response

    JSON
    {
      "seats": [{ "id": "E14001063", "name": "Aldershot", "region": "south", "winner": "conservative" }],
      "note": "Names are real; colours are an allocation, not a forecast."
    }
    GET/api/house-effects

    Documented pollster house-effect offsets used when house=1 is set on /api/parties.

    Example Request

    curl "https://electameter.co.uk/api/house-effects"

    Example Response

    JSON
    {
      "adjustments": [{ "pollster": "YouGov", "party": "reform", "offset": -1.0 }]
    }
    GET/api/og-image

    PNG share card. Optional query party=labour or type=briefing.

    Example Request

    curl "https://electameter.co.uk/api/og-image"

    Example Response

    JSON
    (binary PNG)
    GET/api/meta

    Returns API health status and timestamps showing when each data source was last scraped.

    Example Request

    curl "https://electameter.co.uk/api/meta"

    Example Response

    JSON
    {
      "status": "ok",
      "live": true,
      "scrapers": {
        "polls": { "lastStatus": "success", "lastSuccess": "2026-09-03 11:22:19" }
      },
      "issues": []
    }
    GET/feed.xml

    RSS 2.0 feed of the current auto-generated briefing.

    Example Request

    curl "https://electameter.co.uk/feed.xml"

    Example Response

    JSON
    (application/rss+xml)

    Notes

    Data freshness

    Polls are scraped every 4 hours, betting odds every 2 hours, seat projections twice daily, and regional data once daily. The /api/meta endpoint shows when each source was last updated.

    Rate limiting

    The API allows 100 requests per minute per IP address. If you exceed this, you'll receive a 429 response. Rate limit headers (RateLimit-Remaining, RateLimit-Reset) are included in every response.

    Attribution

    This data is free to use. If you build something with it, please credit ElectaMeter with a link back to electameter.co.uk.

    CORS

    All API endpoints support cross-origin requests from any domain, so you can call them directly from client-side JavaScript.

    Data sources

    Polls are sourced from Wikipedia's aggregation of YouGov, Opinium, Savanta, Deltapoll, Survation, Techne, and Find Out Now. Betting data comes from Smarkets, Manifold Markets, and UK bookmakers (via BettingLounge). Seat projections are from Electoral Calculus.

    We use cookies for analytics to understand how you use ElectaMeter. Privacy Policy