Last active
March 10, 2021 03:14
-
-
Save jhannah/9541cadd3081ddd1d8ba146173d0775a to your computer and use it in GitHub Desktop.
Google Civic Information API example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A random house I chose from Google Maps: | |
4215 S 28th St, Omaha, NE 68107 | |
https://developers.google.com/civic-information/docs/v2/representatives/representativeInfoByAddress?apix_params=%7B%22address%22%3A%224215%20S%2028th%20St%2C%20Omaha%2C%20NE%2068107%22%7D | |
Here's a collapsible tool of this same data: https://jsoneditoronline.org/#left=cloud.fc62383d0a2d4d8d9fcc8a8cc1f54d06 | |
{ | |
"normalizedInput": { | |
"line1": "4215 South 28th Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68107" | |
}, | |
"kind": "civicinfo#representativeInfoResponse", | |
"divisions": { | |
"ocd-division/country:us/state:ne/cd:2": { | |
"name": "Nebraska's 2nd congressional district", | |
"officeIndices": [ | |
3 | |
] | |
}, | |
"ocd-division/country:us": { | |
"name": "United States", | |
"officeIndices": [ | |
0, | |
1 | |
] | |
}, | |
"ocd-division/country:us/state:ne/sldu:7": { | |
"name": "Nebraska State Senate district 7", | |
"alsoKnownAs": [ | |
"ocd-division/country:us/state:ne/sldl:7" | |
], | |
"officeIndices": [ | |
6 | |
] | |
}, | |
"ocd-division/country:us/state:ne": { | |
"name": "Nebraska", | |
"officeIndices": [ | |
2, | |
4, | |
5, | |
7, | |
8, | |
9, | |
10, | |
11 | |
] | |
}, | |
"ocd-division/country:us/state:ne/county:douglas": { | |
"name": "Douglas County", | |
"officeIndices": [ | |
12, | |
13, | |
14, | |
15, | |
16, | |
17, | |
18, | |
19 | |
] | |
}, | |
"ocd-division/country:us/state:ne/place:omaha": { | |
"name": "Omaha city", | |
"officeIndices": [ | |
21 | |
] | |
}, | |
"ocd-division/country:us/state:ne/county:douglas/council_district:1": { | |
"name": "Douglas County Comission District 1", | |
"officeIndices": [ | |
20 | |
] | |
} | |
}, | |
"offices": [ | |
{ | |
"name": "President of the United States", | |
"divisionId": "ocd-division/country:us", | |
"levels": [ | |
"country" | |
], | |
"roles": [ | |
"headOfState", | |
"headOfGovernment" | |
], | |
"officialIndices": [ | |
0 | |
] | |
}, | |
{ | |
"name": "Vice President of the United States", | |
"divisionId": "ocd-division/country:us", | |
"levels": [ | |
"country" | |
], | |
"roles": [ | |
"deputyHeadOfGovernment" | |
], | |
"officialIndices": [ | |
1 | |
] | |
}, | |
{ | |
"name": "U.S. Senator", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"country" | |
], | |
"roles": [ | |
"legislatorUpperBody" | |
], | |
"officialIndices": [ | |
2, | |
3 | |
] | |
}, | |
{ | |
"name": "U.S. Representative", | |
"divisionId": "ocd-division/country:us/state:ne/cd:2", | |
"levels": [ | |
"country" | |
], | |
"roles": [ | |
"legislatorLowerBody" | |
], | |
"officialIndices": [ | |
4 | |
] | |
}, | |
{ | |
"name": "Governor of Nebraska", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"roles": [ | |
"headOfGovernment" | |
], | |
"officialIndices": [ | |
5 | |
] | |
}, | |
{ | |
"name": "Lieutenant Governor of Nebraska", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"roles": [ | |
"deputyHeadOfGovernment" | |
], | |
"officialIndices": [ | |
6 | |
] | |
}, | |
{ | |
"name": "NE State Senator", | |
"divisionId": "ocd-division/country:us/state:ne/sldu:7", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"roles": [ | |
"legislatorUpperBody" | |
], | |
"officialIndices": [ | |
7 | |
] | |
}, | |
{ | |
"name": "NE Auditor of Public Accounts", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"officialIndices": [ | |
8 | |
] | |
}, | |
{ | |
"name": "NE Secretary of State", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"officialIndices": [ | |
9 | |
] | |
}, | |
{ | |
"name": "NE State Treasurer", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"officialIndices": [ | |
10 | |
] | |
}, | |
{ | |
"name": "NE Attorney General", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"officialIndices": [ | |
11 | |
] | |
}, | |
{ | |
"name": "NE Supreme Court Chief Justice", | |
"divisionId": "ocd-division/country:us/state:ne", | |
"levels": [ | |
"administrativeArea1" | |
], | |
"officialIndices": [ | |
12 | |
] | |
}, | |
{ | |
"name": "Douglas County Assessor/Register of Deeds", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
13 | |
] | |
}, | |
{ | |
"name": "Douglas County Engineer", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
14 | |
] | |
}, | |
{ | |
"name": "Douglas County Public Defender", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
15 | |
] | |
}, | |
{ | |
"name": "Douglas County Clerk of the District Court", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
16 | |
] | |
}, | |
{ | |
"name": "Douglas County Attorney", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
17 | |
] | |
}, | |
{ | |
"name": "Douglas County Treasurer", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
18 | |
] | |
}, | |
{ | |
"name": "Douglas County Clerk/Comptroller", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
19 | |
] | |
}, | |
{ | |
"name": "Douglas County Sheriff", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
20 | |
] | |
}, | |
{ | |
"name": "Douglas County Commissioner", | |
"divisionId": "ocd-division/country:us/state:ne/county:douglas/council_district:1", | |
"levels": [ | |
"administrativeArea2" | |
], | |
"officialIndices": [ | |
21 | |
] | |
}, | |
{ | |
"name": "Omaha Mayor", | |
"divisionId": "ocd-division/country:us/state:ne/place:omaha", | |
"levels": [ | |
"locality" | |
], | |
"officialIndices": [ | |
22 | |
] | |
} | |
], | |
"officials": [ | |
{ | |
"name": "Joseph R. Biden", | |
"address": [ | |
{ | |
"line1": "1600 Pennsylvania Avenue Northwest", | |
"city": "Washington", | |
"state": "DC", | |
"zip": "20500" | |
} | |
], | |
"party": "Democratic Party", | |
"phones": [ | |
"(202) 456-1111" | |
], | |
"urls": [ | |
"https://www.whitehouse.gov/" | |
], | |
"channels": [ | |
{ | |
"type": "Twitter", | |
"id": "potus" | |
} | |
] | |
}, | |
{ | |
"name": "Kamala D. Harris", | |
"address": [ | |
{ | |
"line1": "1600 Pennsylvania Avenue Northwest", | |
"city": "Washington", | |
"state": "DC", | |
"zip": "20500" | |
} | |
], | |
"party": "Democratic Party", | |
"phones": [ | |
"(202) 456-1111" | |
], | |
"urls": [ | |
"https://www.whitehouse.gov/" | |
], | |
"channels": [ | |
{ | |
"type": "Twitter", | |
"id": "VP" | |
} | |
] | |
}, | |
{ | |
"name": "Ben Sasse", | |
"address": [ | |
{ | |
"line1": "107 Russell Senate Office Building", | |
"city": "Washington", | |
"state": "DC", | |
"zip": "20510" | |
} | |
], | |
"party": "Republican Party", | |
"phones": [ | |
"(202) 224-4224" | |
], | |
"urls": [ | |
"https://www.sasse.senate.gov/" | |
], | |
"photoUrl": "http://bioguide.congress.gov/bioguide/photo/S/S001197.jpg", | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "SenatorSasse" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "SenSasse" | |
}, | |
{ | |
"type": "YouTube", | |
"id": "UCYaNGwcM2Dl5yDcDqS6xV2g" | |
} | |
] | |
}, | |
{ | |
"name": "Deb Fischer", | |
"address": [ | |
{ | |
"line1": "454 Russell Senate Office Building", | |
"city": "Washington", | |
"state": "DC", | |
"zip": "20510" | |
} | |
], | |
"party": "Republican Party", | |
"phones": [ | |
"(202) 224-6551" | |
], | |
"urls": [ | |
"https://www.fischer.senate.gov/" | |
], | |
"photoUrl": "http://bioguide.congress.gov/bioguide/photo/F/F000463.jpg", | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "senatordebfischer" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "SenatorFischer" | |
}, | |
{ | |
"type": "YouTube", | |
"id": "SenatorDebFischer" | |
} | |
] | |
}, | |
{ | |
"name": "Don Bacon", | |
"address": [ | |
{ | |
"line1": "1024 Longworth House Office Building", | |
"city": "Washington", | |
"state": "DC", | |
"zip": "20515" | |
} | |
], | |
"party": "Republican Party", | |
"phones": [ | |
"(202) 225-4155" | |
], | |
"urls": [ | |
"https://bacon.house.gov" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "RepDonBacon" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "RepDonBacon" | |
} | |
] | |
}, | |
{ | |
"name": "Pete Ricketts", | |
"address": [ | |
{ | |
"line1": "Office of the Governor", | |
"line2": "P.O. Box 94848", | |
"line3": "", | |
"city": "Lincoln", | |
"state": "NE", | |
"zip": "68509-4848" | |
}, | |
{ | |
"line1": "Office of the Governor", | |
"line2": "505A Broadway", | |
"line3": "Suite 400", | |
"city": "Scottsbluff", | |
"state": "NE", | |
"zip": "69361" | |
} | |
], | |
"party": "Republican Party", | |
"phones": [ | |
"(402) 471-2244" | |
], | |
"urls": [ | |
"https://governor.nebraska.gov/" | |
], | |
"photoUrl": "https://governor.nebraska.gov/sites/governor.nebraska.gov/files/gov-headshot_0.jpg", | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "GovernorPeteRicketts" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "GovRicketts" | |
}, | |
{ | |
"type": "YouTube", | |
"id": "UCcDw3_CGhTVcVtxoGKRkjlQ" | |
} | |
] | |
}, | |
{ | |
"name": "Mike Foley", | |
"address": [ | |
{ | |
"line1": "Office of the Governor", | |
"line2": "P.O. Box 94848", | |
"line3": "", | |
"city": "Lincoln", | |
"state": "NE", | |
"zip": "68509-4848" | |
} | |
], | |
"party": "Republican Party", | |
"phones": [ | |
"(402) 471-2256" | |
], | |
"urls": [ | |
"https://ltgov.nebraska.gov/" | |
], | |
"photoUrl": "https://ltgov.nebraska.gov/sites/ltgov.nebraska.gov/files/foley-headshot.jpg", | |
"emails": [ | |
"mike.foley@nebraska.gov" | |
] | |
}, | |
{ | |
"name": "Tony Vargas", | |
"address": [ | |
{ | |
"line1": "State Capitol", | |
"line2": "1445 K Street, Room #1000", | |
"line3": "P.O. Box 94604", | |
"city": "Lincoln", | |
"state": "NE", | |
"zip": "68509" | |
} | |
], | |
"party": "Nonpartisan", | |
"phones": [ | |
"(402) 471-2721" | |
], | |
"urls": [ | |
"http://news.legislature.ne.gov/dist07" | |
], | |
"photoUrl": "http://www.nebraskalegislature.gov/media/images/blogs/dist07.jpg", | |
"emails": [ | |
"tvargas@leg.ne.gov" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "TonyVargasNE" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "TonyVargas" | |
} | |
] | |
}, | |
{ | |
"name": "Charlie Janssen", | |
"party": "Republican Party", | |
"phones": [ | |
"(402) 471-2111" | |
], | |
"urls": [ | |
"https://auditors.nebraska.gov/" | |
], | |
"emails": [ | |
"charlie.janssen@nebraska.gov" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "Nebraska-State-Auditor-Charlie-Janssen-462145667280824" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "NEStateAuditor" | |
} | |
] | |
}, | |
{ | |
"name": "Robert B. Evnen", | |
"party": "Republican Party", | |
"phones": [ | |
"(402) 471-2554" | |
], | |
"urls": [ | |
"https://sos.nebraska.gov/" | |
], | |
"emails": [ | |
"robert.evnen@nebraska.gov" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "Nebraska-Secretary-of-State-368792313908501" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "NEvnen" | |
} | |
] | |
}, | |
{ | |
"name": "John Murante", | |
"party": "Republican Party", | |
"phones": [ | |
"(402) 471-2455" | |
], | |
"urls": [ | |
"https://treasurer.nebraska.gov/" | |
], | |
"emails": [ | |
"john.murante@nebraska.gov" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "NebraskaTreasurer" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "NeTreasurer" | |
} | |
] | |
}, | |
{ | |
"name": "Doug Peterson", | |
"party": "Republican Party", | |
"phones": [ | |
"(402) 471-2683" | |
], | |
"urls": [ | |
"https://ago.nebraska.gov/" | |
], | |
"emails": [ | |
"djp1977@nebraska.gov" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "AGDougPeterson" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "AGDougPeterson" | |
} | |
] | |
}, | |
{ | |
"name": "Michael G. Heavican", | |
"address": [ | |
{ | |
"line1": "1445 K Street", | |
"city": "Lincoln", | |
"state": "NE", | |
"zip": "68509" | |
} | |
], | |
"party": "Nonpartisan", | |
"phones": [ | |
"(402) 471-3738" | |
], | |
"urls": [ | |
"https://supremecourt.nebraska.gov/hon-michael-g-heavican-chief-justice" | |
] | |
}, | |
{ | |
"name": "Diane L. Battiato", | |
"address": [ | |
{ | |
"line1": "1819 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-7159" | |
], | |
"urls": [ | |
"http://www.dcassessor.org/" | |
] | |
}, | |
{ | |
"name": "Thomas Doyle", | |
"address": [ | |
{ | |
"line1": "15505 West Maple Road", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68116" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-6372" | |
], | |
"urls": [ | |
"https://www.dcengineer.org/" | |
] | |
}, | |
{ | |
"name": "Tom Riley", | |
"address": [ | |
{ | |
"line1": "1819 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-7175" | |
], | |
"urls": [ | |
"https://publicdefender.douglascounty-ne.gov/" | |
] | |
}, | |
{ | |
"name": "John Friend", | |
"address": [ | |
{ | |
"line1": "1701 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Republican", | |
"phones": [ | |
"(402) 444-7018" | |
], | |
"urls": [ | |
"https://clerk.dc4dc.com/" | |
] | |
}, | |
{ | |
"name": "Donald Kleine", | |
"address": [ | |
{ | |
"line1": "1701 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-7040" | |
], | |
"urls": [ | |
"https://countyattorney.douglascounty-ne.gov/" | |
] | |
}, | |
{ | |
"name": "John Ewing Jr.", | |
"address": [ | |
{ | |
"line1": "1819 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-7082" | |
], | |
"urls": [ | |
"https://www.dctreasurer.org/" | |
], | |
"emails": [ | |
"Treasurer@dctreasurer.org" | |
] | |
}, | |
{ | |
"name": "Daniel A. Esch", | |
"address": [ | |
{ | |
"line1": "1819 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-6767" | |
], | |
"urls": [ | |
"https://www.douglascountyclerk.org/" | |
], | |
"emails": [ | |
"daniel.esch@douglascounty-ne.gov" | |
] | |
}, | |
{ | |
"name": "Timothy Dunning", | |
"address": [ | |
{ | |
"line1": "3601 North 156th Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68116" | |
} | |
], | |
"party": "Republican", | |
"phones": [ | |
"(402) 444-6627" | |
], | |
"urls": [ | |
"https://www.omahasheriff.org/" | |
] | |
}, | |
{ | |
"name": "Michael Boyle", | |
"address": [ | |
{ | |
"line1": "1819 Farnam St. LC2", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Democratic", | |
"phones": [ | |
"(402) 444-7025" | |
], | |
"urls": [ | |
"https://commissioners.douglascounty-ne.gov/commissioners/district-1" | |
], | |
"emails": [ | |
"mboyle@douglascounty-ne.gov" | |
] | |
}, | |
{ | |
"name": "Jean Stothert", | |
"address": [ | |
{ | |
"line1": "1819 Farnam Street", | |
"city": "Omaha", | |
"state": "NE", | |
"zip": "68183" | |
} | |
], | |
"party": "Nonpartisan", | |
"phones": [ | |
"(402) 444-5000" | |
], | |
"urls": [ | |
"https://mayors-office.cityofomaha.org/" | |
], | |
"photoUrl": "http://www.cityofomaha.org/images/stories/Mayor-Stothert.jpg", | |
"emails": [ | |
"jean.stothert@cityofomaha.org" | |
], | |
"channels": [ | |
{ | |
"type": "Facebook", | |
"id": "jean.stothert" | |
}, | |
{ | |
"type": "Twitter", | |
"id": "Jean_Stothert" | |
} | |
] | |
} | |
] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment