
The Local Search Web Service allows you to search the Internet for businesses near a specified location. Also, check out our newest Yahoo! Local Search API, the Local Search API V2, which now returns latitude-longitude and Yahoo! user ratings of each establishment.
The Local Search service is discussed on the yws-search-general mailing list.
http://local.yahooapis.com/LocalSearchService/V1/localSearch
See information on constructing REST queries
| Parameter | Value | Description |
|---|---|---|
| appid | string (required) | The application ID. See Application IDs for more information. |
| query | string (required) | The query to search for. |
| results | integer: default 10, max 20 | The number of results to return. |
| start | integer: default 1 | The starting result position to return (1-based). |
| sort | relevance (default), title, distance, or rating | Sorts the results by the chosen criteria. |
| radius | float | How far (in miles) from the specified location to search for the query terms. The default radius varies according to the location given. |
| street | string | Street name. The number is optional. |
| city | string | City name. |
| state | string | The United States state. You can spell out the full state name or you can use the two-letter abbreviation. |
| zip | integer or <integer>-<integer> | The five-digit zip code, or the five-digit code plus four-digit extension. If this location contradicts the city and state specified, the zip code will be used for determining the location and the city and state will be ignored. |
| location | free text |
This free field lets users enter any of the following:
If location is specified, it will take priority over the individual fields in determining the location for the query. City, state and zip will be ignored. |
| latitude | float: -90 to 90 | The latitude of the starting location. |
| longitude | float: -180 to 180 | The longitude of the starting location. If both latitude and longitude are specified, they will take priority over all other location data. If only one of latitude or longitude is specified, both will be ignored. |
Sample Request Url: http://local.yahooapis.com/LocalSearchService/V1/localSearch?appid=YahooDemo&query=pizza&zip=94306&results=2
The schema document for this service response is located at http://local.yahooapis.com/LocalSearchService/V1/LocalSearchRepsonse.xsd
| Field | Description |
|---|---|
| ResultSetMapUrl | The URL of a webpage containing a map graphic with all returned results plotted on it. |
| ResultSet | Contains all of the query responses. |
| Result | Contains each individual response. |
| totalResultsAvailable | The number of query matches in the database. |
| totalResultsReturned | The number of query matches returned. This may be lower than the number of results requested if there were fewer total results available. |
| firstResultPosition | The position of the first result in the overall search. |
| Title | Name of the result. |
| Address | Street address of the result. |
| City | City in which the result is located. |
| State | State in which the result is located. |
| Phone | Phone number of the business, if known. |
| Rating | End-user ratings for the business or service. |
| Distance |
The distance as calculated by one of the following methods:
|
| Url | The URL to the detailed page for a business. |
| ClickUrl | The URL for linking to the detailed page for a business. See URL linking for more information. |
| MapUrl | The URL of a map for the address. |
| BusinessUrl | The URL of the businesses website, if known. |
| BusinessClickUrl | The URL for linking to the businesses website if known. See URL linking for more information. |
The following is a sample response for the query pizza in zip code 94306:
The Local Search service is limited to 5,000 queries per IP address per day. See information on rate limiting.
The Local Search service returns the standard errors. There are no service-specific errors.
Copyright © 2008 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings