This guide will walk you through the different API's we offer
PioneerGov API User Guide
Offices API:
http request url : [https://api.pioneergov.com/offices/{slug of office}?key=]
Example: [https://api.pioneergov.com/offices/us-senator-new-york?key=]
Response:
{
"office": {
"name": "U.S. Senator",
"division": "New York",
"state": "New York",
"levels": "country",
"roles": "legislatorUpperBody",
"slug": "us-senator-new-york"
},
"officials": [
{
"basic_info": {
"name": "Charles E. Schumer",
"gender": null,
"party": "Democratic Party",
"incumbent": "",
"state_name": "New York",
"phones": "(202) 224-6542",
"emails": "",
"photo_url": "https://cdn.pioneergov.com/file/politicians/img/charles-e-schumer.jpg",
"prior_offices": "",
"current_office": "",
"profession": "",
"candidate_url": "",
"slug": "charles-e-schumer"
},
"address": {
"line1": "United States Senate",
"line2": "322 Hart Senate Office Building",
"line3": "",
"city": "Washington",
"state": "DC",
"zip": "20510"
}
},
{
"basic_info": {
"name": "Kirsten E. Gillibrand",
"gender": null,
"party": "Democratic Party",
"incumbent": "",
"state_name": "New York",
"phones": "(202) 224-4451",
"emails": "",
"photo_url": "https://cdn.pioneergov.com/file/politicians/img/kirsten-e-gillibrand.jpg",
"prior_offices": "",
"current_office": "",
"profession": "",
"candidate_url": "",
"slug": "kirsten-e-gillibrand"
},
"address": {
"line1": "United States Senate",
"line2": "478 Russell Senate Office Building",
"line3": "",
"city": "Washington",
"state": "DC",
"zip": "20510"
}
}
]
}
Politician API:
http request url: [https://api.pioneergov.com/{slug of politician}?key=]
Example: [api.pioneergov.com/charles-e-schumer?key=]
Response:
"basic_info": {
"name": "Charles E. Schumer",
"gender": null,
"party": "Democratic Party",
"incumbent": "",
"state_name": "New York",
"phones": "(202) 224-6542",
"emails": "",
"photo_url": "https://cdn.pioneergov.com/file/politicians/img/charles-e-schumer.jpg",
"prior_offices": "",
"current_office": "",
"profession": "",
"candidate_url": "",
"slug": "charles-e-schumer"
},
"current_offices": [
{
"office_name": "U.S. Senator",
"office_slug": "us-senator-new-york"
}
],
"ex_offices": [
],
"address": {
"line1": "United States Senate",
"line2": "322 Hart Senate Office Building",
"line3": "",
"city": "Washington",
"state": "DC",
"zip": "20510"
},
"contacts": [
{
"channel_name": "Facebook",
"channel_url": "https://www.facebook.com/senschumer"
},
{
"channel_name": "Twitter",
"channel_url": "https://www.twitter.com/SenSchumer"
},
{
"channel_name": "Official website",
"channel_url": "https://www.schumer.senate.gov"
},
{
"channel_name": "Wikipedia",
"channel_url": " https://en.wikipedia.org/wiki/Chuck_Schumer"
}
],
"educations": [
],
"geo_summaries": {
"query_string": "322 Hart Senate Office Building, Washington DC 20510",
"cell_id": "9923602661160726555",
"fprint": "13491012159388313795",
"feature_type": "typePostalCode",
"position_precision_meters": 500,
"address_understood": true
}
}
Election API:
http request url : [https://api.pioneergov.com/elections/{slug of election}?key=]
Example: [https://api.pioneergov.com/elections/us-senate-alabama-2022?key=]
Response:
[
{
"general_election": {
"election_info": {
"election_name": "General election for U.S. Senate Alabama",
"election_type": "general",
"state_name": "Alabama",
"city": "",
"office": "U.S. Senate",
"sub_office": "",
"election_date": "2022-11-08",
"slug": "us-senate-alabama-2022"
},
"election_result": [
{
"candidate_name": "Katie Britt",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/katie-britt.jpg",
"candidate_slug": "katie-britt",
"vote_percentage": "66.8",
"vote_number": "940,054"
},
{
"candidate_name": "Will Boyd",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/will-boyd-alabama.jpg",
"candidate_slug": "will-boyd-alabama",
"vote_percentage": "30.9",
"vote_number": "435,431"
},
{
"candidate_name": "John Sophocleus",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/john-sophocleus.jpg",
"candidate_slug": "john-sophocleus",
"vote_percentage": "2.3",
"vote_number": "32,793"
}
]
},
"sub_elections": [
{
"election_info": {
"election_name": "Republican primary runoff for U.S. Senate Alabama",
"election_type": "primary runoff",
"party": "republican",
"state_name": "Alabama",
"city": "",
"office": "U.S. Senate",
"sub_office": "",
"election_date": "2022-06-21"
},
"election_result": [
{
"candidate_name": "Katie Britt",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/katie-britt.jpg",
"candidate_slug": "katie-britt",
"vote_percentage": "64.8",
"vote_number": "107,598"
},
{
"candidate_name": "Mo Brooks",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/mo-brooks.jpg",
"candidate_slug": "mo-brooks",
"vote_percentage": "35.2",
"vote_number": "58,456"
}
]
},
{
"election_info": {
"election_name": "Democratic primary for U.S. Senate Alabama",
"election_type": "primary",
"party": "democratic",
"state_name": "Alabama",
"city": "",
"office": "U.S. Senate",
"sub_office": "",
"election_date": "2022-05-24"
},
"election_result": [
{
"candidate_name": "Will Boyd",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/will-boyd-alabama.jpg",
"candidate_slug": "will-boyd-alabama",
"vote_percentage": "63.7",
"vote_number": "107,588"
},
{
"candidate_name": "Brandaun Dean",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/brandaun-dean.jpg",
"candidate_slug": "brandaun-dean",
"vote_percentage": "19.5",
"vote_number": "32,863"
},
{
"candidate_name": "Lanny Jackson",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/lanny-jackson.jpg",
"candidate_slug": "lanny-jackson",
"vote_percentage": "16.8",
"vote_number": "28,402"
}
]
},
{
"election_info": {
"election_name": "Republican primary for U.S. Senate Alabama",
"election_type": "primary",
"party": "republican",
"state_name": "Alabama",
"city": "",
"office": "U.S. Senate",
"sub_office": "",
"election_date": "2022-05-24"
},
"election_result": [
{
"candidate_name": "Katie Britt",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/katie-britt.jpg",
"candidate_slug": "katie-britt",
"vote_percentage": "45.2",
"vote_number": "268,949"
},
{
"candidate_name": "Michael Durant",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/michael-durant.jpg",
"candidate_slug": "michael-durant",
"vote_percentage": "23.3",
"vote_number": "138,300"
},
{
"candidate_name": "Jake Schafer",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/jake-schafer.jpg",
"candidate_slug": "jake-schafer",
"vote_percentage": "1.2",
"vote_number": "6,951"
},
{
"candidate_name": "Karla DuPriest",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/karla-dupriest.jpg",
"candidate_slug": "karla-dupriest",
"vote_percentage": "0.9",
"vote_number": "5,366"
},
{
"candidate_name": "Lillie Boddie",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/lillie-boddie.jpg",
"candidate_slug": "lillie-boddie",
"vote_percentage": "0.8",
"vote_number": "4,865"
},
{
"candidate_name": "Mo Brooks",
"candidate_photo": "https://cdn.pioneergov.com/file/politicians/img/mo-brooks.jpg",
"candidate_slug": "mo-brooks",
"vote_percentage": "28.6",
"vote_number": "170,108"
}
]
}
]
}
]
Election URLs API:
http request url : [<https://api.pioneergov.com/election-urls?key=>]
Example: [<https://api.pioneergov.com/election-urls?key=>]
Response:
[
"<https://api.pioneergov.com/elections/us-senate-alabama-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-arizona-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-arkansas-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-california-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-colorado-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-connecticut-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-florida-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-georgia-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-georgia-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-hawaii-2022?key=<key>">,
"<https://api.pioneergov.com/elections/us-senate-idaho-2022?key=<key>">,
........
]
Office URLs API:
http request url : [<https://api.pioneergov.com/office-urls?key=>]
Example: [<https://api.pioneergov.com/office-urls?key=>]
Response:
[
"<https://api.pioneergov.com/offices/president-of-the-united-states?key=<key>">,
"<https://api.pioneergov.com/offices/vice-president-of-the-united-states?key=<key>">,
"<https://api.pioneergov.com/offices/us-senator-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/us-representative-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/governor-of-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/lieutenant-governor-of-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-c-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-b-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-a-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-k-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-j-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-i-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-h-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-g-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-f-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-e-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-d-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-s-alaska?key=<key>">,
"<https://api.pioneergov.com/offices/state-senator-district-r-alaska?key=<key>">,
............
]
Politician URLs API:
http request url : [<https://api.pioneergov.com/politicians/urls?key=>]
The reason of the url structure like “/politicians/urls” is if we use “politicians-urls” it will conflict with politician API which urls' structure is [<https://api.pioneergov.com/>?key=].
If we use “politicians-urls” for the politician URLs API the flask router assumes it a slug and call the politician API instead of politician URLs API
Example: [<https://api.pioneergov.com/politicians/urls?key=>]
Response:
[
"<https://api.pioneergov.com/joseph-r-biden?">,
"<https://api.pioneergov.com/kamala-d-harris?key=<key>">,
"<https://api.pioneergov.com/dan-sullivan-alaska?key=<key>">,
"<https://api.pioneergov.com/lisa-murkowski?key=<key>">,
"<https://api.pioneergov.com/mary-sattler-peltola?key=<key>">,
"<https://api.pioneergov.com/mike-dunleavy?key=<key>">,
"<https://api.pioneergov.com/kevin-meyer?key=<key>">,
"<https://api.pioneergov.com/click-bishop?key=<key>">,
"<https://api.pioneergov.com/robert-h-myers-jr?key=<key>">,
"<https://api.pioneergov.com/scott-kawasaki?key=<key>">,
"<https://api.pioneergov.com/mia-costello?key=<key>">,
"<https://api.pioneergov.com/tom-begich?key=<key>">,
"<https://api.pioneergov.com/elvi-gray-jackson?key=<key>">,
"<https://api.pioneergov.com/bill-wielechowski?key=<key>">,
"<https://api.pioneergov.com/lora-h-reinbold?key=<key>">,
"<https://api.pioneergov.com/shelley-hughes?key=<key>">,
"<https://api.pioneergov.com/michael-k-shower?key=<key>">,
"<https://api.pioneergov.com/david-s-wilson?key=<key>">,
"<https://api.pioneergov.com/lyman-hoffman?key=<key>">,
"<https://api.pioneergov.com/bert-stedman?key=<key>">,
"<https://api.pioneergov.com/jesse-kiehl?key=<key>">,
"<https://api.pioneergov.com/gary-stevens?key=<key>">,
"<https://api.pioneergov.com/peter-micciche?key=<key>">,
"<https://api.pioneergov.com/roger-holland?key=<key>">,
"<https://api.pioneergov.com/josh-c-revak?key=<key>">,
"<https://api.pioneergov.com/natasha-a-von-imhof?key=<key>">,
...............
]