Search APIs
In Search API we provide geocoding APIs for users to search for addresses on maps. Our Search API automatically parses addresses, intersections, and adds missing letters, and provides the most accurate results.
Main API features:
- Partial address recognition: Automatically parse addresses, and intersections, and add missing letters
- Highest Possible Accuracy: Accuracy competes with and even exceeds the accuracy of Google’s geocoding
- Quick Response
- Covers most of the world: You can get data from the API for any point on earth.
How does it work?
The Search API converts street addresses or any other human addresses to latitude and longitude coordinates. For example, Address-“1677 Easton Rd, Willow Grove, PA 19090, USA” can be converted into geographic coordinates like 40.1349979,-75.1228148 using this API.
Migration from Google Geocoding API
It is very easy to migrate from Google Geocoding API since the Geocoding API request is similar to the Google Geocoding API request format.
Parameters Required
Name | Type | Description |
---|---|---|
fm_token | String | Enter Mappr token available in Mappr 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). |
Request
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
Response
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 the 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
}
]
}
Link to API documentation: https://docs.jungleworks.com/flightmap/map/search-api
Leave A Comment?