Democracy Works
Retrieve election, authority, candidate, contest, endorsement, export, ballot measure, and voting location data.
Authentication
| Method | Kind | Status | Details |
|---|---|---|---|
| API Key | api_key | available | — |
Call a tool
import { createClient } from "@open-connector/sdk";const oc = createClient({ baseUrl: "https://api.openconnector.dev", apiKey: process.env.OPEN_CONNECTOR_API_KEY!,});const result = await oc.executeTool({ slug: "DEMOCRACY_WORKS_GET_AUTHORITIES", connectedAccountId: "conn_...", arguments: { /* match this tool's input schema */ },});import Composio from "@composio/client";const composio = new Composio({ baseURL: "https://api.openconnector.dev/composio", apiKey: process.env.OPEN_CONNECTOR_API_KEY!,});const result = await composio.tools.execute("DEMOCRACY_WORKS_GET_AUTHORITIES", { connected_account_id: "conn_...", arguments: { /* match this tool's input schema */ },});oc tools execute DEMOCRACY_WORKS_GET_AUTHORITIES --data '{ }'Tool catalog
Available tools
11 callable operations
All authoritiesDEMOCRACY_WORKS_GET_AUTHORITIESThis endpoint includes all statewide and local authorities that correspond to a given address or state parameter. The statewide authorities include evergreen information and guidance on how to register and vote in that state, as well as contact information for state election authorities. Local authorities provide contact information for the local election office. Authorities do not contain election-specific information such as dates, and while we closely monitor this data for changes and update when needed, Authorities information generally does not change from election to election. Authorities are returned sorted alphabetically by OCD-ID. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__, __[Localization](#section/Standard-Parameters/Localization)__, and __[Content Formatting](#section/Standard-Parameters/Content-Formatting)__.Connection
This endpoint includes all statewide and local authorities that correspond to a given address or state parameter. The statewide authorities include evergreen information and guidance on how to register and vote in that state, as well as contact information for state election authorities. Local authorities provide contact information for the local election office. Authorities do not contain election-specific information such as dates, and while we closely monitor this data for changes and update when needed, Authorities information generally does not change from election to election. Authorities are returned sorted alphabetically by OCD-ID. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__, __[Localization](#section/Standard-Parameters/Localization)__, and __[Content Formatting](#section/Standard-Parameters/Content-Formatting)__.
Authentication
Connected account requiredTags
Ballot MeasureDEMOCRACY_WORKS_GET_BALLOT_MEASUREInformation on the ballot measures on the ballot, including a summary and the full text of the ballot measure.Connection
Information on the ballot measures on the ballot, including a summary and the full text of the ballot measure.
Authentication
Connected account requiredTags
CandidateDEMOCRACY_WORKS_GET_CANDIDATEThis endpoint gets one candidate by `id`.Connection
This endpoint gets one candidate by `id`.
Authentication
Connected account requiredTags
ContestDEMOCRACY_WORKS_GET_CONTESTThis endpoint gets one contest by `id`.Connection
This endpoint gets one contest by `id`.
Authentication
Connected account requiredTags
ElectionsDEMOCRACY_WORKS_GET_ELECTIONSThis endpoint has election-specific dates and deadlines, URLs for voters to get more information and take action, and detailed guidance in both English and Spanish. The information included reflects the voter registration and voting methods available in the state for that election, such as online, in-person, and by-mail registration as well as by-mail, in-person, and early voting. The election also contains some information from the related state authority. The default is to return all elections, though you can limit the response to upcoming elections through the use of the start date parameter. Elections are returned sorted chronologically by election date. After an election is confirmed to be occurring, Democracy Works surfaces information about an election as details become available. An election’s guidance phase describes the state of the currently available guidance. A `past` election is an election whose election date is in the past. An `expected` election is an upcoming election that is expected to occur but for which Democracy Works has not yet published specific guidance for. A `not currently expected` election is an election that Democracy Works expect to happen but will not publish guidance for. An `active` election is an upcoming election for which Democracy Works has published specific guidance. Elections are returned sorted chronologically by election date. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__, __[Localization](#section/Standard-Parameters/Localization)__, __[Content Formatting](#section/Standard-Parameters/Content-Formatting)__, and __[Fields](#section/Standard-Parameters/Fields)__. ### Ballot Measure Information Information about measures on the ballot will include: - All federal ballot measures - All statewide ballot measures - Local ballot measures in the top 100 cities by population Ballot measure information is not included in the default response for an election. For ballot measure information to be included with the response, include the `includeBallotData` parameter with a value of `true`. Ballot data is sourced from [Ballotpedia](https://ballotpedia.org/Election_coverage_approach_for_Ballotpedia). ### Candidate and Contest Information Information about contests and candidates on the ballot will include: - All federal contests and candidates, including senate and house of representatives - All state contests and candidates, including governor, treasurer, secretary of state, state legislative seats, state supreme court, district court, and court of appeals - Local contests and candidates including mayor, county judge, county clerk, commissioners, and city councils in the top 100 cities by population, plus school board elections in 475 districts - Note that local coverage may be limited by mapping constraints. Ballot data is sourced from [Ballotpedia](https://ballotpedia.org/Election_coverage_approach_for_Ballotpedia).Connection
This endpoint has election-specific dates and deadlines, URLs for voters to get more information and take action, and detailed guidance in both English and Spanish. The information included reflects the voter registration and voting methods available in the state for that election, such as online, in-person, and by-mail registration as well as by-mail, in-person, and early voting. The election also contains some information from the related state authority. The default is to return all elections, though you can limit the response to upcoming elections through the use of the start date parameter. Elections are returned sorted chronologically by election date. After an election is confirmed to be occurring, Democracy Works surfaces information about an election as details become available. An election’s guidance phase describes the state of the currently available guidance. A `past` election is an election whose election date is in the past. An `expected` election is an upcoming election that is expected to occur but for which Democracy Works has not yet published specific guidance for. A `not currently expected` election is an election that Democracy Works expect to happen but will not publish guidance for. An `active` election is an upcoming election for which Democracy Works has published specific guidance. Elections are returned sorted chronologically by election date. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__, __[Localization](#section/Standard-Parameters/Localization)__, __[Content Formatting](#section/Standard-Parameters/Content-Formatting)__, and __[Fields](#section/Standard-Parameters/Fields)__. ### Ballot Measure Information Information about measures on the ballot will include: - All federal ballot measures - All statewide ballot measures - Local ballot measures in the top 100 cities by population Ballot measure information is not included in the default response for an election. For ballot measure information to be included with the response, include the `includeBallotData` parameter with a value of `true`. Ballot data is sourced from [Ballotpedia](https://ballotpedia.org/Election_coverage_approach_for_Ballotpedia). ### Candidate and Contest Information Information about contests and candidates on the ballot will include: - All federal contests and candidates, including senate and house of representatives - All state contests and candidates, including governor, treasurer, secretary of state, state legislative seats, state supreme court, district court, and court of appeals - Local contests and candidates including mayor, county judge, county clerk, commissioners, and city councils in the top 100 cities by population, plus school board elections in 475 districts - Note that local coverage may be limited by mapping constraints. Ballot data is sourced from [Ballotpedia](https://ballotpedia.org/Election_coverage_approach_for_Ballotpedia).
Authentication
Connected account requiredTags
EndorsementDEMOCRACY_WORKS_GET_ENDORSEMENTThis endpoint gets one endorsement by `endorsement id`.Connection
This endpoint gets one endorsement by `endorsement id`.
Authentication
Connected account requiredTags
Endorsement BulkDEMOCRACY_WORKS_GET_ENDORSEMENT_BULKThis endpoint a list of endorsements by ballot measure or candidate id. You may not provide an ballot measure and candidate id at the same time. No endorsement is associated with both a ballot measure & candidate. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__.Connection
This endpoint a list of endorsements by ballot measure or candidate id. You may not provide an ballot measure and candidate id at the same time. No endorsement is associated with both a ballot measure & candidate. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__.
Authentication
Connected account requiredTags
ExportsDEMOCRACY_WORKS_GET_EXPORTSThis endpoint serves presigned URLs to flat files on AWS S3. It supports no parameters. To set up a bulk data export, contact partnerships@democracy.works. Presigned URLs are temporary and expire after one hour. Download the file promptly after requesting a URL. If a URL expires before you can download your file, request a new one from this endpoint. Presigned URLs grant access to your data. Do not share these URLs with any party that should have access to this data. [Learn more about Working with presigned URLs on AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html).Connection
This endpoint serves presigned URLs to flat files on AWS S3. It supports no parameters. To set up a bulk data export, contact partnerships@democracy.works. Presigned URLs are temporary and expire after one hour. Download the file promptly after requesting a URL. If a URL expires before you can download your file, request a new one from this endpoint. Presigned URLs grant access to your data. Do not share these URLs with any party that should have access to this data. [Learn more about Working with presigned URLs on AWS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html).
Authentication
Connected account requiredTags
Local authoritiesDEMOCRACY_WORKS_GET_LOCAL_AUTHORITIESThis endpoint provides contact information for over 8,500 local election offices at the county and municipal levels. Authorities are returned sorted alphabetically by OCD-ID. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__ and __[Localization](#section/Standard-Parameters/Localization)__.Connection
This endpoint provides contact information for over 8,500 local election offices at the county and municipal levels. Authorities are returned sorted alphabetically by OCD-ID. Supports the following standard parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__ and __[Localization](#section/Standard-Parameters/Localization)__.
Authentication
Connected account requiredTags
State authoritiesDEMOCRACY_WORKS_GET_STATE_AUTHORITIESThis endpoint includes statewide evergreen information and instructions on how to register and vote for each state (and Washington, D.C.). It includes contact information for state election authorities, registration methods, voting methods, state-specific URLs to authoritative government websites, and more. Authorities do not contain election-specific information such as dates, and while we closely monitor this data for changes and update when needed, Authorities information generally does not change from election to election. Authorities are returned sorted alphabetically by OCD-ID. Supports standard the following parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__, __[Localization](#section/Standard-Parameters/Localization)__, and __[Content Formatting](#section/Standard-Parameters/Content-Formatting)__.Connection
This endpoint includes statewide evergreen information and instructions on how to register and vote for each state (and Washington, D.C.). It includes contact information for state election authorities, registration methods, voting methods, state-specific URLs to authoritative government websites, and more. Authorities do not contain election-specific information such as dates, and while we closely monitor this data for changes and update when needed, Authorities information generally does not change from election to election. Authorities are returned sorted alphabetically by OCD-ID. Supports standard the following parameters: see __[Pagination](#section/Standard-Parameters/Pagination)__, __[Localization](#section/Standard-Parameters/Localization)__, and __[Content Formatting](#section/Standard-Parameters/Content-Formatting)__.
Authentication
Connected account requiredTags
Voting LocationsDEMOCRACY_WORKS_GET_VOTING_LOCATIONS### Address arguments An address may be supplied in one of two ways: - **As a single string**, via `address`. - **As components**, via `addressStreet`, `addressCity`, `addressState`, and `addressZip`. All four component parameters must be present, and `addressUnitNumber` may optionally be added. All requests must include an address as single string or with all required components (preferred). ```bash # Address as a single string curl \ --get \ --header "X-API-KEY: $YOUR_API_KEY" \ --data-urlencode address="20 Jay Street Brooklyn NY 11201" \ --data-urlencode publishStatus=prepublished \ https://api.democracy.works/v2/voting-locations ``` ```bash # Address as components curl \ --get \ --header "X-API-KEY: $YOUR_API_KEY" \ --data-urlencode addressStreet="20 Jay Street" \ --data-urlencode addressCity=Brooklyn \ --data-urlencode addressState=NY \ --data-urlencode addressZip=11201 \ --data-urlencode addressUnitNumber="Unit 410" \ --data-urlencode publishStatus=prepublished \ https://api.democracy.works/v2/voting-locations ```Connection
### Address arguments An address may be supplied in one of two ways: - **As a single string**, via `address`. - **As components**, via `addressStreet`, `addressCity`, `addressState`, and `addressZip`. All four component parameters must be present, and `addressUnitNumber` may optionally be added. All requests must include an address as single string or with all required components (preferred). ```bash # Address as a single string curl \ --get \ --header "X-API-KEY: $YOUR_API_KEY" \ --data-urlencode address="20 Jay Street Brooklyn NY 11201" \ --data-urlencode publishStatus=prepublished \ https://api.democracy.works/v2/voting-locations ``` ```bash # Address as components curl \ --get \ --header "X-API-KEY: $YOUR_API_KEY" \ --data-urlencode addressStreet="20 Jay Street" \ --data-urlencode addressCity=Brooklyn \ --data-urlencode addressState=NY \ --data-urlencode addressZip=11201 \ --data-urlencode addressUnitNumber="Unit 410" \ --data-urlencode publishStatus=prepublished \ https://api.democracy.works/v2/voting-locations ```
Authentication
Connected account requiredTags