{"id":26692779,"url":"https://github.com/citizenlabsgr/elections-api","last_synced_at":"2025-04-12T23:38:34.327Z","repository":{"id":37978659,"uuid":"137957247","full_name":"citizenlabsgr/elections-api","owner":"citizenlabsgr","description":"API for voter registration status and sample ballots in Michigan.","archived":false,"fork":false,"pushed_at":"2025-04-02T20:21:39.000Z","size":3248,"stargazers_count":11,"open_issues_count":11,"forks_count":8,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-12T23:38:28.526Z","etag":null,"topics":["api","django","django-rest-framework","hacktoberfest","markdown","python","web-scraping"],"latest_commit_sha":null,"homepage":"https://michiganelections.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citizenlabsgr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-19T23:46:33.000Z","updated_at":"2025-01-15T04:04:37.000Z","dependencies_parsed_at":"2023-02-18T22:00:39.808Z","dependency_job_id":"a75c6f58-ce30-4fea-8fcc-019bcf19696f","html_url":"https://github.com/citizenlabsgr/elections-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citizenlabsgr%2Felections-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citizenlabsgr%2Felections-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citizenlabsgr%2Felections-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citizenlabsgr%2Felections-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citizenlabsgr","download_url":"https://codeload.github.com/citizenlabsgr/elections-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647255,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","django","django-rest-framework","hacktoberfest","markdown","python","web-scraping"],"created_at":"2025-03-26T17:34:57.563Z","updated_at":"2025-04-12T23:38:34.297Z","avatar_url":"https://github.com/citizenlabsgr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Michigan Elections API\n\n[![CircleCI](https://img.shields.io/circleci/build/github/citizenlabsgr/elections-api/main)](https://circleci.com/gh/citizenlabsgr/elections-api)\n[![Coveralls](https://img.shields.io/coveralls/github/citizenlabsgr/elections-api/main)](https://coveralls.io/github/citizenlabsgr/elections-api)\n\n\u003c!-- content --\u003e\n\nAPIs to check voter registration status and view sample ballots for elections in Michigan.\n\n### Quick Links\n\n- Browse the source: https://github.com/citizenlabsgr/elections-api/\n- Report an issue: https://github.com/citizenlabsgr/elections-api/issues/\n- Contact the maintainers: https://citizenlabs.org/#contact\n\n### Sample Projects\n\n| Website                                   | Purpose               | Status                                                      |\n| ----------------------------------------- | --------------------- | ----------------------------------------------------------- |\n| https://share.michiganelections.io        | Ballot previews       | [Deployed](https://github.com/citizenlabsgr/ballotshare)    |\n| https://app.michiganelections.io          | Ballot tracker        | [Deployed](https://github.com/citizenlabsgr/ballotbuddies)  |\n| https://vote.citizenlabs.org              | Registration chat bot | [Deployed](https://github.com/citizenlabsgr/mittens)        |\n| https://github.com/MI-Vote/mivote-android | Mobile voter app      | [Development](https://github.com/MI-Vote/mivote-android)    |\n| https://github.com/MI-Vote/mivote-ios     | Mobile voter app      | [Development](https://github.com/MI-Vote/mivote-android)    |\n| https://explore.michiganelections.io      | Election advocacy     | [Discovery](https://github.com/citizenlabsgr/elections-app) |\n\n---\n\n## Overview\n\nThese examples use [HTTPie](https://httpie.org/) for brevity, but the interactive documentation below shows how to do the same using raw `curl` requests.\n\n### Registration Status\n\nCheck your registration status and fetch your voting precinct with an [API call](https://michiganelections.io/api/registrations/?first_name=Rosalynn\u0026last_name=Bliss\u0026birth_date=1975-08-03\u0026zip_code=49503) like this:\n\n```\nhttp GET https://michiganelections.io/api/registrations/ \\\n  \"Accept: application/json; version=3\" \\\n  first_name==Rosalynn last_name==Bliss birth_date==1975-08-03 zip_code==49503\n```\n\nIf you are registered to vote, this will return your voting precinct:\n\n```\n\"precinct\": {\n    \"county\": \"Kent\",\n    \"jurisdiction\": \"City of Grand Rapids\",\n    \"ward\": \"2\",\n    \"number\": \"30\", ...\n}\n```\n\nas well as a unique ID that identifies your precinct:\n\n```\n\"precinct\": {\n    \"id\": 1173,\n    ...\n}\n```\n\nUsing either of these pieces of information, you can fetch the details of your specific ballot.\n\n#### Voting Locations\n\nThe registrations payload also includes your polling location:\n\n```\n\"polling_location\": [\n    \"Mayfair Christian Reformed Church\",\n    \"1736 Lyon NE\",\n    \"Grand Rapids, Michigan 49503\"\n]\n```\n\nAnd the address where you can drop off your signed absentee ballot:\n\n```\n\"dropbox_locations\": [\n    {\n      \"address: [\n        \"300 Ottawa Ave NW\",\n        \"Grand Rapids, MI 49503\"\n      ],\n      \"hours: [\n        \"M-F 8am-5pm\"\n      ]\n    },\n    ...\n]\n```\n\n#### Absentee Information\n\nThe registrations payload also includes fields indicating the voter's absentee status and progress of their ballot:\n\n| Field                           | Description                                             |\n| ------------------------------- | ------------------------------------------------------- |\n| `registered`                    | Voter is registered to vote in future elections         |\n| `absentee`                      | Voter has requested to vote by mail for all elections   |\n| `absentee_application_received` | Date (`YYYY-MM-DD`) clerk received absentee application |\n| `ballot`                        | Voter will have a ballot for the the upcoming election  |\n| `absentee_ballot_sent`          | Date (`YYYY-MM-DD`) clerk mailed your absentee ballot   |\n| `absentee_ballot_received`      | Date (`YYYY-MM-DD`) clear recorded your absentee vote   |\n\n\u003cbr\u003e\nBallot dates reset after each election. Absentee status resets each year.\n\n### Sample Ballots\n\nGet a link to the official sample ballot for upcoming elections, by precinct ID with an [API call](https://michiganelections.io/api/ballots/?precinct_id=1173) like this:\n\n```\nhttp GET https://michiganelections.io/api/ballots/ \\\n  \"Accept: application/json; version=3\" \\\n  precinct_id==1173\n```\n\nor by precinct name with an [API call](https://michiganelections.io/api/ballots/?precinct_county=Kent\u0026precinct_jurisdiction=City%20of%20Grand%20Rapids\u0026precinct_ward=2\u0026precinct_number=30) like this:\n\n```\nhttp GET https://michiganelections.io/api/ballots/ \\\n  \"Accept: application/json; version=3\" \\\n  precinct_county==Kent precinct_jurisdiction==\"City of Grand Rapids\" \\\n  precinct_ward==2 precinct_number==30\n```\n\n### Ballot Details: Positions\n\nGet more information about the specific positions and candidates on your ballot, by precinct ID with an [API call](https://michiganelections.io/api/positions/?precinct_id=1173) like this:\n\n```\nhttp GET https://michiganelections.io/api/positions/ \\\n  \"Accept: application/json; version=3\" \\\n  precinct_id==1173\n```\n\nor by precinct name with an [API call](https://michiganelections.io/api/positions/?precinct_county=Kent\u0026precinct_jurisdiction=City%20of%20Grand%20Rapids\u0026precinct_ward=2\u0026precinct_number=30) like this:\n\n```\nhttp GET https://michiganelections.io/api/positions/ \\\n  \"Accept: application/json; version=3\" \\\n  precinct_county==Kent precinct_jurisdiction==\"City of Grand Rapids\" \\\n  precinct_ward==2 precinct_number==30\n```\n\nResults can be filtered by name, description, election name, and district name using a `q` query parameter. Prefix a search term with `-` to exclude it from results.\n\n### Ballot Details: Proposals\n\nGet more information about the specific proposals on your ballot, by precinct ID with an [API call](https://michiganelections.io/api/proposals/?precinct_id=1173) like this:\n\n```\nhttp GET https://michiganelections.io/api/proposals/ \\\n  \"Accept: application/json; version=3\" \\\n  precinct_id=1173\n```\n\nor by precinct name with an [API call](https://michiganelections.io/api/proposals/?precinct_county=Kent\u0026precinct_jurisdiction=City%20of%20Grand%20Rapids\u0026precinct_ward=2\u0026precinct_number=30) like this:\n\n```\nhttp GET https://michiganelections.io/api/proposals/ \\\n  \"Accept: application/json; version=3\" \\\n  precinct_county==Kent precinct_jurisdiction==\"City of Grand Rapids\" \\\n  precinct_ward==2 precinct_number==30\n```\n\nResults can be filtered by name, description, election name, and district name using a `q` query parameter.  Prefix a search term with `-` to exclude it from results.\n\n## Documentation\n\nThe browsable API powered by [Django REST Framework](https://www.django-rest-framework.org) can be found here: https://michiganelections.io/api/\n\nInteractive API documentation powered by [Swagger UI](https://swagger.io/tools/swagger-ui/), can be found here: https://michiganelections.io/docs/\n\nVersions of the API are requested through content negotiation. Your client will receive the highest compatible version for the major version you request.\n\n## Zapier Integration\n\nGet notified about upcoming elections and changes to your registration status using the official Zapier integration: https://app.michiganelections.io/zapier/\n\n## Contributing\n\nIf you would like to contribute to this project, fork this repository or ask for commit access rights during one of our [\"Hack Night\" events](https://citizenlabs.org/join/).\n\nOnce you have access rights or a fork, please read the [CONTRIBUTING.md](https://github.com/citizenlabsgr/elections-api/blob/main/CONTRIBUTING.md) file to set up your local environment. Create a branch for every issue you work on and make a pull request to `main` with the corresponding issue attached.\n\nYou can also contribute content changes by editing [these files](https://github.com/citizenlabsgr/elections-api/tree/main/content) directly on GitHub. If you would like to know more about us, please check out our [welcome kit](https://github.com/citizenlabsgr/read-first).\n\n## History\n\n**Version 3.5**\n\n- Added party `nomination` attribute for nonpartisan judgeships.\n\n**Version 3.4**\n\n- Added `?q=` text search to `/api/proposals/` and `/api/positions/`.\n\n**Version 3.3**\n\n- Added `proposals_count` and `positions_count` to elections API responses.\n\n**Version 3.2**\n\n- Added `items` count to the `ballot` portion of status API responses.\n\n**Version 3.1**\n\n- Added `ballots` to registration API responses.\n- Added `ballot` to status API responses.\n\n**Version 3.0**\n\n- Removed unused `description` field from election responses.\n- Removed support for legacy (1.x) `dropbox_location` field in registration API responses.\n\n**Version 2.0**\n\n- Replaced `dropbox_location` with `dropbox_locations` in registrations API responses to include multiple locations and hours.\n\n**Version 1.11**\n\n- Added `ballot` to registration and status API responses.\n\n**Version 1.10.1**\n\n- Updated `/api/status/` to return a 202 when the Michigan Secretary of State website is unavailable.\n\n**Version 1.10**\n\n- Added `/api/status/` to enable triggering when a voter's registration status changes for an upcoming election.\n\n**Version 1.9**\n\n- Added `dropbox_location` to registrations API responses.\n\n**Version 1.8**\n\n- Added `absentee_application_received`, `absentee_ballot_sent`, and `absentee_ballot_received` dates to the registrations API responses to track the progress of each voter's absentee ballot.\n\n**Version 1.7**\n\n- Added `section` to ballot positions API responses to filter primary ballot selection.\n\n**Version 1.6**\n\n- Added `recently_moved` to registrations API responses to indicate that precinct information may not currently be accurate.\n\n**Version 1.5**\n\n- Added `date_humanized` field to elections API responses.\n\n**Version 1.4**\n\n- Added `absentee` to the registrations API responses to indicate that a voter has absentee status.\n\n**Version 1.3**\n\n- Added `description_edit_url` to responses for elections, district categories, parties, and positions.\n\n**Version 1.2**\n\n- Added a glossary API to display descriptions for elections, district categories, parties, and positions.\n\n**Version 1.1**\n\n- Added `polling_location` to the registrations API.\n- Added `description` to the district category, election, and party APIs.\n\n**Version 1.0**\n\n- Initial public release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitizenlabsgr%2Felections-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitizenlabsgr%2Felections-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitizenlabsgr%2Felections-api/lists"}