Mantic Elections API

The elections API from Mantic — 1 operation(s) for elections.

Operations 1

GET /webapp/elections/races/{slug} Get Race #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mantic:mantic-elections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mantic-elections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Fast Elections API
  version: 0.1.0
tags:
- name: elections
paths:
  /webapp/elections/races/{slug}:
    get:
      tags:
      - elections
      summary: Get Race
      description: One active race with the questions the caller may read; 404 for an unknown slug.
      operationId: get_race_webapp_elections_races__slug__get
      security:
      - OAuth2AuthorizationCodeBearer: []
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
          title: Slug
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRaceResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    RaceOutcomeResponse:
      properties:
        category_id:
          type: integer
          title: Category Id
        title:
          type: string
          title: Title
        probability:
          type: number
          title: Probability
        kind:
          anyOf:
          - type: string
          - type: 'null'
          title: Kind
        party_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Party Key
        party_keys:
          items:
            type: string
          type: array
          title: Party Keys
      type: object
      required:
      - category_id
      - title
      - probability
      - kind
      - party_key
      - party_keys
      title: RaceOutcomeResponse
    RaceForecastResponse:
      properties:
        execution_id:
          type: integer
          title: Execution Id
        completed_at:
          type: string
          format: date-time
          title: Completed At
        kind:
          type: string
          title: Kind
        outcomes:
          items:
            $ref: '#/components/schemas/RaceOutcomeResponse'
          type: array
          title: Outcomes
          default: []
        central_value:
          anyOf:
          - type: number
          - type: 'null'
          title: Central Value
        unit:
          anyOf:
          - type: string
          - type: 'null'
          title: Unit
        probability:
          anyOf:
          - type: number
          - type: 'null'
          title: Probability
        interval_50:
          anyOf:
          - $ref: '#/components/schemas/ForecastIntervalResponse'
          - type: 'null'
        interval_80:
          anyOf:
          - $ref: '#/components/schemas/ForecastIntervalResponse'
          - type: 'null'
        median_date:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Median Date
      type: object
      required:
      - execution_id
      - completed_at
      - kind
      title: RaceForecastResponse
    RacePartyResponse:
      properties:
        party_key:
          type: string
          title: Party Key
        name:
          type: string
          title: Name
        short_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Short Name
        native_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Native Name
        colour_slot:
          type: string
          title: Colour Slot
        kind:
          type: string
          title: Kind
        bloc_of:
          anyOf:
          - type: string
          - type: 'null'
          title: Bloc Of
        is_incumbent:
          type: boolean
          title: Is Incumbent
      type: object
      required:
      - party_key
      - name
      - short_name
      - native_name
      - colour_slot
      - kind
      - bloc_of
      - is_incumbent
      title: RacePartyResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ForecastIntervalResponse:
      properties:
        lower:
          anyOf:
          - type: number
          - type: 'null'
          title: Lower
        upper:
          anyOf:
          - type: number
          - type: 'null'
          title: Upper
      type: object
      required:
      - lower
      - upper
      title: ForecastIntervalResponse
    RaceEventResponse:
      properties:
        slug:
          type: string
          title: Slug
        country:
          type: string
          title: Country
        geo_level:
          type: string
          title: Geo Level
        polling_date:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Polling Date
        date_precision:
          type: string
          enum:
          - fixed
          - expected
          - deadline
          - unknown
          title: Date Precision
        date_window_start:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Date Window Start
        date_window_end:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          title: Date Window End
        stage:
          type: string
          title: Stage
        round_number:
          type: integer
          title: Round Number
        region_codes:
          items:
            type: string
          type: array
          title: Region Codes
      type: object
      required:
      - slug
      - country
      - geo_level
      - polling_date
      - date_precision
      - date_window_start
      - date_window_end
      - stage
      - round_number
      - region_codes
      title: RaceEventResponse
    RaceQuestionResponse:
      properties:
        question_id:
          type: integer
          title: Question Id
        title:
          type: string
          title: Title
        role:
          type: string
          enum:
          - headline
          - runoff
          - vote_share
          - seat_count
          - placement
          - turnout
          - government_formation
          - related
          title: Role
        source:
          type: string
          enum:
          - curated
          - suggested
          - scheduled
          title: Source
        party_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Party Key
        is_resolved:
          type: boolean
          title: Is Resolved
        resolved_value:
          anyOf:
          - type: string
          - type: 'null'
          title: Resolved Value
        latest_forecast:
          anyOf:
          - $ref: '#/components/schemas/RaceForecastResponse'
          - type: 'null'
        execution_count:
          type: integer
          title: Execution Count
      type: object
      required:
      - question_id
      - title
      - role
      - source
      - party_key
      - is_resolved
      - resolved_value
      - execution_count
      title: RaceQuestionResponse
    GetRaceResponse:
      properties:
        slug:
          type: string
          title: Slug
        title:
          type: string
          title: Title
        race_type:
          type: string
          title: Race Type
        electoral_system:
          type: string
          title: Electoral System
        chamber:
          anyOf:
          - type: string
          - type: 'null'
          title: Chamber
        jurisdiction:
          anyOf:
          - type: string
          - type: 'null'
          title: Jurisdiction
        seats_total:
          anyOf:
          - type: integer
          - type: 'null'
          title: Seats Total
        majority_threshold:
          anyOf:
          - type: integer
          - type: 'null'
          title: Majority Threshold
        electoral_threshold_pct:
          anyOf:
          - type: number
          - type: 'null'
          title: Electoral Threshold Pct
        rounds:
          type: integer
          title: Rounds
        runoff_rule:
          anyOf:
          - type: string
          - type: 'null'
          title: Runoff Rule
        incumbent:
          anyOf:
          - type: string
          - type: 'null'
          title: Incumbent
        event:
          $ref: '#/components/schemas/RaceEventResponse'
        runoff_event:
          anyOf:
          - $ref: '#/components/schemas/RaceEventResponse'
          - type: 'null'
        parties:
          items:
            $ref: '#/components/schemas/RacePartyResponse'
          type: array
          title: Parties
        questions:
          items:
            $ref: '#/components/schemas/RaceQuestionResponse'
          type: array
          title: Questions
        sibling_race_count:
          type: integer
          title: Sibling Race Count
      type: object
      required:
      - slug
      - title
      - race_type
      - electoral_system
      - chamber
      - jurisdiction
      - seats_total
      - majority_threshold
      - electoral_threshold_pct
      - rounds
      - runoff_rule
      - incumbent
      - event
      - runoff_event
      - parties
      - questions
      - sibling_race_count
      title: GetRaceResponse
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: https://app.mantic.com/auth/oauth2/authorize
          tokenUrl: https://app.mantic.com/auth/oauth2/token