Skip to content

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

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.

MethodDocs Link
GET/search/v2/radius
POST/search/v2/radius

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.

MethodDocs Link
GET/search/v2/rectangle
POST/search/v2/rectangle

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.

MethodDocs Link
GET/search/v2/polygon
POST/search/v2/polygon

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.

MethodDocs Link
GET/search/v2/corridor
POST/search/v2/corridor

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.

MethodDocs Link
GET/search/v2/search
POST/search/v2/search

A record info search performs a lookup on hosted data items using a specific record ID.

MethodDocs Link
GET/search/v2/recordinfo
POST/search/v2/recordinfo

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.

https://www.mapquestapi.com/search/v2/search?key=KEY&maxMatches=10&shapePoints=40.099998,-76.305603&hostedData=mqap.ntpois||

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.

https://www.mapquestapi.com/search/v2/search?key=KEY&maxMatches=10&shapePoints=40.099998,-76.305603&remoteData=1,point,40.152837,-76.606783

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.

https://www.mapquestapi.com/search/v2/search?key=KEY&maxMatches=10&shapePoints=40.099998,-76.305603&hostedData=mqap.ntpois|group_sic_code=?|799972&remoteData=1,point,40.099998,-76.305603&remoteData=2,linestring,40.099998,-76.305603,40.199998,-76.305603,40.199998,-76.405603

Supporting Documentation