AP Elections API

AP Elections API allows you to retrieve AP elections data using your own tools. The API provides access to all data that is available via FTP at ftp://electionsonline.ap.org.

Access the API

Integrate your election systems with AP Elections API. Your election results delivery application (for example, a results loader that powers your election websites) retrieves election race information from AP Elections API.

  1. Request election race information, including vote updates and race calls.
    During the election, your application polls the API at regular intervals to retrieve election race information and updates in the races of interest; for example, all races in your state or Top-of-the-Ticket races in all states. Election race information includes:
  • Reference information about each race and each candidate
  • Vote counts and if applicable, delegate counts
  • Race calls (races that have been called are the races where a winner has been declared and the races that are advancing to a runoff)
  1. Request election reports.
    Throughout the election, your application polls the API at regular intervals to retrieve election reports; for example, delegate reports for presidential primaries.

Getting Started - Query Explorer

AP Elections API Query Explorer, an interactive tool for creating API requests, helps you get familiar with the API parameters and allows you to view available elections data. Please note that available data may change daily.

An API key is required for accessing the Query Explorer and making API calls:

https://api.ap.org/v2/elections/xplor?apiKey={apiKey}

AP Elections API Documentation