The Geocoding Web Service allows you to find the specific latitude and longitude for an address. You can use this service to geocode your points in advance or forego it altogether with built-in geocoding in our AJAX and Flash APIs.
This API has been deprecated (that is, no longer recommended for use by new developers). A new geocoding API called Yahoo! PlaceFinder is now available and provides more features than this API, including reverse geocoding (translating coordinates into street addresses) and WOEID support. Current developers using this API are encouraged to migrate to PlaceFinder.
See information on constructing REST queries
|appid||string (required)||The application ID. See Application IDs for more information.|
|street||string||Street name. The number is optional.|
|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.|
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.
|output||string: xml (default), php||The format for the output. If php is requested, the results will be returned in Serialized PHP format.|
The schema document for this service response is located at http://local.yahooapis.com/MapsService/V1/GeocodeResponse.xsd
|ResultSet||Contains all of the query responses.|
|Result|| Contains each individual response. More than one result may be returned
if the given address is ambiguous. Has attributes:
|Latitude||The latitude of the location.|
|Longitude||The longitude of the location.|
|Address||Street address of the result, if a specific location could be determined.|
|City||City in which the result is located.|
|State||State in which the result is located.|
|Zip||Zip code, if known.|
|Country||Country in which the result is located.|
The following is a sample response for the geocode of the Yahoo! headquarters:
The Geocoding service returns the standard errors.
The Geocoding service is limited to 5,000 queries per IP address per day. See information on rate limiting.
All Yahoo! Maps Web Services are discussed on the yws-maps mailing list.