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.
Security Type¶
This APIs follow OAuth2 based security. To know more on how to create your authorization tokens, please use our authorization token URL. More details available here
Request Headers¶
The API leverages OAuth 2.0 based security. Hence, the developer would need to send a request for access token using their client_id and client_secret to the OAuth API. Once validated from the OAuth API, the access_token and the token_type need to be sent as Authorization header with the value: “{token_type} {access_token}”.
Authorization: “token_type access_token”
.
Input Method¶
GET
Input URL¶
https://atlas.mappls.com/api/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://atlas.mappls.com/api/places/textsearch/json?query=okhla phase 3®ion=ind&filter=pin:110020
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!