Skip to content

Instantly share code, notes, and snippets.

@jlsuttles
Created August 5, 2014 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlsuttles/a62e42e6972dede792e3 to your computer and use it in GitHub Desktop.
Save jlsuttles/a62e42e6972dede792e3 to your computer and use it in GitHub Desktop.

Request

POST https://www.googleapis.com/civicinfo/v1/voterinfo/2000/lookup?officialOnly=true&key={YOUR_API_KEY}

Content-Type:  application/json
X-JavaScript-User-Agent:  Google APIs Explorer
 
{
 "address": "3474 17th St, San Francisco, CA"
}

Response

200 OK
 
- Hide headers -
 
cache-control:  no-cache, no-store, max-age=0, must-revalidate
content-encoding:  gzip
content-length:  3239
content-type:  application/json; charset=UTF-8
date:  Tue, 05 Aug 2014 07:29:33 GMT
etag:  "mN0od9VSSV1_NPJmEsLncKwqGZI/X2JcT6h1bTgN0uLkO4UQR6IJGVA"
expires:  Fri, 01 Jan 1990 00:00:00 GMT
pragma:  no-cache
server:  GSE
 
{
 "kind": "civicinfo#voterInfoResponse",
 "status": "success",
 "election": {
  "id": "2000",
  "name": "VIP Test Election",
  "electionDay": "2015-06-06"
 },
 "normalizedInput": {
  "line1": "3474 17th st",
  "city": "san francisco",
  "state": "CA",
  "zip": "94110"
 },
 "pollingLocations": [
  {
   "address": {
    "locationName": "Police Station",
    "line1": "630 Valencia Street",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94110-1126"
   },
   "notes": "Between 17th & 18th Streets",
   "pollingHours": "07:00-20:00",
   "sources": [
    {
     "name": "Voting Information Project",
     "official": true
    }
   ]
  }
 ],
 "earlyVoteSites": [
  {
   "address": {
    "locationName": "San Francisco City Hall",
    "line1": "1 Dr. Carlton B Goodlett Place",
    "line2": "",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94102"
   },
   "notes": "Enter City Hall at Grove Street, Room 48",
   "pollingHours": "Thurs Nov 1st 8:00am-5:00pm, Fri Nov 2nd 8:00am-5:00pm, Sat Nov 3rd 10:00am-4:00pm, Sun Nov 4th 10:00am-4:00pm, Mon Nov 5th 8:00am-5:00pm",
   "name": "Early Voting Center",
   "voterServices": "",
   "startDate": "9-Oct",
   "endDate": "5-Nov",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  }
 ],
 "contests": [
  {
   "type": "General",
   "office": "County Board of Education - At-Large (Vote for 4)",
   "level": "other",
   "district": {
    "name": "San Francisco",
    "scope": "countywide",
    "id": "06san francisco"
   },
   "candidates": [
    {
     "name": "Sandra Lee Fewer",
     "party": "Non-Partisan",
     "candidateUrl": "http://sandrafewer.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/pages/Sandra-Lee-Fewer/22110906556?fref=ts"
      }
     ]
    },
    {
     "name": "Kim Garcia-Meza",
     "party": "Non-Partisan",
     "candidateUrl": "http://kimgarciameza.org/"
    },
    {
     "name": "Matt Haney",
     "party": "Non-Partisan",
     "candidateUrl": "http://www.haneyforschoolboard.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/pages/Matt-Haney/106232212845446"
      }
     ]
    },
    {
     "name": "Victoria Lo",
     "party": "Non-Partisan",
     "candidateUrl": "http://www.victorialo2012.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/victoriaplo2012?fref=ts"
      }
     ]
    },
    {
     "name": "Rachel Norton",
     "party": "Non-Partisan",
     "candidateUrl": "http://rachelnorton.com/",
     "email": "rachel@rachelnorton.com",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/rachelnortonsf"
      }
     ]
    },
    {
     "name": "Beverly Ho-A-Yun Popek",
     "party": "Non-Partisan",
     "candidateUrl": "http://www.beverlypopek.com/",
     "channels": [
      {
       "type": "Twitter",
       "id": "https://twitter.com/BeverlyPopek"
      }
     ]
    },
    {
     "name": "Paul Robertson",
     "party": "Non-Partisan",
     "candidateUrl": "http://paulrobertson2012.com/",
     "email": "paulrobertson@reagan.com",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/pages/Paul-Robertson-for-San-Francisco-Board-of-Education/361185107309895?fref=ts"
      }
     ]
    },
    {
     "name": "Sam Rodriguez",
     "party": "Non-Partisan",
     "candidateUrl": "http://www.sam4schoolboard.com/"
    },
    {
     "name": "Gladys Soto",
     "party": "Non-Partisan",
     "candidateUrl": "http://www.gladyssoto2012.org/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/gladyssotosf"
      }
     ]
    },
    {
     "name": "Shamann Walton",
     "party": "Non-Partisan",
     "candidateUrl": "http://www.shamannwalton4sfboardofeducation.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/pages/Shamann-Walton-4-SF-Board-of-Education/362597400470914"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/Walton4SFBOE"
      }
     ]
    },
    {
     "name": "Jill Wynns",
     "party": "Non-Partisan",
     "candidateUrl": "http://jillwynns.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/pages/Jill-Wynns-for-School-Board/392360627497197"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/JillWynns"
      }
     ]
    }
   ],
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 30",
   "referendumSubtitle": "Temporary taxes to fund education. Guaranteed local public safety funding. Initiative constitutional amendment.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 33",
   "referendumSubtitle": "Auto insurance companies. Prices based on drivers history of insurance coverage. Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 37",
   "referendumSubtitle": "Genetically engineered foods.  Labeling. Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "General",
   "office": "United States Senator",
   "level": "federal",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "candidates": [
    {
     "name": "Dianne Feinstein",
     "party": "Democratic",
     "candidateUrl": "http://www.diannefeinstein2012.com/splash/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/DianneFeinstein?ref=stream"
      }
     ]
    },
    {
     "name": "Elizabeth Emken",
     "party": "Republican",
     "candidateUrl": "http://www.emken2012.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/emken2012?ref=ts"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/elizabethemken"
      }
     ]
    }
   ],
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 40",
   "referendumSubtitle": "Redistricting. State senate districts. Referendum.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 39",
   "referendumSubtitle": "Tax treatment for multistate businesses. Clean energy and energy efficiency funding. Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 35",
   "referendumSubtitle": "Human trafficking. Penalties. Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 38",
   "referendumSubtitle": "Tax to fund education and early childhood programs.  Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "General",
   "office": "President & Vice President",
   "level": "federal",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "candidates": [
    {
     "name": "Barack Obama & Joe Biden",
     "party": "Democratic",
     "candidateUrl": "http://www.barackobama.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "http://www.facebook.com/barackobama"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/obama2012"
      },
      {
       "type": "GooglePlus",
       "id": "https://plus.google.com/u/0/110031535020051778989/posts"
      },
      {
       "type": "YouTube",
       "id": "http://www.youtube.com/user/BarackObamadotcom"
      }
     ]
    },
    {
     "name": "Mitt Romney & Paul Ryan",
     "party": "Republican",
     "candidateUrl": "http://www.mittromney.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/mittromney"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/MittRomney"
      },
      {
       "type": "GooglePlus",
       "id": "https://plus.google.com/+MittRomney/posts"
      },
      {
       "type": "YouTube",
       "id": "http://www.youtube.com/user/mittromney"
      }
     ]
    },
    {
     "name": "Gary Johnson & James P. Gray",
     "party": "Libertarian",
     "candidateUrl": "http://www.garyjohnson2012.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "http://www.facebook.com/govgaryjohnson"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/govgaryjohnson"
      },
      {
       "type": "GooglePlus",
       "id": "https://plus.google.com/+GovGaryJohnson/posts"
      },
      {
       "type": "YouTube",
       "id": "http://www.youtube.com/user/govgaryjohnson"
      }
     ]
    },
    {
     "name": "Jill Stein & Cheri Honkala",
     "party": "Green",
     "candidateUrl": "http://www.jillstein.org/",
     "channels": [
      {
       "type": "Facebook",
       "id": "http://www.facebook.com/drjillstein"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/jillstein2012"
      },
      {
       "type": "GooglePlus",
       "id": "https://plus.google.com/109196677270230251313/posts"
      },
      {
       "type": "YouTube",
       "id": "http://www.youtube.com/user/drjillstein"
      }
     ]
    },
    {
     "name": "Roseanne Barr & Cindy Sheehan",
     "party": "Peace and Freedom",
     "candidateUrl": "http://www.roseanneforpresident2012.org/",
     "channels": [
      {
       "type": "Twitter",
       "id": "https://twitter.com/barrsheehan2012"
      },
      {
       "type": "GooglePlus",
       "id": "https://plus.google.com/u/0/100971862256199688548/posts"
      },
      {
       "type": "YouTube",
       "id": "http://www.youtube.com/user/RoseanneForPresident"
      }
     ]
    },
    {
     "name": "Thomas Hoefling & Robert Ornelas",
     "party": "American Independent",
     "candidateUrl": "http://www.tomhoefling.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "http://www.facebook.com/pages/Tom-Hoefling/123879220975254"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/TomHoefling"
      }
     ]
    }
   ],
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 36",
   "referendumSubtitle": "Three strikes law.  Repeat felony offenders.  Penalties.  Initiative statute",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 32",
   "referendumSubtitle": "Political contributions by payroll deduction. Contributions to candidates. Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 31",
   "referendumSubtitle": "State budget. State and local government. Initiative constitutional amendment and statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "Referendum",
   "district": {
    "name": "California",
    "scope": "statewide",
    "id": "06ca"
   },
   "referendumTitle": "Proposition 34",
   "referendumSubtitle": "Death penalty. Initiative statute.",
   "referendumUrl": "http://vig.cdn.sos.ca.gov/2012/general/pdf/complete-vig-v2.pdf",
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "General",
   "office": "State Senator - District 11",
   "level": "state",
   "district": {
    "name": "",
    "scope": "stateUpper",
    "id": "06011"
   },
   "candidates": [
    {
     "name": "Mark Leno",
     "party": "Democratic",
     "candidateUrl": "http://www.markleno.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "http://www.facebook.com/pages/mark-leno/31346077285"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/markleno"
      }
     ]
    },
    {
     "name": "Harmeet K. Dhillon",
     "party": "Republican",
     "candidateUrl": "http://www.dhillon2012.com/",
     "email": "info@dhillon2012.com",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/DhillonSenate2012?fref=ts"
      }
     ]
    }
   ],
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "General",
   "office": "State Assembly Member - District 17",
   "level": "state",
   "district": {
    "name": "",
    "scope": "stateLower",
    "id": "06017"
   },
   "candidates": [
    {
     "name": "Tom Ammiano",
     "party": "Democratic",
     "candidateUrl": "http://www.tomammiano.com/"
    },
    {
     "name": "Jason P. Clark",
     "party": "Republican",
     "candidateUrl": "http://www.jasonclark2012.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "http://www.facebook.com/jasonclark2012"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/jasonclark2012"
      }
     ]
    }
   ],
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  },
  {
   "type": "General",
   "office": "United States Representative - District 12",
   "level": "federal",
   "district": {
    "name": "",
    "scope": "congressional",
    "id": "06012"
   },
   "candidates": [
    {
     "name": "Nancy Pelosi",
     "party": "Democratic",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/NancyPelosi"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/NancyPelosi"
      }
     ]
    },
    {
     "name": "John Dennis",
     "party": "Republican",
     "candidateUrl": "http://www.johndennis2012.com/",
     "channels": [
      {
       "type": "Facebook",
       "id": "https://www.facebook.com/johndennis2010"
      },
      {
       "type": "Twitter",
       "id": "https://twitter.com/johndennis2012/"
      }
     ]
    }
   ],
   "sources": [
    {
     "name": "Ballot Information Project",
     "official": false
    }
   ]
  }
 ],
 "state": [
  {
   "name": "California",
   "electionAdministrationBody": {
    "name": "\"California Secretary of State, Elections Division\"",
    "electionInfoUrl": "http://www.sos.ca.gov/elections/",
    "electionRegistrationUrl": "http://www.sos.ca.gov/elections/elections_vr.htm",
    "electionRegistrationConfirmationUrl": "http://www.sos.ca.gov/elections/elections_vr.htm",
    "absenteeVotingInfoUrl": "http://www.sos.ca.gov/elections/elections_m.htm",
    "votingLocationFinderUrl": "http://www.sos.ca.gov/elections/find-polling-place.htm",
    "ballotInfoUrl": "http://www.sos.ca.gov/elections/2012-elections/nov-general/",
    "electionRulesUrl": "http://www.sos.ca.gov/elections/2012-elections/nov-general/",
    "correspondenceAddress": {
     "line1": "1500 11th St",
     "city": "Sacramento",
     "state": "California",
     "zip": "95814-5701"
    }
   },
   "local_jurisdiction": {
    "name": "San Francisco",
    "electionAdministrationBody": {
     "name": "Director of Elections",
     "electionInfoUrl": "http://www.sfgov2.org/index.aspx?page=599",
     "hoursOfOperation": "8:00 a.m. - 5:00 p.m.",
     "correspondenceAddress": {
      "line1": "",
      "city": "",
      "state": "CA",
      "zip": ""
     },
     "physicalAddress": {
      "line1": "City Hall - 1 Dr. Carlton B Goodlett Place, Room 48",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94102-4635"
     },
     "electionOfficials": [
      {
       "name": "John Arntz",
       "title": "Director of Elections",
       "officePhoneNumber": "(415) 554-4375",
       "faxNumber": "(415) 554-7344",
       "emailAddress": "sfvote@sfgov.org"
      }
     ]
    },
    "sources": [
     {
      "name": "TurboVote",
      "official": false
     }
    ]
   },
   "sources": [
    {
     "name": "TurboVote",
     "official": false
    }
   ]
  }
 ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment