Examples

Example 4.1. XML Format

XML is the default response format. This example shows the XML response for the location "701 First Ave, Sunnyvale, CA".

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=701+First+Ave,+Sunnyvale,+CA

Response Data:


Example 4.2. JSON Format

To specify JSON format, include "J" in the flags parameter.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=San+Francisco,+CA&flags=J

Response Data:


Example 4.3. Free-form (Single-line) Input

With free-form format, the entire address is specified in a single parameter. In this example, the address is "170 South Market St., San Jose, CA".

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=170+South+Market+St.,+San+Jose,+CA

Response Data:


Example 4.4. Area of Interest Input

In this example, the area of interest is "Yosemite National Park".

Request URI:

http://yboss.yahooapis.com/geo/placefinder?name=Yosemite+National+Park

Response Data:


Example 4.5. WOEID (Where On Earth ID) Input

The woeid parameter specifies a unique ID for a geographic location. In this example, the woeid of 12797523 identifies the city Milpitas, CA.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?woeid=12797523

Response Data:


Example 4.6. Multi-line Input

In this example, the house number and street (100 Market St.) are in line1. The city and state (San Francisco, CA) are in line2.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?line1=100+Market+St.&line2=San+Francisco,+CA

Response Data:


Example 4.7. Multi-line With Cross Street Input

This example fetches information for the cross street (intersection) of "Market St at Montgomery St". Note the keyword "at" in line1, indicating a cross street.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?line1=Market+St+at+Montgomery+St&line2=San+Francisco,+CA

Response Data:


Example 4.8. Fully-parsed Input

With a fully-parsed address, each address component is in a separate parameter, so delimiters are not needed. This example returns information for the following input address: "151 3rd St San Francisco CA 94103".

Request URI:

http://yboss.yahooapis.com/geo/placefinder?house=151&street=3rd+St&postal=94103&city=San+Francisco&state=CA&country=US

Response Data:


Example 4.9. French Locale Response

This locale parameter in this example is fr_FR, indicating the French language (fr) as spoken in France (FR). The default locale is en_US (English, United States). The location parameter is specifies a point of interest, "Eiffel Tower".

Reminder: You may get diacritic or other accent marks on different languages. For example, <state>Île-de-France</state> in the response below.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=Eiffel+Tower&locale=fr_FR

Response Data:


Example 4.10. Timezone and Telephone Area Code in Response

To specify the timezone and the telphone area code, include "T" and "R", respectively, in the flags parameter.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=SFO&flags=TR

Response Data:


Example 4.11. Bounding Box in Response

To get the bounding box coordinates in the response, specify "X" in the flags parameter.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=Moscone+Center&flags=X

Response Data:


Example 4.12. Neighborhood Name and Cross Streets in Response

In this example, the gflags parameter includes "A" for the neighborhood and "C" for the cross streets.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=598+Market+Street+San+Francisco,+CA&gflags=AC

Response Data:


Example 4.13. Reverse Geocoding

To perform reverse geocoding, specify the latitude and longitude for the location parameter, and include "R" in the gflags parameter. In this example, the latitude is 37.787082 and the longitude is -122.400929. The plus sign in the location is a URL-encoded space.

Request URI:

http://yboss.yahooapis.com/geo/placefinder?location=37.787082+-122.400929&gflags=R

Response Data:


Table of Contents