This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to extract list of all the tags

2

Where can I extract the complete list of tags being used in OSM?

asked 11 Jul '12, 13:27

jawadch's gravatar image

jawadch
1214412
accept rate: 0%

edited 23 Aug '12, 14:11

Jonathan%20Bennett's gravatar image

Jonathan Ben...
8.3k1785108


4 Answers:

4

The complete list of tags won't give you much information. Better determine the most used tags via taginfo as already explained by Jonathan and Frederik or take a look at the map features page in the wiki.

answered 11 Jul '12, 15:35

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

Is there a way that I can extract just the most commonly used tags?

(11 Jul '12, 15:42) jawadch

Define what the "most commonly used tags" are in your opinion and throw away everything else? :). The map features page already provides an overview of the most commonly used tags. Use it in combination with taginfo and you should get a meaningful list.

(11 Jul '12, 15:56) scai ♦

9

There's an online tool that analyses tag usage in OpenStreetMap called TagInfo. As well as using the information it provides, either in your browser or via its API, you can download its internal databases containing the same information.

answered 11 Jul '12, 13:30

Jonathan%20Bennett's gravatar image

Jonathan Ben...
8.3k1785108
accept rate: 18%

edited 11 Jul '12, 13:31

8

You probably do not want do extract the complete list of tags being used in OSM.

If you really wanted to then you could do this:

wget -O- http://planet.openstreetmap.org/planet-latest.osm.bz2 | grep "<tag" | cut -d\" -f2 | sort -u > my-tag-list.txt

This will yield a list of about 35,000 tag keys currently in use.

A better presented tag listing is available on http://taginfo.openstreetmap.org, and there you can also download sqlite files that contain lists of tags.

answered 11 Jul '12, 13:31

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

0

You can download a list from http://wykenseagrave.co.uk/?p=703 which I created by copying and editing the wiki tag pages. This will get out of date as new tags are added, but I doubt if they'll change very often.

answered 11 Jun '13, 05:01

Wyken%20Seagrave's gravatar image

Wyken Seagrave
1
accept rate: 0%

edited 11 Jun '13, 05:04

4

Note that this is a list of tag documentation pages, not a list of tags that are actually in use. The two aren't always the same thing.

(11 Jun '13, 09:30) Jonathan Ben...

Source code available on GitHub .