Reference
Summary
The following resources and collections are provided:
- /places: returns a collection of places.
- /place/{woeid}: returns a place resource.
- /place/{woeid}/parent: returns a place resource for the parent of a place.
- /place/{woeid}/ancestors: returns a collection of places in the parent hierarchy for a place.
- /place/{woeid}/belongtos: returns a collection of places that contain a place.
- /place/{woeid}/neighbors: returns a collection of places that are neighbors of a place.
- /place/{woeid}/siblings: returns a collection of places that are siblings of a place.
- /place/{woeid}/children: returns a collection of places that are children of a place.
- /placetypes: returns the complete collection of place types supported in GeoPlanet.
- /placetype: returns a place type resource.
/places
Returns a collection of places that match a specified place name, and optionally, a specified place type. The resources in the collection are long representations of each place (unless short representations are explicitly requested).
Supported Filters
The following filters are supported for this
collection: .q, .type, $and. The .q
filter allows a user to match places by name. The .type filter allows users to
match places by place type. The $and filter allows users to match places using
the intersection of the other filters.
The .q filter supports an optional country code, which is used to adjust
the order of the results. The .q filter is required.
The .type filter must be used with the $and filter. It
cannot be specified by itself because the .q filter is required.
Supported Matrix Parameters
The following matrix parameters are supported
for this collection: start, count. The
start parameter allows a user to skip resources. The
count parameter allows a user to control the number of resources to
be returned. These parameters effectively provide a mechanism for paging through large
result sets.
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 400 Bad Request
-
Non empty q filter required for this resource
Be sure to provide the q filter in requests for the /places collection.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for the /places collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
Examples
Example 8. Retrieving the Most Likely Place for a Given Place Name
The request:
produces the following:
Example 9. Retrieving the Five Most Likely Place for a Given Placename
The request:
produces the following:
Example 10. Retrieving all Places for a Given Place Name and Place Type
The request:
produces the following:
/place/{woeid}
Returns a resource containing the long representation of a place (unless a short representation is explicitly requested).
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this resource.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
Examples
Example 11. Retrieving a resource for the Place Using a Given WOEID
The request:
produces the following:
Example 12. Retrieving a Resource for the Place with a Given WOEID, in Short Representation
The request:
produces the following:
Example 13. Retrieving a Resource for the Place with a Given WOEID, in JSON format
The request:
produces the following:
/place/{woeid}/parent
Returns a resource for the parent of a place. A place has only one parent. The resource is the short representation of the parent (unless a long representation is requested).
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for the /place resource.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/place/{woeid}/ancestors
Returns a collection of places in the parent hierarchy (the parent, the parent of parent, etc.). The resources in the collection are short representations of each place (unless a long representation is specifically requested).
Supported Filters
None
Supported Matrix Parameters
None
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/place/{woeid}/belongtos
Returns a collection of places that have a place as a child or descendant (child of a child, etc). The resources in the collection are short representations of each place (unless a long representation is specifically requested).
Supported Filters
The only supported filter for this collection is
.type. This filter allows a user to limit the results to one or more specified
place types.
Supported Matrix Parameters
The following matrix parameters are supported
for this collection: start, count. The
start parameter allows a user to skip resources. The
count parameter allows a user to control the number of resources to
be returned. These parameters effectively provide a mechanism for paging through large
result sets.
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/place/{woeid}/neighbors
Returns a collection of places that neighbor of a place. The resources in the collection are short representations of each place (unless a long representation is requested). Note that neighbors are not necessarily geographically contiguous.
Supported Filters
None
Supported Matrix Parameters
The following matrix parameters are supported
for this collection: start, count. The
start parameter allows a user to skip resources. The
count parameter allows a user to control the number of resources to
be returned. These parameters effectively provide a mechanism for paging through large
result sets.
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/place/{woeid}/siblings
Returns a collection of places that are siblings of a place. Siblings share the same parent and place type as the given place. The resources in the collection are short representations of each place (unless a long representation is requested).
Supported Filters
None
Supported Matrix Parameters
The following matrix parameters are supported
for this collection: start, count. The
start parameter allows a user to skip resources. The
count parameter allows a user to control the number of resources to
be returned. These parameters effectively provide a mechanism for paging through large
result sets.
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/place/{woeid}/children
Returns a collection of places that are children of a place. The resources in the collection are short representations of each place (unless a long representation is requested).
Supported Filters
The only supported filter for this collection is
.type. This filter allows a user to limit the results to one or more specified
place types.
Supported Matrix Parameters
The following matrix parameters are supported
for this collection: start, count. The
start parameter allows a user to skip resources. The
count parameter allows a user to control the number of resources to
be returned. These parameters effectively provide a mechanism for paging through large
result sets.
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains three elements: woeid, placeTypeName, and name.
The long representation additionally contains these elements: country, admin1, admin2, admin3, locality1, locality2, postal, centroid, and boundingBox.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/placetypes
Returns the complete collection of place types supported in GeoPlanet. The resources in the collection each describe a single place type. Additional placetypes will be included in future versions of GeoPlanet.
Supported Filters
The only supported filter for this collection is
.type. This filter allows a user to limit the results to one or more specified
place types.
Supported Matrix Parameters
The following matrix parameters are supported
for this collection: start, count. The
start parameter allows a user to skip resources. The
count parameter allows a user to control the number of resources to
be returned. These parameters effectively provide a mechanism for paging through large
result sets.
Supported Query Parameters
The following query parameters are supported
for this collection: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains the placeTypeName element.
The long representation additionally contains the description element.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.
/placetype
Returns a resource that describes a single place type.
Supported Query Parameters
The following query parameters are supported
for this resource: lang, format,
callback, select, and
appid. The lang parameter allows a user to
choose the language used in the response. The
format parameter allows a user to choose the content type of the response (XML, JSON, GeoJSON). The
callback parameter allows a user to encapsulate a JSON response
within a JavaScript function call. The select parameter allows a user
to choose the representation of the response (short,
long). The appid parameter grants authorization to use the Web
service, and is required.
Representations
The short representation contains the placeTypeName element.
The long representation additionally contains the description element.
Possible Errors
The following errors can be returned:
- 400 Bad Request
-
A valid appid parameter is required for this resource; please visit http://developer.yahoo.com/wsregapp to get an appid
Be sure to provide the appid parameter for each GeoPlanet request you make.
- 404 Not Found
-
URI has no match in the display map
Be sure that you have spelled the resource correctly and are using one of the supported filters for this collection.
- 404 Resource Does Not Exist
-
Could not find the resource xxx
Be sure to provide a valid woeid in requests for this collection.
- 406 Not Acceptable
-
Requested representation not available for this resource
Be sure that you have included an Accept header or format parameter with a supported value.

