API Documentation

See the OSM wiki for general information about the API.

Table of Contents

This list of API calls and their descriptions are not complete!

/api/2/db/keys

Path: /api/2/db/keys
Description: Get list of keys that are in the database or mentioned in any other source.
Parameters: query — Only show keys matching this query (substring match, optional).
Paging: optional
Filter: characters_problematic — Only show keys with problematic characters.
characters_space — Only show keys with spaces.
in_wiki — Only show keys that appear in the wiki.
not_in_db — Only show keys that do not appear in the database.
Sort: key, count_all, count_nodes, count_ways, count_relations, values_all, users_all, in_wiki, in_josm, in_potlatch, length
Result:
{
  "key": STRING,
  "count_all": INT,
  "count_all_fraction": FLOAT,
  "count_nodes": INT,
  "count_nodes_fraction": FLOAT,
  "count_ways": INT,
  "count_ways_fraction": FLOAT,
  "count_relations": INT,
  "count_relations_fraction": FLOAT,
  "values_all": INT,
  "users_all": INT,
  "in_wiki": BOOL,
  "in_josm": BOOL,
  "in_potlatch": BOOL
}
Example: /api/2/db/keys?page=1&rp=10&filter=in_wiki&sortname=key&sortorder=asc
UI Example: /keys

/api/2/db/keys/distribution

Path: /api/2/db/keys/distribution
Description: Get map with distribution of this key in the database (nodes only).
Parameters: key — Tag key (required).
Paging: no
Filter: none
Sort: none
Result: PNG image.
Example: /api/2/db/keys/distribution?key=amenity
UI Example: /keys/highway#map

/api/2/db/keys/keys

Path: /api/2/db/keys/keys
Description: Find keys that are used together with a given key.
Parameters: key — Tag key (required).
query — Only show results where the other_key matches this query (substring match, optional).
Paging: optional
Filter: all — No filter.
nodes — Only values on tags used on nodes.
relations — Only values on tags used on relations.
ways — Only values on tags used on ways.
Sort: together_count, other_key, from_fraction
Result:
{
  "other_key": STRING,
  "together_count": INT,
  "to_fraction": FLOAT,
  "from_fraction": FLOAT
}
Example: /api/2/db/keys/keys?key=highway&page=1&rp=10&sortname=together_count&sortorder=desc
UI Example: /keys/highway#keys

/api/2/db/keys/overview

Path: /api/2/db/keys/overview
Description: Show statistics for nodes, ways, relations and total for this key.
Parameters: key — Tag key (required).
Paging: no
Filter: none
Sort: none
Result:
{
  "nodes": {
    "count": INT,
    "count_fraction": FLOAT,
    "values": INT
  },
  "ways": {
    "count": INT,
    "count_fraction": FLOAT,
    "values": INT
  },
  "relations": {
    "count": INT,
    "count_fraction": FLOAT,
    "values": INT
  },
  "all": {
    "count": INT,
    "count_fraction": FLOAT,
    "values": INT
  },
  "users": INT
}
Example: /api/2/db/keys/overview?key=highway
UI Example: /keys/highway

/api/2/db/keys/values

Path: /api/2/db/keys/values
Description: Get values used with a given key.
Parameters: key — Tag key (required).
lang — Language (optional, default: 'en').
query — Only show results where the value matches this query (substring match, optional).
Paging: optional
Filter: all — No filter.
nodes — Only values on tags used on nodes.
relations — Only values on tags used on relations.
ways — Only values on tags used on ways.
Sort: value, count_all, count_nodes, count_ways, count_relations
Result:
{
  "value": STRING,
  "count": INT,
  "fraction": FLOAT,
  "description": STRING
}
Example: /api/2/db/keys/values?key=highway&page=1&rp=10&sortname=count_ways&sortorder=desc
UI Example: /keys/highway#values

/api/2/db/tags

Path: /api/2/db/tags
Description: Get list of most often used tags.
Parameters: query — Only show tags matching this query (substring match in key and value, optional).
Paging: optional
Filter: none
Sort: tag, count_all, count_nodes, count_ways, count_relations
Result:
{
  "key": STRING,
  "value": STRING,
  "count_all": INT,
  "count_all_fraction": FLOAT,
  "count_nodes": INT,
  "count_nodes_fraction": FLOAT,
  "count_ways": INT,
  "count_ways_fraction": FLOAT,
  "count_relations": INT,
  "count_relations_fraction": FLOAT
}
Example: /api/2/db/tags?page=1&rp=10&sortname=tag&sortorder=asc
UI Example: /tags

/api/2/db/tags/combinations

