While there is no search module in the API, you may take advantage of all the search features by calling the Search API Web Service directly. This will enable you to search and display data from MapQuest's hosted data or your own custom data tables.

To learn more about shape collections used to display the POI results, see the Collections page. If you're interested in further customizing the POIs, see the POIs and InfoWindows page.

Below are several samples using jQuery to make service calls.

Radius Search Using Hosted Data

The following example makes an Ajax request to the Search API Web Service and does a radius search of the mqap.ntpois table, which is a table that contains Points of Interest. The map is then initialized with the shape collection.

For additional details and parameters that are unique to a Radius Search, please refer to the Radius Search Developer's Guide.

A complete list of available icons, including numbered icons, are available on the Static Map Standard Icons page.






Search by Drive Distance

The following example searches for museums closest to downtown Denver based on their driving distance and adds the shape collection after the map has been initialized. The hostedData being searched is mqap.ntpois a freely accessible POI table for anyone with a MapQuest Developer Account. 

Additional unit types such as driving minutes and walking minutes are detailed in the Driving/Walking Time Search section.

Note: If no hostedData is specified, the table searched will automatically default to mqap.ntpois.






Corridor Search Using the Directions API

Nothing is stopping you from making multiple service calls. In the following example, we make a request to the Directions API Web Service using JSON and run a corridor search for nearby hotels using the route's Session ID. The Session ID acts as a unique identifier which stores the route as you execute your search.

Additional methods and search parameters are described in the Corridor Search Developer's Guide.

Similar to the previous example, we search for hotels using the mqap.ntpois database where millions of POIs are defined by category and made readily available.

Note: If no hostedData is specified, the table searched will automatically default to mqap.ntpois.