1. Documentation
  2. API
  3. Contests
  4. Get

Get an Contest

Get a specific Contest.

GET /v1/contests/{id}
https://api.ballotapi.org/v1/contests/19573n3
Parameter Format Description Example
String A comma separated list of resources to include for each Contest object response. Options are: "election" and "precincts". include=precincts

We will return an Contest object for the specified id.

Example response:

{
    "type": "contest",
    "id": "19573n3",
    "ocd_id": null,
    "election_id": "123-4",
    "contest_type": "elected_position",
    "contest_level": "city",
    "voting_method": "ranked_choice",
    "voting_instructions": "Number candidates in the order...",
    "title": "Mayor of Springfield",
    "question": null,
    "choices": [
        ...
    ]
}
Code Response Format Description
Response Successful request.
Error Response The query parameters you included were invalid. The Error Response will include a message describing exactly was invalid.
Error Response We could not find an Contest with that id.
N/A You are making too many requests to the API. Check the Retry-After header for how many seconds to wait until trying the request again. See our docs on Rate Limiting.
N/A An internal server error occurred. We log these errors and try to fix them quickly, so if you keep getting 500 errors for a few days, please email us.
N/A We are down for maintenance. Please try your request again in a few minutes.
N/A Your request timed out. Please try your request again in a few minutes.