The location parameters indicate a place such as a street address. The format of these parameters can be free-form (one line), multi-line, or fully-parsed (house, street, unit, city, state, zip). For details, see Address Formats. The location parameters must be strings, unless noted otherwise. The following table lists the location parameters that can be passed to the Web service. For example:
http://yboss.yahooapis.com/geo/placefinder?location= 1 Main
Street
http://yboss.yahooapis.com/geo/placefinder?q= 1 Main
Street
Parameters are evaluated in the following order: single-line (q), POI/AOI name (name), WOEID (woeid), multi-line (line1, line2, line3), fully parsed (house, street, unittype, unit, xstreet, postal, level4, level3, level2, level1, level0). Mixing parameters from different address formats is not supported. See Address Formats section for details.
| Parameter | Address Format | Example | Description |
|---|---|---|---|
location or q
(query) |
Free-Form Format | 701 First Ave., Sunnyvale, CA 94089 |
A geographical location. It is recommended to use this parameter in your API request to get broader matches and results. |
name |
N/A | Yosemite National Park |
A Place of Interest (POI) name, Area of Interest (AOI)
name, or airport code. See
also POI and AOI Names.
Ignored if location parameter is provided.
|
line1 or addr |
Multi-line Format | 701 First Ave. |
First line of address (street address or intersection).
Ignored if location, name, or
woeid parameter is provided.
|
line2 or csz |
Multi-line Format | Sunnyvale, CA 94089 |
Second line of address (city-state-zip in US). Ignored if
location, name, or woeid
parameter is provided.
|
line3 |
Multi-line Format | EC1A 1BB |
Third line of address (postal code in UK). Ignored if
location, name, or woeid
parameter is provided.
|
house |
Fully-parsed Format | 701 |
House number. Ignored if location,
name, woeid, or multi-line
(line1/line2/line3) parameter is provided.
|
street |
Fully-parsed Format | First Ave. |
Street name. Ignored if location,
name, woeid, or multi-line
(line1/line2/line3) parameter is provided.
|
unittype |
Fully-parsed Format | Apt |
Unit type, such as apartment (Apt) or suite (Ste). Ignored
if location, name, woeid,
or multi-line(line1/line2/line3) parameter is
provided.
|
unit |
Fully-parsed Format | 324 |
Unit/Suite/Apartment/Box. Ignored if location,
name, woied, or multi-line
(line1/line2/line3) parameter is provided.
|
xstreet |
Fully-parsed Format | Mathilda Ave. |
Cross Street name. Ignored if location,
name, woeid, or multi-line
(line1/line2/line3) parameter is provided.
|
postal |
Fully-parsed Format | 94089 |
Postal code. Ignored if location,
name, woeid, or multi-line
(line1/line2/line3) parameter is provided.
|
level4 or neighborhood |
Fully-parsed Format | SOMA |
Level 4 Administrative name (Neighborhood). Ignored if
location, name, woeid, or
multi-line (line1/line2/line3) parameter is
provided.
|
level3 or city |
Fully-parsed Format | Sunnyvale |
Level 3 Administrative name (City/Town/Locality). Ignored
if location, name, woeid,
or multi-line (line1/line2/line3) parameter is
provided. Do not specify level3 unless
level1 or level0 is also specified;
otherwise, erroneous results might be returned. For best results,
specify at least level0 through
level3. |
level2 or county |
Fully-parsed Format | Santa Clara |
Level 2 Administrative name (County). Ignored if
location, name, woeid, or
multi-line (line1/line2/line3) parameter is
provided.
|
level1 or state |
Fully-parsed Format | CA |
Level 1 Administrative name (State/Province) or
abbreviation (US only). Ignored if location,
name, woeid, or multi-line
(line1/line2/line3) parameter is provided.
|
level0 or counrty |
Fully-parsed Format | USA |
Level 0 Administrative name (Country) or country code.
Ignored if location, name,
woeid, or multi-line (line1/line2/line3)
parameter is provided.
|
woeid |
N/A | 12797150 |
Where
On Earth ID. Must be an integer. Ignored if
location or name parameter is
provided.
|