API

LocationBox API

POI Search

POI Search Service gives information about POI location based on criterias which you can find below.

A POI Search request must look like this:

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearch&Typ=output_format&Latitude=latitude&Longitude=longitude
&Radius=radius&Category=category&Keyword=keyword&AttributeWhereClause=where_clause
&AttributeOrderName=Attribute_Name&AttributeOrderType=Attribute_Order


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (Geocode)
Typ: Response format. (XML or JSON)
Latitude: Latitude value of POI.
Longitude: Longitude value of POI.
Radius: The radius of the area bounding the search results.
Category: CategoryList specification of POI.
Brand: BrandList specification of POI.
Keyword (optional): Add a keyword to narrow down POI Search results.
AttributeWhereClause (optional): You can give where condition your POI which you what to search.
AttributeOrderName (optional): Order by AttributeName value.
AttributeOrderType (optional): You can select DESC or ASC order to your result.

Response Parameters


XML Response

POI Search response returns in XML format when the Typ parameter is set as "XML".

Below is an example for a POI Search request which is expected to return a response in XML format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearch&Typ=XML&Latitude=40.93351&Longitude=29.13095&Radius=8000&Category=ECZANE&Keyword=AYA

The response will be as following:

<response>
 <transactionid>LBS_196</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <poilist>
  <poi>
   <id>34200045184</id>
   <name>HAYAT ECZANESİ</name>
   <address>ALTAYÇEŞME MAH. PALMİYE SOKAK NO: 31 MALTEPE İSTANBUL</address>
   <phone>+902163712489</phone>
   <latitude>40.93468</latitude>
   <longitude>29.129</longitude>
   <distance>209</distance>
  </poi>

   ...

  <poi>
   <id>34200044821</id>
   <name>KADIKÖY HAYAT ECZANESİ</name>
   <address>CAFERAĞA MAH. MİRALAY NAZIM SOKAK NO: 7 KADIKÖY İSTANBUL</address>
   <phone>+902163457646</phone>
   <latitude>40.98831</latitude>
   <longitude>29.02804</longitude>
   <distance>10587</distance>
  </poi>
 </poilist>
</response>

JSON Response

POI Search response returns in JSON format when the Typ parameter is set as "JSON".

Below is an example for a POI Search request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearch&Typ=JSON&Latitude=40.93351&Longitude=29.13095&Radius=8000&Category=ECZANE&Keyword=AYA

The response will be as following:


{ transactionid: LBS_198, status: 0, poilist: [ { id: 34200045184, name: 'HAYAT ECZANESİ', address: 'ALTAYÇEŞME MAH. PALMİYE SOKAK NO: 31 MALTEPE İSTANBUL', phone: '+902163712489', latitude: 40.93468, longitude: 29.129, distance: 209 },
...
{ id: 34200044821, name: 'KADIKÖY HAYAT ECZANESİ', address: 'CAFERAĞA MAH. MİRALAY NAZIM SOKAK NO: 7 KADIKÖY İSTANBUL', phone: '+902163457646', latitude: 40.98831, longitude: 29.02804, distance: 10587 } ] }


transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response format. (XML or JSON)

Status Codes
0 -- Success
1 -- Fail

errno: Error code
errdesc: Error definition

Error Codes
10001 Error processing your request. Please try again soon.
Cmd parameter is misspelled/not found.
10011 Error processing your request. Please check the Cmd parameter.
Cmd is not specified.
10012 Error processing your request. Please check the Key parameter.
Key is not specified.
10013 Error processing your request. Please check the Key parameter.
Key is invalid.
20012 No data found.

Poi Search With Extent


Request Parameters


Key: LocationBox user key. (Register for user key)
Cmd: LocationBox service name. (PoiSearchWithExtent)
Typ: Response format. (XML or JSON)
MinLatitude: Minimum Latitude value of the extent.
MinLongitude: Minimum Longitude value of the extent.
MaxLatitude: Maximum Latitude value of the extent.
MaxLongitude: Maximum Longitude value of the extent.
Category: Category specification of POI.
Brand: Brand specification of POI.
Keyword (optional): Add a keyword to narrow down POI Search results.
AttributeWhereClause (optional): You can give where condition your POI which you what to search.
AttributeOrderName (optional): Order by AttributeName value.
AttributeOrderType (optional): You can select descended or ascended order to your result.


XML Response

PoiSearchWithExtent response returns in XML format when the Typ parameter is set as "XML".

Below is an example for an address element (poisearchwithextent) request which is expected to return a response in XML format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchWithExtent&Typ=XML&MinLatitude=40.357822&MinLongitude=28.521057&
MaxLatitude=41.327673&MaxLongitude=30.034842&Category=MARKET


The response will be as following:


<response>
 <transactionid>LBS_196</transactionid>
 <status>0</status>
 <errno />
 <errdesc />
 <poilist>
  <poi>
   <id>34200202680</id>
   <name>GÜNER MARKET</name>
   <address>EVLÝYA ÇELEBÝ MAH. BOÐA SOKAK NO: 14/A TUZLA ÝSTANBUL</address>
   <phone>+90 555 4712097</phone>
   <latitude>4537951</latitude>
   <longitude>472872</longitude>
   <distance>805</distance>
  </poi>

   ...

  <poi>
   <id>34200202926</id>
   <name>HAKMAR EKSPRES</name>
   <address>YAYLA MAH. ÞÝNASÝ DURAL CADDESÝ NO: 35/A TUZLA ÝSTANBUL</address>
   <phone>+90 262 7512297</phone>
   <latitude>4537976</latitude>
   <longitude>474700</longitude>
   <distance>2425</distance>
  </poi>
 </poilist>
</response>

JSON Response

PoiSearchWithExtent response returns in JSON format when the Typ parameter is set as "JSON".

Below is an example for an POI element (PoiSearchWithExtent) request which is expected to return a response in JSON format .

http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=PoiSearchWithExtent&Typ=JSON&MinLatitude=40.357822&MinLongitude=28.521057&MaxLatitude=41.327673&
MaxLongitude=30.034842&Category=MARKET


The response will be as following:


{ transactionid: LBS_198, status: 0, poilist: [ { id: 34200202680, name: 'GÜNER MARKET', address: 'EVLÝYA ÇELEBÝ MAH. BOÐA SOKAK NO: 14/A TUZLA ÝSTANBUL', phone: '+90 555 4712097', latitude: 4537951, longitude: 472872, distance: 805 },
...
{ id: 34200044821, name: 'HAKMAR EKSPRES', address: 'YAYLA MAH. ÞÝNASÝ DURAL CADDESÝ NO: 35/A TUZLA ÝSTANBUL', phone: '+90 262 7512297', latitude: 4537976, longitude: 474700, distance: 2425 } ] }


transactionid: The id of response given by LocationBox Service. Every response can be tracked using transactionid when necessary.
status: Response format. (XML or JSON)

Status Codes
0 -- Success
1 -- Fail

errno: Error code
errdesc: Error definition

Error Codes
10001 Error processing your request. Please try again soon.
Cmd parameter is misspelled/not found.
10011 Error processing your request. Please check the Cmd parameter.
Cmd is not specified.
10012 Error processing your request. Please check the Key parameter.
Key is not specified.
10013 Error processing your request. Please check the Key parameter.
Key is invalid.
20022 City is not found.
20023 Town is not found.
20024 District is not found.