Location API

Introduction

Location APIs allow developers to build applications that rely on a user’s location to return relevant search results using API requests. Locations are defined within this API as establishments, geographic locations, or prominent points of interest, the API also allows you to do forward and reverse geocoding. Forward Geocoding takes the text in the form of an address or place and converts it to geographic coordinates (latitude/longitude). Reverse geocoding takes geographic coordinates (latitude/longitude) and converts them into an address or place in text form.

Authentication

To authenticate to the API you need to add api-key header to your requests with an active subscription key supporting the locations APIs, you can get your keys from subscriptions page under your AMS account.

Search Location

The Location API lets you search for Location information using text string and returns a list of Locations along with summary information about each Location.

Endpoint

https://amsapis.azure-api.net/location/search

Request

{
    "SearchText":"ADCB",
    "CountryCode":"AE",
    "Page":1,
    "PageSize":2
}

Response

[
    {
        "dataSourceType": 1,
        "poiId": "1174474366",
        "englishName": "ADCB",
        "arabicName": "بنك أبوظبي التجاري",
        "placeType": "ATM",
        "phoneNumber": null,
        "fullAddress": "AL HILYAH STREET, HADBAT AL ZA'FARANAH, ABU DHABI, UNITED ARAB EMIRATES",
        "fullAddressAr": "شارع الحلية، حدبة الزعفرانة، أبوظبي، الإمارات العربية المتحدة",
        "poiType": null,
        "location": null,
        "countryCodeId": "AE",
        "lng": 54.42289,
        "lat": 24.43015
    },
    {
        "dataSourceType": 1,
        "poiId": "1174474439",
        "englishName": "ADCB",
        "arabicName": "بنك أبوظبي التجاري",
        "placeType": "ATM",
        "phoneNumber": null,
        "fullAddress": "MUYOUL STREET, AL DHAFRAH, ABU DHABI, UNITED ARAB EMIRATES",
        "fullAddressAr": "شارع ميول، الظفرة، أبوظبي، الإمارات العربية المتحدة",
        "poiType": null,
        "location": null,
        "countryCodeId": "AE",
        "lng": 54.37907,
        "lat": 24.47707
    }
]

Geocoding

Geocoding is the process of converting addresses (like “AL KHALEEJ STREET, AL MATAR, ABU DHABI, UNITED ARAB EMIRATES”) into geographic coordinates (like latitude 24.4285 and longitude 54.4634 ), which you can use to place markers on a map or position the map.

Endpoint

https://amsapis.azure-api.net/location/geoencode

Request

{
	"FullAddress":"AL KHALEEJ STREET, AL MATAR, ABU DHABI, UNITED ARAB EMIRATES",
	"Page":1,
    "PageSize":2
}

Response

[
    {
        "dataSourceType": 1,
        "countryCodeId": "AE",
        "fullAddress": "AL KHALEEJ STREET, AL MATAR, ABU DHABI, UNITED ARAB EMIRATES",
        "fullAddressAr": "شارع الخليج، المطار، أبوظبي، الإمارات العربية المتحدة",
        "lat": 24.4285,
        "lng": 54.4634
    },
    {
        "dataSourceType": 1,
        "countryCodeId": "AE",
        "fullAddress": "AL KHALEEJ STREET, AL MATAR, ABU DHABI, UNITED ARAB EMIRATES",
        "fullAddressAr": "شارع الخليج، المطار، أبوظبي، الإمارات العربية المتحدة",
        "lat": 24.42876,
        "lng": 54.46358
    }
]

Reverse Geocoding

Reverse Geocoding is the process of converting geographic coordinates into a human-readable address.

Endpoint

https://amsapis.azure-api.net/location/reverse-geoencode

Request

{
	lng:55.31193,
	lat:25.05937,
	pageSize:2,
	Page:1
}

Response

[
    {
        "dataSourceType": 1,
        "poiId": "1210318020",
        "englishName": "AUTO PRO",
        "arabicName": "اوتو برو",
        "placeType": "Auto Service & Maintenance ",
        "phoneNumber": "4-5807585",
        "fullAddress": "SHEIKH ZAYED BIN HAMDAN AL NAHYAN STREET, WADI AL SAFA 5, DUBAI, UNITED ARAB EMIRATES",
        "fullAddressAr": "شارع الشيخ زايد بن حمدان آل نهيان، وادي الصفا 5، دبي، الإمارات العربية المتحدة",
        "poiType": null,
        "location": null,
        "countryCodeId": "AE",
        "lng": 55.31125,
        "lat": 25.06393
    },
    {
        "dataSourceType": 1,
        "poiId": "1210318000",
        "englishName": "ZOOM",
        "arabicName": "زوم",
        "placeType": "Convenience Store",
        "phoneNumber": null,
        "fullAddress": "SHEIKH ZAYED BIN HAMDAN AL NAHYAN STREET, WADI AL SAFA 5, DUBAI, UNITED ARAB EMIRATES",
        "fullAddressAr": "شارع الشيخ زايد بن حمدان آل نهيان، وادي الصفا 5، دبي، الإمارات العربية المتحدة",
        "poiType": null,
        "location": null,
        "countryCodeId": "AE",
        "lng": 55.31125,
        "lat": 25.06393
    }
]

Auto Complete

it take incomplete string and return list of complete world base on locations

Endpoint

https://amsapis.azure-api.net/location/auto-complete

Request

{
	SearchText:"piz",
}

Response

[
    "pizza",
    "pizzeria",
    "pizzaro",
    "piza",
    "pizaa"
]