Skip to content

Instantly share code, notes, and snippets.

@tylerpearson
Last active August 29, 2015 13:57
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 tylerpearson/9467444 to your computer and use it in GitHub Desktop.
Save tylerpearson/9467444 to your computer and use it in GitHub Desktop.
Google Civic Info API with jQuery
$.ajax({
type: "POST",
url: "https://www.googleapis.com/civicinfo/us_v1/representatives/lookup?key=AIzaSyCcn1YcPE4Ja0tsYVb0oRxMxK4xTTjXRck",
data: JSON.stringify({'address': '1263 Pacific Ave. Kansas City KS'}),
dataType: "json",
contentType: "application/json; charset=utf-8"
}).done(function(data) {
alert("it worked");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment