Skip to content

Instantly share code, notes, and snippets.

@DenisCarriere
Last active August 29, 2015 14:12
Show Gist options
  • Save DenisCarriere/cc7974c352b9911c3ed7 to your computer and use it in GitHub Desktop.
Save DenisCarriere/cc7974c352b9911c3ed7 to your computer and use it in GitHub Desktop.
Using OpenCage Geocoder with Python
# To Install:
# $ pip install geocoder
>>> import geocoder
>>> g = geocoder.opencage("New York City", key="YOUR API KEY")
>>> g.latlng
[40.7305991, -73.9865812]
>>> g.json
{"status": "OK", "locality": "New York City", ...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment