Explore Our products
Geocoding Api for forward and reverse search
Explore our products without registration or api key.
Quickstart
Play with our demo app for a little understanding.
Apis Available
Forward Geocoding
Two options are mandatory in the forward geocoding- the q parameter and api parameter
Reverse Geocoding
Three options are mandatory in the reverse geocoding- the lat parameter and lng parameter and api parameter
Request Format
Request format can be required types as well as optional types.This section discusses all of them elaborately.
Forward Geocoding
Required parameters
Optional Parameters
Reverse Geocoding
Required parameters
Optional Parameters
Response Format
Listed below are the general response formats for forward and reverse geocoding queries.
Response forward geocode
This is a json response of a forward geocode query.
{ "results": [ { "class": "tourism", "type": "attraction", "address_components": { "name": "Empire State Building", "island": "Manhattan Island", "neighbourhood": "Midtown South", "street": "5th Avenue", "subdistrict": "Manhattan", "district": "New York County", "city": "New York City", "state": "New York", "postcode": "10018", "country": "United States Of America" }, "formatted_address": "Empire State Building,Manhattan Island,Midtown South,5th Avenue,New York County,New York City,10018,United States Of America", "geometry": { "location": { "lat": "40.74843124430164", "lng": "-73.9856567114413" }, "viewport": { "northeast": { "lat": "40.747922600363026", "lng": "-73.9864855" }, "southwest": { "lat": "40.74894220036315", "lng": "-73.98482589999999" } } }, "osmurl": "https://www.openstreetmap.org/search?query=40.74843124430164%2C-73.9856567114413#map=17/40.74843124430164/-73.9856567114413", } ], "credits": "https://geokeo.com/credits.php", "status": "ok" }
This is a general response where parameters and explanation are listed below
Response Reverse Format
This is a json response of a reverse geocode query.
{ "results": [ { "class": "office", "type": "yes", "address_components": { "name": "Empire State Building", "island": "Manhattan Island", "street": "5th Avenue", "neighbourhood": "Midtown South", "subdistrict": "Manhattan", "district": "New York County", "city": "New York City", "state": "New York", "postcode": "10018", "country": "United States Of America" }, "formatted_address": "Empire State Building,Manhattan Island,5th Avenue,Midtown South,New York County,New York City,10018,United States Of America", "geometry": { "location": { "lat": "40.74843124430164", "lng": "-73.9856567114413" }, "viewport": { "northeast": { "lat": "40.747922600363026", "lng": "-73.9864855" }, "southwest": { "lat": "40.74894220036315", "lng": "-73.98482589999999" } } }, "osmurl": "https://www.openstreetmap.org/search?query=40.74843124430164%2C-73.9856567114413#map=17/40.74843124430164/-73.9856567114413", "distance": "0.0010302984507433km" } ], "credits": "https://geokeo.com/credits.php", "status": "ok" }
This is a general response where parameters and explanation are listed below
Response Codes
The response codes are available in status variable.If status is ok it means results are found without any error.For all other codes. There may be some issue which is listed below as per code.
Rate Limit
We have free as plan for starters and paid plans for bigger business.
Free Plan
The free plan has daily 2500 api limit which refresh at midnight(24:00) UTC.
Paid Plan
Paid plans are available as subscription model.Details of pricing are available here
Paid plans come in all size and dont have a hard limit but can except a rate limit at around 30% more than their daily quota and they also refresh at midnight (24:00) UTC.
If you want custom limits which are more than our listed limits in subscription feel free to
Customers can cancel subscription with just one click in dashboard->accounts->manage billing. Customers are also able to change card details etc through this page.
Ranking Results
Results are ranked according to relevance and importance. Results like places are more important than amenities etc thus ranked higher.Ranking depends on various factors like country, size etc.
Caching Policy
Caching Policy is very generous and you can store the results as long as you want.The stored results can be used anywhere as per your requirements.
Ip Restrictions
Ip restrictions can be set through dashboard->api->settings. Restrictions can be set such that only request from one ip address is allowed. This can be beneficial to restrict unwanted usage.
Http Restrictions
Http restrictions can be set through dashboard->api->settings. Http restrictions can restrict usage from one domain only. Our servers check for header "Access-Control-Allow-Origin" in your request and only executes if the "Access-Control-Allow-Origin" matches your preset domain.Kindly note this parameter can be set through many ways does cannot be relied upon for restrictions.
Privacy Policy
Email address, billing address, name of the customers are stored and passwords are only stored in one way encrypted form which cannot be re engineered to find the orginal unhashed password. The query requests are not stored. Ip address of queries without api keys are stored to reduce abuse and rate limit ips.
Python Implementation
This is a sample python code for single result fetch.
import requests url = 'https://geokeo.com/geocode/v1/search.php?q=empire+state+building&api=YOUR_API_KEY' resp = requests.get(url=url) data = resp.json() if 'status' in data: if data['status']=='ok': address=data['results'][0]['formatted_address'] latitude=data['results'][0]['geometry']['location']['lat'] longitude=data['results'][0]['geometry']['location']['lng'] #do something with the data
Php Implementation
This is a sample code implementation in PHP for single data fetch.
<?php $url = "https://geokeo.com/geocode/v1/search.php?q=empire+state+building&api=YOUR_API_KEY"; //call api $json = file_get_contents($url); $json = json_decode($json); if(array_key_exists('status',$json)) { if($json->status=='ok') { $address = $json->results[0]->formatted_address; $latitude = $json->results[0]->geometry->location->lat; $longitude = $json->results[0]->geometry->location->lng; //do something with the data } } ?>
Java Implementation
import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import org.json.*; class geocode{ public static void main (String args[]) throws Exception{ String url = "https://geokeo.com/geocode/v1/search.php?q=empire+state+building&api=YOUR_API_KEY"; HttpURLConnection httpClient = (HttpURLConnection) new URL(url).openConnection(); httpClient.setRequestMethod("GET"); int responseCode = httpClient.getResponseCode(); try (BufferedReader in = new BufferedReader( new InputStreamReader(httpClient.getInputStream()))) { StringBuilder response = new StringBuilder(); String line; while ((line = in.readLine()) != null) { response.append(line); } JSONObject data = new JSONObject(response.toString()); String status = data.get("status").toString(); if(status.equals("ok")) { String latitude = Double.toString(data.getJSONArray("results").getJSONObject(0).getJSONObject("geometry").getJSONObject("location").getDouble("lat")); String longitude = Double.toString(data.getJSONArray("results").getJSONObject(0).getJSONObject("geometry").getJSONObject("location").getDouble("lng")); String address = data.getJSONArray("results").getJSONObject(0).get("formatted_address").toString(); //do something with the data } } } }
Command line Implementation
curl 'https://geokeo.com/geocode/v1/search.php?q=empire+state+building&api=YOUR_API_KEY'
Jquery Implementation
<script> $.get("https://geokeo.com/geocode/v1/search.php", { q: 'empire+state+building', api: 'YOUR_API_KEY' }, function(data,status){ var r=data; if(r.status=='ok') { address=r.results[0].formatted_address; lat=r.results[0].geometry.location.lat; lon=r.results[0].geometry.location.lng; //do something eith the data } }); </script>
Nodejs Implementation
var request = require("request") var url = 'https://geokeo.com/geocode/v1/search.php?q=empire+state+building&api=YOUR_API_KEY'; request({ url: url, json: true }, function (error, response, body) { if (!error && response.statusCode === 200) { if(body.status=='ok') { var address=body.results[0].formatted_address; var lat=body.results[0].geometry.location.lat; var lng=body.results[0].geometry.location.lng; //do something with the data } } })
Ruby Implementation
require 'net/http' require 'json' url = 'https://geokeo.com/geocode/v1/search.php?q=empire+state+building&api=YOUR_API_KEY' uri = URI(url) response = Net::HTTP.get(uri) data=JSON.parse(response) if data["status"]=="ok" address=data["results"][0]["formatted_address"] latitude=data["results"][0]["geometry"]["location"]["lat"] lng=data["results"][0]["geometry"]["location"]["lng"] #do something with the data end
Suggestions
We are very happy to receive and work on your suggestions. Please free to suggest anything through our contact us page.