WOEID

A WOEID (Where On Earth IDentifier) is a unique 32-bit reference identifier, originally defined by GeoPlanet and now assigned by Yahoo!, that identifies any feature on Earth. In 2009, Yahoo! released GeoPlanet's WOEID data to the public, with the last release on 1 June 2012, after which Yahoo! decided to cease making the data downloadable until they "determine a better way to surface the data as a part of the service".

WOEIDs are used by a number of other projects, including Flickr, OpenStreetMap, Twitter, WOEID Search Engine (archive link) and Nations24.

A successor to the WOEID project is Who's On First.

WOEID of some popular locations on Earth
From WOEID Search Engine:
 * 4118        - Toronto
 * 44418      - London
 * 615702    - Paris
 * 2295019  - New Delhi
 * 2295380  - Varanasi
 * 2442047  - Los Angeles
 * 2459115  - New York
 * 2487956  - San Francisco
 * 23424851 - Iran
 * 29128560 - Kaithi

Example
E.g. Berlin does not know about Germany, which itself doesn't know about Europe and so forth. GeoPlanet records, or places as they are called by Yahoo!, always (except one) have a reference to its parent place and therefore offer relations between places like the following:
 * Parent (direct surrounding place)
 * Child (direct sub-places)
 * Siblings (places sharing the same parent and place type)
 * Ancestors (set of all parents)

If you take e.g. our company's district you will get the following family tree:


 * Deutschland (WOEID 23424829)
 * Bundesland Berlin (WOEID 2345496)
 * Stadtkreis Berlin (WOEID 1259838)
 * Berlin (WOEID 638242)
 * Ortsteil Pankow (WOEID 26821868)
 * Ortsteil Prenzlauer Berg (WOEID 26821872)
 * Ortsteil Wedding (WOEID 26821851)
 * Suan Luang (WOEID 12756344)