API Information

Easy to use - Loc8 APIs can be used by any application within minutes.

  • You don't have to download or install any software on the mobile device.
  • Tightly integrate location functionality in any application with just a few lines of code.

To find the current location information, use our API, you need to pass the four mandatory LBS parameters in decimal values to get the location information. Your mobile application can easily obtain these four parameters from the mobile device using well-documented APIs published by respective device manufacturers. Sample code snippets to retrieve LBS parameters can be found here

API

Basic Query Location
To query basic location information, i.e. latitude and logitude, this is how you can invoke our API
http://loc8.in/api.php?token=<user token>&req=loc&mcc=&mnc=&lac=&cellid=

Query Location & More
To find POI (Places of Interest) at a given location, you can pass additional optional parameters as needed.
http://loc8.in/api.php?token=<user token>&req=poi&mcc=&mnc=&lac=&cellid=&cat=&subcat=&radius=
http://loc8.in/api.php?token=<user token>&req=poi&lat=&long=&cat=&subcat=&radius=

If required, you can use a single invocation to query for location and POI if required. You can pass the lat/long combination to query POI and so on.

Request Categories and Sub-categories
To request all the categories, invoke
http://loc8.in/api.php?token=<user token>&req=cat
To request all the sub-categories within a category, invoke
http://loc8.in/api.php?token=<user token>&req=subcat&cat=<category name>

Generate New Token
Incase you wish to generate a new token, invoke the following API.
for http://loc8.in/api.php?token=<current token>&req=newtoken
We will generate a new token and send it to your registered email address.

In all the cases:

  • <current token> should be the token that was emailed to you when you signed-up.
  • mcc, mnc, lac and cellid values should be passed in decimal.
  • lat or long values should be specified in a.b format (for e.g. 72.13).
  • radius should be specified in decimal format in metres

Response

GeoJSON

    {
        "type":"Point",
        "coordinates":[
           12.9786, 
           77.6410
        ]
    }
    
    {
       "type":"FeatureCollection",
       "features":[
          {
             "type":"Feature",
             "geometry":{
                "type":"Point",
                "coordinates":[
                    12.9783, 
                    77.6383
                ]
             },
             "properties":{
                "type":"poi",
                "id":"7508860",
                "cat":"Restaurant",
                "subcat":"Fastfood",
                "reverseGeocode":"Indiranagar, Bengaluru, Karnataka, India",
                "name":"McDonald",
                "phone":9012345678,
                "address":"CMH Road, Indiranagar, Bengaluru, India",
             }
          }
       ]
          
      "features":[
          {
             "type":"Feature",
             "geometry":{
                "type":"Point",
                "coordinates":[
                    12.9783, 
                    77.6407
                ]
             },
             "properties":{
                "type":"poi",
                "id":"7508860",
                "cat":"Restaurants",
                "subcat":"FastFood",
                "reverseGeocode":"Indiranagar, Bengaluru, Karnataka, India",
                "name":"KFC",
                "phone":9087654321,
                "address":"CMH Road, Indiranagar, Bengaluru, India",
             }
          }
       ]
       
    }

Get Started Now!