Text Search API¶
Easy To Integrate Maps & Location APIs & SDKs For Web & Mobile Applications
Powered with India's most comprehensive and robust mapping functionalities. Now Available for Srilanka, Nepal, Bhutan and Bangladesh
You can get your api key to be used in this document here: https://about.mappls.com/api/
Note¶
- The response listed in the below documentation is ONLY indicative of the overall capabilities of Mappls's Search APIs.
- Not all response parameters mentioned in the below documentation is assured to be present in all the use-cases. The response of any of the below search API is thus, dependent on the use-case agreed upon between Mappls & it's API consumer.
- For any further clarifications on what all of the response structure is available for your use case, please contact your business relationship manager or contact Mappls API support.
- PREMIUM APIs/Parameters are not available for evalulation on signup. To get access, please contact API Support.
Introduction¶
Text Search API is a service that aims to provide information about a list of places on the basis of a text string entered by the user. It uses the location information that is provided along with the query to try to understand the request. This API now supports Hindi language so you can now search queries in Hindi too.
Getting Access¶
Before using the API in the your solution, please ensure that the related access is enabled in the Mappls Console, within your app - be it for Mobile OR Web or Cloud integration.
- Copy and paste the key from your
credentials
section from your API keys into theaccess_token
query parameter.- Your static key can be secured by whitelisting its usage for particular IPs (in case of cloud app usage) OR a set of domains (in case of a web app)
- Your static key obtained from your Console is to be passed as a query parameter:
access_token
.
Authentication Object - access_token
mandatory query parameter.¶
access_token
: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".
Input Method¶
GET
Input URL¶
https://search.mappls.com/search/places/textsearch/json?
Request Parameters¶
Mandatory Parameters:¶
query
(string) e.g. FODCOF, Shoes, Coffee, Versace, Gucci, H&M, Adidas, Starbucks, B130 {POI, House Number, keyword, tag}
Optional Parameters:¶
region
(string): it takes in the country code. LKA, IND, BTN, BGD, NPL for Sri-Lanka, India, Bhutan, Bangladesh, Nepal respectively. Default is India (IND)location
{string (latitude[double],longitude[double])}: Provides the location around which the search will be performed. e.g.location=28.454,77.435
It is STRONGLY RECOMMENDED to use this parameter for accurate location biased results.filter
{filter=pin:110020}: Filter parameter helps you restrict the result by mentioning pincode. e.g.filter=pin:110020
Response Parameters¶
Multiple objects:
a. suggestedLocations ([object array])
type
(string): Type of location POI or Country or City.typeX
(integer): for internal use only.placeAddress
(string): Address of the location.eLoc
(string): Place Id of the location 6-char alphanumeric.placeName
(string): Name of the location.alternateName
(string): Alternate name of the location.keywords
(nullable [ string ] ): provides an array of matched keywords or codes.p
(long integer): for internal use only.distance
(nullable integer): for internal use only.orderIndex
(integer): the order where this result should be placedscore
(double): for internal use only.suggester
(string): for internal use only.addressTokens
(array of objects): It shows the admin details along with the house address. Address token information is NOT available in generic response; and is RESTRICTED.
b. userAddedLocations ([object array])
eLoc
(string): Place Id of the location 6-char alphanumeric.placeName
(string): Name of the location.placeAddress
(string): Address of the location.type
(string): type of location POI or Country or City (if available)orderIndex
(integer): the order where this result should be placedresultType
(string): Type of the result according to user generated content (UGC). Mostly is 'UAP'.userName
(string): The username of the person who has added this place.
Response Type¶
JSON
Response Codes¶
Success:¶
200
: To denote a successful API call.204
: To denote the API was a success but no results we’re found.
Client-Side Issues:¶
400
: Bad Request, User made an error while creating a valid request.401
: Unauthorized, Developer’s key is not allowed to send a request with restricted parameters.403
: Forbidden, Developer’s key has hit its daily/hourly limit
Server-Side Issues:¶
500
: Internal Server Error, the request caused an error in our systems.503
: Service Unavailable, during our maintenance break or server downtime.
Sample Input¶
https://search.mappls.com/search/places/textsearch/json?query=okhla phase 3®ion=ind&filter=pin:110020&access_token=hklmgbwzrxncdyavtsuojqpiefrbhqplnm
Sample Response¶
{
"suggestedLocations": [
{
"type": "POI",
"typeX": 7,
"placeAddress": "Sikandra Road, Connaught Place, New Delhi, Delhi, 110001",
"eLoc": "38FD1E",
"placeName": "Lady Irwin College",
"alternateName": "",
"keywords": [
"COMCLG"
],
"p": 3493,
"distance": 0,
"orderIndex": 1,
"score": 19905.639213316852,
"suggester": "placeName",
"addressTokens": {},
"richInfo": {}
}
],
"userAddedLocations": []
}
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!