Path: /api/2/db/tags/combinations
Description: Find keys and tags that are used together with a given tag.
Parameters: key — Tag key (required).
query — Only show results where the other_key or other_value matches this query (substring match, optional).
value — Tag value (required).
Paging: optional
Filter: all — No filter.
nodes — Only values on tags used on nodes.
relations — Only values on tags used on relations.
ways — Only values on tags used on ways.
Sort: together_count, other_tag, from_fraction
Result:
{
  "other_key": STRING,
  "other_value": STRING,
  "together_count": INT,
  "to_fraction": FLOAT,
  "from_fraction": FLOAT
}
Example: /api/2/db/tags/combinations?key=highway&value=residential&page=1&rp=10&sortname=together_count&sortorder=desc
UI Example: /tags/highway=residential#combinations

/api/2/db/tags/overview

Path: /api/2/db/tags/overview
Description: Show statistics for nodes, ways, relations and total for this tag.
Parameters: key — Tag key (required).
value — Tag value (required).
Paging: no
Filter: none
Sort: none
Result:
{
  "nodes": {
    "count": INT,
    "count_fraction": FLOAT
  },
  "ways": {
    "count": INT,
    "count_fraction": FLOAT
  },
  "relations": {
    "count": INT,
    "count_fraction": FLOAT
  },
  "all": {
    "count": INT,
    "count_fraction": FLOAT
  }
}
Example: /api/2/db/tags/overview?key=highway&value=residential
UI Example: /tags/highway=residential

/api/2/josm/styles/images

Path: /api/2/josm/styles/images
Description: Access images for map features used in JOSM.
Parameters: image — Image path
style — JOSM style
Paging: no
Filter: none
Sort: none
Result: PNG image.
Example: /api/2/josm/styles/images?style=standard&image=transport/bus.png
UI Example: /keys/landuse#josm

/api/2/reports/frequently_used_keys_without_wiki_page

Path: /api/2/reports/frequently_used_keys_without_wiki_page
Description: Return frequently used tag keys that have no associated wiki page.
Parameters: english — Check for key wiki pages in any language (0, default) or in the English language (1).
min_count — How many tags with this key must there be at least to show up here? (default 10000).
query — Only show results where the key matches this query (substring match, optional).
Paging: optional
Filter: none
Sort: key, count_all, values_all, users_all
Result:
{
  "key": STRING,
  "count_all": INT,
  "count_all_fraction": FLOAT,
  "values_all": INT,
  "users_all": INT,
  "prevalent_values": [
    {
      "value": STRING,
      "count": INT,
      "fraction": FLOAT
    }
  ]
}
Example: /api/2/reports/frequently_used_keys_without_wiki_page?min_count=1000&english=1&page=1&rp=10&sortname=count_all&sortorder=desc
UI Example: /reports/frequently_used_keys_without_wiki_page

/api/2/reports/languages

Path: /api/2/reports/languages
Description: List languages Taginfo knows about and how many wiki pages describing keys and tags there are in these languages.
Parameters: none
Paging: no
Filter: none
Sort: code, native_name, english_name, wiki_key_pages, wiki_tag_pages
Result:
{
  "code": STRING,
  "native_name": STRING,
  "english_name": STRING,
  "wiki_key_pages": INT,
  "wiki_key_pages_fraction": FLOAT,
  "wiki_tag_pages": INT,
  "wiki_tag_pages_fraction": FLOAT
}
Example: /api/2/reports/languages?sortname=wiki_key_pages&sortorder=desc
UI Example: /reports/languages

/api/2/search/values

Path: /api/2/search/values
Description: Search all tag values for string.
Parameters: q — Value to search for (substring search, required).
Paging: optional
Filter: none
Sort: count_all, key, value
Result:
{
  "key": STRING,
  "value": STRING,
  "count_all": INT
}
Example: /api/2/search/values?q=foo&page=1&rp=10
UI Example: /search?q=foo#values

/api/2/site

Path: /api/2/site
Description: Get information about this taginfo site.
Parameters: none
Paging: no
Filter: none
Sort: none
Result:
{
  "url": STRING,
  "name": STRING,
  "description": STRING,
  "icon": STRING,
  "contact": STRING,
  "area": STRING
}
Example: /api/2/site
UI Example:

/api/3/db/keys/distribution/nodes

Path: /api/3/db/keys/distribution/nodes
Description: Get map with distribution of this key in the database (nodes only).
Parameters: key — Tag key (required).
Paging: no
Filter: none
Sort: none
Result: PNG image.
Example: /api/3/db/keys/distribution/nodes?key=amenity
UI Example: /keys/amenity#map

/api/3/db/keys/distribution/ways

Path: /api/3/db/keys/distribution/ways
Description: Get map with distribution of this key in the database (ways only).
Parameters: key — Tag key (required).
Paging: no
Filter: none
Sort: none
Result: PNG image.
Example: /api/3/db/keys/distribution/ways?key=highway
UI Example: /keys/highway#map
This website only works with Javascript! Please enable Javascript in your browser.