Here's an example searching for Avis
breaking it down
http://www.mapquestapi.com/
The base URL
/radius?
The search type - this example is radius - there are others like polygon & corridor
key=<YOUR_KEY_HERE>
Replace this with your key here
&origin=1015%20museum%
your origin for a radius search can be:
- an address
- an IP address (eg: origin=192.168.0.0.1)
- a Lat,Lng coordinate (eg: origin=40,123,-74.123)
&radius=30
radius in miles
&hostedData=mqap.ntpois%
The dataset to search, plus your "filter" search fragment - this is what makes it work how you want:
decoded string, broken down:
&hostedData=mqap.ntpois - this is the table name to search.
Schema is here: http://www.mapquestapi.com/
|name ilike ?|avis% - notice the pipe separators. This is the FIELD to filter on, the sql character to use, then a question mark. the question mark is filled in with the value on the other side of the next pipe.
so - &hostedData=mqap.ntpois|name ilike ?|avis%
translates to "select from mqap.ntpois where name ilike 'avis%'
&maxMatches=25
maximum results to return
&ambiguities=ignore
this is only needed if using an address as an origin - this tells it to ignore any ambiguous geocode results and just use the first geocode result as the origin (otherwise, if there are ambiguities, the search will stop)
Comments