Yahoo! Local API Adds “Search Along A Driving Route” Functionality

Today we are releasing a new version of the Yahoo! Local API (V3), that gives developers a key new feature – the ability to search for convenient points of interest for a given user defined route. For example, as you are driving from San Francisco to Sacramento, you could search for a Starbucks or for a hardware store. This new API functionality is already in use by our partner, Dash Navigation, who announced its availability for their Internet-connected GPS navigation system on June 30.

To make this new feature possible, we have added a new API parameter, “route”, that is a series of latitude/longitude coordinates. The first pair of coordinates is the starting point, and the final pair of coordinates is the ending point. The value of the route parameter is defined as follows:

lat1 long1,lat2 long2,...,latn longn

Here is an example of a simple route from San Francisco’s Fisherman’s Wharf to the Ferry Building. Note that latitudes and longitudes are separated by spaces.

37.80971 -122.41025,37.80831 -122.41018,37.79456 -122.39320

A route is limited to 100 coordinates or 100 miles. Routes having more than 100 coordinates or longer than 100 miles will return an error status.

Selection of coordinates for the route will affect results. Pick ones that both define the path of travel and where you want to find points of interest. For example, you could include freeway off-ramps or major intersections. To cause a location on or near a route to get preference, you can specify a location in addition to the route.

This feature was a hack that Ron Gutman, Marvin Lam, and I first conceived of during our Q1 Local Hack Event, which is an extension of the broader Yahoo! Hack Program. Since then, we've been able to put the finishing touches on it and hope you can put it to good use!

George Perry
Yahoo! Local