Search API
The Search API allows spatial searches on hosted data utilizing the MapQuest Data Manager and remote data. It can help answer questions such as, "Which coffee shops are within a 5-minute drive from my house?" or "Which data points fall within a particular zip code?".
Types of Searching
Radius Search
A radius search returns results that are within a given distance of an origin. An origin can be defined as latitude and longitude coordinates or a street address, while a radius can be defined in terms of units and size.
Method | Docs Link |
---|---|
GET | /search/v2/radius |
POST | /search/v2/radius |
Rectangle Search
A rectangle search will return results that are within a specific bounding box (rectangle). The rectangle is formed by defining upper left and lower right points.
Method | Docs Link |
---|---|
GET | /search/v2/rectangle |
POST | /search/v2/rectangle |
Polygon Search
A polygon search will return results that are within a custom polygon shape. The polygon is defined by a series of points (coordinates) that end with its starting point.
Method | Docs Link |
---|---|
GET | /search/v2/polygon |
POST | /search/v2/polygon |
Corridor Search
A corridor search will return results that fall within a specified distance of a line (i.e. a route) where the line is formed by a series of points.
Method | Docs Link |
---|---|
GET | /search/v2/corridor |
POST | /search/v2/corridor |
Base Search
A base search is a free-form search that can handle any of the above searches, although it is missing some of the convenience functionality exposed in other searches.
Method | Docs Link |
---|---|
GET | /search/v2/search |
POST | /search/v2/search |
Record Info Search
A record info search performs a lookup on hosted data items using a specific record ID.
Method | Docs Link |
---|---|
GET | /search/v2/recordinfo |
POST | /search/v2/recordinfo |
Types of Data to Search
Now that we've talked about the types of searching available with the Search API, let's talk about data that can be searched.
Hosted Data
The MapQuest Data Manager is essentially a large database hosted by MapQuest. MapQuest hosts multiple data tables that are available to search through the Search API. In addition to the MapQuest-hosted tables, you can also upload your own data to Data Manager, and we'll host the data for you. Refer to the Hosted Data documentation for more detail about how to search Data Manager tables.
Remote Data
Remote data simply refers to user-defined points or geometry that is sent in with a search request. Refer to the Remote Data documentation for more detail.
Mixing Data Sources
It is also possible to mix data sources when using the Search API. The following example uses all of the previously mentioned data sources together in one request.