Command line Geocoding Tutorial

Using the OpenCage Geocoding API from the command line

The API is is accessed via an HTTP GET request with a few parameters. There is no need to set any headers or cookies.


$ curl ',-46.8374628&pretty=1&key=YOUR-API-KEY'


$ http GET q==-23.5373732,-46.8374628 pretty==1 key==YOUR-API-KEY


$ WGET ',-46.8374628&pretty=1&key=YOUR-API-KEY' -O results.json

Further Reading

Start your free trial

2,500 geocoding API requests per day.

No credit card required.