A simple HTTP/HTTPS API that accepts a location (or text containing locations) and returns results as JSON, GeoJSON, XML, JSONP, or CSV. Keep your API key on the server whenever possible.
Replace YOUR_API_KEY. JSON uses json=1. XML/CSV uses geoit=xml or geoit=csv.
locate (GET or POST) to avoid “file name too long”.
Two common URL patterns for geocoding, plus scantext for geoparsing.
Forward: address/city/landmark. Reverse: lat,lon.
json=1, geojson=1, geoit=xml/geoit=csv, JSONP via callback=fn.
Pass an address-like string as the “location”. Use locate= to avoid path-length issues.
Pass coordinates as lat,lon in that order.
strictmode=1. If you want more data like timezone/elevation, try moreinfo=1.
Use scantext. POST is recommended for long text.
region=XX (ISO code) to reduce collisions.
Omit output params and the default is HTML. Otherwise choose one.
json=1 → JSON
geojson=1 → GeoJSON
geoit=xml → XML
geoit=csv → CSV
callback=fn → JSONP
https://geocode.xyz/41.3189957000,2.0746469000?json=1&auth=YOUR_API_KEY
Production integration patterns you’ll typically want.
Keep keys private; put your app in front of the API.
Append &auth=YOUR_API_KEY server-side before proxying (don’t do it in browser JS).