code for accessing the OpenCage Geocoding API in MATLAB
Learn more about the OpenCage Geocoding API on their website where you can also register for an API key. If you need more requests than the free trial allows you can become a customer.
This code contains two different methods, one for forward geocoding (adddress to coordinates) and one for reverse geocoding (coordinates to address). There is a tutorial for using the methods on the OpenCage site.
This code was originally written by Alexander Dentler and has been uploaded here and open-sourced with his permission. All improvements or patches are very welcome.
There are also libraries to access the OpenCage API in many other languages including R, Stata, Python, ...