This API gives the feature to search the desired location on the basis of keyword or name of the place. You need to type the keyword or the place you want to search.
Name | Type | Description |
---|---|---|
fm_token | String | Enter Flightmap token available in Flightmap dashboard |
text | String | Enter keyword or the name of the place you want to search |
currentlatitude | numeric | Enter current latitude |
currentlongitude | numeric | Enter current longitude |
type | String | type can be Android, iOS or Web |
radius | number | It will restrict the search results within the given radius(in Km). |
Note: currentlatitude and currentlongitude are required to show nearest search results first
To use the Search API, perform a GET request on the following endpoints:
https://maps.flightmap.io/api/search?fm_token=<your api key here>&text=delhi¤tlatitude=30.6965578¤tlongitude=76.8836149&radius=500
Description
Name | Type | Description |
---|---|---|
data | Array of objects | Complete information of the searched place |
name | String | Name of the place |
address | String | Address of the place |
position | object | Passing latitude and longitude |
lat | numeric | Latitude of the search location |
lng | numeric | Longitude of the search location |
bounds | object | Bounds of the searched place |
The Search API returns following result in a JSON format.
{
"message": "Successful",
"status": 200,
"data": [
{
"name": "Delhi",
"address": "India",
"position": {
"lat": "28.6273928",
"lng": "77.1716954"
},
"bounds": {
"min_lat": "28.404625",
"min_lng": "28.8834464",
"max_lat": "76.8388351",
"max_lng": "77.3463006"
},
"lat": 28.6273928,
"lng": 77.1716954
},
{
"name": "Delhi",
"address": "Central Delhi, Delhi, India",
"position": {
"lat": "28.6517178",
"lng": "77.2219388"
},
"bounds": {
"min_lat": "28.4917178",
"min_lng": "28.8117178",
"max_lat": "77.0619388",
"max_lng": "77.3819388"
},
"lat": 28.6517178,
"lng": 77.2219388
},
{
"name": "Delhi",
"address": "Nandubar, Maharashtra, India",
"position": {
"lat": "21.5766266",
"lng": "73.934463"
},
"bounds": {
"min_lat": "21.4584209",
"min_lng": "21.6565955",
"max_lat": "73.9133997",
"max_lng": "73.9519009"
},
"lat": 21.5766266,
"lng": 73.934463
}
]
}