API Documentation
See the OSM wiki for general information about the API.
Table of Contents
- /api/4/key/chronology
- /api/4/key/combinations
- /api/4/key/distribution/nodes
- /api/4/key/distribution/ways
- /api/4/key/projects
- /api/4/key/similar
- /api/4/key/stats
- /api/4/key/values
- /api/4/key/wiki_pages
- /api/4/keys/all
- /api/4/keys/similar
- /api/4/keys/wiki_pages
- /api/4/keys/without_wiki_page
- /api/4/project/icon
- /api/4/project/tags
- /api/4/projects/all
- /api/4/projects/keys
- /api/4/projects/tags
- /api/4/relation/projects
- /api/4/relation/roles
- /api/4/relation/stats
- /api/4/relation/wiki_pages
- /api/4/relations/all
- /api/4/search/by_key_and_value
- /api/4/search/by_keyword
- /api/4/search/by_role
- /api/4/search/by_value
- /api/4/site/info
- /api/4/site/sources
- /api/4/tag/chronology
- /api/4/tag/combinations
- /api/4/tag/distribution/nodes
- /api/4/tag/distribution/ways
- /api/4/tag/projects
- /api/4/tag/stats
- /api/4/tag/wiki_pages
- /api/4/tags/list
- /api/4/tags/popular
- /api/4/wiki/languages
/api/4/key/chronology
Path: | /api/4/key/chronology | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get chronology of key counts. | ||||||||||||||||||||||||
Parameters: | key — Tag key (required). | ||||||||||||||||||||||||
Paging: | no | ||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||
Sort: | none | ||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||
Example: | /api/4/key/chronology?key=highway | ||||||||||||||||||||||||
UI Example: | /keys/highway#chronology |
/api/4/key/combinations
Path: | /api/4/key/combinations | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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: |
|
||||||||||||||||||||||||||||||
Example: | /api/4/key/combinations?key=highway&page=1&rp=10&sortname=together_count&sortorder=desc | ||||||||||||||||||||||||||||||
UI Example: | /keys/highway#combinations |
/api/4/key/distribution/nodes
Path: | /api/4/key/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/4/key/distribution/nodes?key=amenity |
UI Example: | /keys/amenity#map |
/api/4/key/distribution/ways
Path: | /api/4/key/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/4/key/distribution/ways?key=highway |
UI Example: | /keys/highway#map |
/api/4/key/projects
Path: | /api/4/key/projects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get projects using a given key. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | key — Tag key (required). query — Only show results where the project name or tag 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: | project_name, tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/key/projects?key=highway&page=1&rp=10&sortname=project_name&sortorder=asc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /keys/highway#projects |
/api/4/key/similar
Path: | /api/4/key/similar | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Find keys that are similar to 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: | none | |||||||||||||||||||||||||||
Sort: | other_key, count_all, similarity | |||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||
Example: | /api/4/key/similar?key=highway&page=1&rp=10&sortname=other_key&sortorder=asc | |||||||||||||||||||||||||||
UI Example: | /keys/highway#similar |
/api/4/key/stats
Path: | /api/4/key/stats | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Show some database statistics for given key. | ||||||||||||||||||||||||
Parameters: | key — Tag key (required). | ||||||||||||||||||||||||
Paging: | no | ||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||
Sort: | none | ||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||
Example: | /api/4/key/stats?key=amenity | ||||||||||||||||||||||||
UI Example: | /keys/amenity#overview |
/api/4/key/values
Path: | /api/4/key/values | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get values used with a given key. | |||||||||||||||||||||||||||||||||||||||
Parameters: | key — Tag key (required). lang — Language for description (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, in_wiki | |||||||||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||||||||
Example: | /api/4/key/values?key=highway&page=1&rp=10&sortname=count_ways&sortorder=desc | |||||||||||||||||||||||||||||||||||||||
UI Example: | /keys/highway#values |
/api/4/key/wiki_pages
Path: | /api/4/key/wiki_pages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of wiki pages in different languages describing a key. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | key — Tag key (required) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/key/wiki_pages?key=highway | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /keys/highway#wiki | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes: | To get the complete thumbnail image URL, concatenate thumb_url_prefix, width of image in pixels, and thumb_url_suffix. The thumbnail image width must be smaller than width, use the image_url otherwise. |
/api/4/keys/all
Path: | /api/4/keys/all | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of all keys. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | query — Only show keys matching this query (substring match, optional). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | characters_colon — Category B: Only show keys like category A but with one ore more colons (:) inside. characters_letters — Category C: Only show keys like category B but with uppercase latin letters or letters from other scripts. characters_plain — Category A: Only show keys with latin lowercase letters (a to z) or underscore (_), first and last characters must be letters. characters_problem — Category E: Only show keys with problematic characters. characters_rest — Category F: Only show keys not fitting in category A through E. characters_space — Category D: Only show keys with at least one whitespace character (space, tab, new line, carriage return, or from other scripts). 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, length | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/keys/all?page=1&rp=10&filter=in_wiki&sortname=key&sortorder=asc | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /keys |
/api/4/keys/similar
Path: | /api/4/keys/similar | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of pairs of similar keys, one used very often, one used rarely. | |||||||||||||||||||||||||||||||||
Parameters: | query — Only show keys matching this query (substring match, optional). | |||||||||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||||||||
Sort: | key_common, key_rare, count_all_common, count_all_rare, similarity | |||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||
Example: | /api/4/keys/similar?page=1&rp=10&sortname=count_all_common&sortorder=desc | |||||||||||||||||||||||||||||||||
UI Example: | /reports/similar_keys |
/api/4/keys/wiki_pages
Path: | /api/4/keys/wiki_pages | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of wiki pages in different languages for all keys. | ||||||||||||||||||||||||
Parameters: | query — Only show keys matching this query (substring match, optional). | ||||||||||||||||||||||||
Paging: | optional | ||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||
Sort: | key | ||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||
Example: | /api/4/keys/wiki_pages?page=1&rp=10&sortname=key&sortorder=asc | ||||||||||||||||||||||||
UI Example: | /reports/language_comparison_table_for_keys_in_the_wiki |
/api/4/keys/without_wiki_page
Path: | /api/4/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: |
|
|||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/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/4/project/icon
Path: | /api/4/project/icon |
---|---|
Description: | Get icon of a project. |
Parameters: | project — Project ID (required) |
Paging: | no |
Filter: | none |
Sort: | none |
Result: | PNG image. |
Example: | /api/4/project/icon?project=id_editor |
UI Example: | /projects/id_editor |
/api/4/project/tags
Path: | /api/4/project/tags | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of all keys/tags used by a project. | |||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | project — Project ID (required) | |||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | tag, count_all, in_wiki | |||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/project/tags?project=id_editor&page=1&rp=10&sortname=tag&sortorder=asc | |||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /projects/id_editor |
/api/4/projects/all
Path: | /api/4/projects/all | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of all projects using OSM tags known to taginfo. | ||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | query — Only show projects where name or description matches this query (substring match, optional). status — Only show projects with given status (default is "OK") |
||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | optional | ||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | name, unique_keys, unique_values | ||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/projects/all?page=1&rp=10&sortname=name&sortorder=asc | ||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /projects |
/api/4/projects/keys
Path: | /api/4/projects/keys | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of all keys used by at least one project. | |||||||||||||||||||||||||||||||||
Parameters: | query — Only show keys matching this query (substring match, optional). | |||||||||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||||||||
Sort: | key, projects, in_wiki, count_all | |||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||
Example: | /api/4/projects/keys?page=1&rp=10&sortname=key&sortorder=asc | |||||||||||||||||||||||||||||||||
UI Example: | /projects#keys |
/api/4/projects/tags
Path: | /api/4/projects/tags | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of all tags used by at least one project. | ||||||||||||||||||||||||||||||||||||
Parameters: | query — Only show tags matching this query (substring match, optional). | ||||||||||||||||||||||||||||||||||||
Paging: | optional | ||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||
Sort: | key, value, projects, in_wiki, count_all | ||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||
Example: | /api/4/projects/tags?page=1&rp=10&sortname=key&sortorder=asc | ||||||||||||||||||||||||||||||||||||
UI Example: | /projects#tags |
/api/4/relation/projects
Path: | /api/4/relation/projects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get projects using a given relation type. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | query — Only show results where the value matches this query (substring match, optional). rtype — Relation type (required) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | optional | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | project_name | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/relation/projects?rtype=route&page=1&rp=10&sortname=project_name&sortorder=asc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /relations/route#projects |
/api/4/relation/roles
Path: | /api/4/relation/roles | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Member role statistics for a relation of given type. | ||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | query — Only show results where the role matches this query (substring match, optional). rtype — Relation type (required). |
||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | optional | ||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | role, count_all_members, count_node_members, count_way_members, count_relation_members | ||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/relation/roles?rtype=multipolygon&page=1&rp=10 | ||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /relations/multipolygon#roles |
/api/4/relation/stats
Path: | /api/4/relation/stats | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Show some database statistics for given relation type. | ||||||||||||||||||
Parameters: | rtype — Relation type (required). | ||||||||||||||||||
Paging: | no | ||||||||||||||||||
Filter: | none | ||||||||||||||||||
Sort: | none | ||||||||||||||||||
Result: |
|
||||||||||||||||||
Example: | /api/4/relation/stats?rtype=multipolygon | ||||||||||||||||||
UI Example: | /relations/multipolygon#overview |
/api/4/relation/wiki_pages
Path: | /api/4/relation/wiki_pages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of wiki pages in different languages describing a relation type. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | rtype — Relation type (required) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/relation/wiki_pages?rtype=multipolygon | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /relations/multipolygon#wiki | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes: | To get the complete thumbnail image URL, concatenate thumb_url_prefix, width of image in pixels, and thumb_url_suffix. The thumbnail image width must be smaller than width, use the image_url otherwise. |
/api/4/relations/all
Path: | /api/4/relations/all | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Information about the different relation types. | |||||||||||||||||||||||||||||||||||||||
Parameters: | query — Only show results where the relation type matches this query (substring match, optional). | |||||||||||||||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||||||||||||||
Sort: | rtype, count | |||||||||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||||||||
Example: | /api/4/relations/all?page=1&rp=10 | |||||||||||||||||||||||||||||||||||||||
UI Example: | /relations | |||||||||||||||||||||||||||||||||||||||
Notes: | prevalent_roles can be null if taginfo doesn't have role information for this relation type, or an empty array when there are no roles with more than 1% of members |
/api/4/search/by_key_and_value
Path: | /api/4/search/by_key_and_value | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Search for tags by key and/or value. | |||||||||||||||||||||||||||
Parameters: | query — Value to search for (substring search, required). | |||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||
Sort: | count_all, key, value | |||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||
Example: | /api/4/search/by_key_and_value?query=highway%3Dresidential&page=1&rp=10 | |||||||||||||||||||||||||||
UI Example: | /search?q=highway%3Dresidential |
/api/4/search/by_keyword
Path: | /api/4/search/by_keyword | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Search for keys and tags by keyword in wiki pages. | ||||||||||||||||||||||||
Parameters: | query — Value to search for (substring search, required). | ||||||||||||||||||||||||
Paging: | optional | ||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||
Sort: | key, value | ||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||
Example: | /api/4/search/by_keyword?query=fire&page=1&rp=10 | ||||||||||||||||||||||||
UI Example: | /search?q=fire#fulltext |
/api/4/search/by_role
Path: | /api/4/search/by_role | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Search for relation roles. | |||||||||||||||||||||||||||
Parameters: | query — Role to search for (substring search, required). | |||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||
Sort: | count_all, rtype, role | |||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||
Example: | /api/4/search/by_role?query=foo&page=1&rp=10 | |||||||||||||||||||||||||||
UI Example: | /search?q=foo#roles |
/api/4/search/by_value
Path: | /api/4/search/by_value | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Search for tags by value. | |||||||||||||||||||||||||||
Parameters: | query — Value to search for (substring search, required). | |||||||||||||||||||||||||||
Paging: | optional | |||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||
Sort: | count_all, key, value | |||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||
Example: | /api/4/search/by_value?query=foo&page=1&rp=10 | |||||||||||||||||||||||||||
UI Example: | /search?q=foo#values |
/api/4/site/info
Path: | /api/4/site/info | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get information about this taginfo site. | ||||||||||||||||||
Parameters: | none | ||||||||||||||||||
Paging: | no | ||||||||||||||||||
Filter: | none | ||||||||||||||||||
Sort: | none | ||||||||||||||||||
Result: |
|
||||||||||||||||||
Example: | /api/4/site/info | ||||||||||||||||||
UI Example: |
/api/4/site/sources
Path: | /api/4/site/sources | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get information about the data sources used. | |||||||||||||||
Parameters: | none | |||||||||||||||
Paging: | no | |||||||||||||||
Filter: | none | |||||||||||||||
Sort: | none | |||||||||||||||
Result: |
|
|||||||||||||||
Example: | /api/4/site/sources | |||||||||||||||
UI Example: | /sources |
/api/4/tag/chronology
Path: | /api/4/tag/chronology | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get chronology of tag counts. | ||||||||||||||||||||||||
Parameters: | key — Tag key (required). value — Tag value (required). |
||||||||||||||||||||||||
Paging: | no | ||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||
Sort: | none | ||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||
Example: | /api/4/tag/chronology?key=highway&value=primary | ||||||||||||||||||||||||
UI Example: | /tags/highway=primary#chronology |
/api/4/tag/combinations
Path: | /api/4/tag/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: |
|
|||||||||||||||||||||||||||||||||
Example: | /api/4/tag/combinations?key=highway&value=residential&page=1&rp=10&sortname=together_count&sortorder=desc | |||||||||||||||||||||||||||||||||
UI Example: | /tags/highway=residential#combinations |
/api/4/tag/distribution/nodes
Path: | /api/4/tag/distribution/nodes |
---|---|
Description: | Get map with distribution of this tag in the database (nodes only). Will return empty image if there is no map available for this tag. |
Parameters: | key — Tag key (required). value — Tag value (required). |
Paging: | no |
Filter: | none |
Sort: | none |
Result: | PNG image. |
Example: | /api/4/tag/distribution/nodes?key=amenity&value=post_box |
UI Example: | /tags/amenity=post_box#map |
/api/4/tag/distribution/ways
Path: | /api/4/tag/distribution/ways |
---|---|
Description: | Get map with distribution of this tag in the database (ways only). Will return empty image if there is no map available for this tag. |
Parameters: | key — Tag key (required). value — Tag value (required). |
Paging: | no |
Filter: | none |
Sort: | none |
Result: | PNG image. |
Example: | /api/4/tag/distribution/ways?key=highway&value=residential |
UI Example: | /tags/highway=residential#map |
/api/4/tag/projects
Path: | /api/4/tag/projects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get projects using a given tag. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | key — Tag key (required). query — Only show results where the project name 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: | project_name, tag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/tag/projects?key=highway&value=residential&page=1&rp=10&sortname=project_name&sortorder=asc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /tags/highway=residential#projects |
/api/4/tag/stats
Path: | /api/4/tag/stats | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Show some database statistics for given tag. | |||||||||||||||||||||
Parameters: | key — Tag key (required). value — Tag value (required). |
|||||||||||||||||||||
Paging: | no | |||||||||||||||||||||
Filter: | none | |||||||||||||||||||||
Sort: | none | |||||||||||||||||||||
Result: |
|
|||||||||||||||||||||
Example: | /api/4/tag/stats?key=amenity&value=school | |||||||||||||||||||||
UI Example: | /tags/amenity=school#overview |
/api/4/tag/wiki_pages
Path: | /api/4/tag/wiki_pages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get list of wiki pages in different languages describing a tag. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | key — Tag key (required) value — Tag value (required). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | no | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | none | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/tag/wiki_pages?key=highway&value=residential | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /tags/highway=residential#wiki | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes: | To get the complete thumbnail image URL, concatenate thumb_url_prefix, width of image in pixels, and thumb_url_suffix. The thumbnail image width must be smaller than width, use the image_url otherwise. |
/api/4/tags/list
Path: | /api/4/tags/list | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | Get information on given tags or all tags documented on the wiki with given key. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters: | key — Key (optional) tags — Comma-separated list of tags in format key1=value1a,value1b,...,key2=value2a,value2b,... (optional). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Paging: | no | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filter: | none | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sort: | none | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Result: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/tags/list?tags=highway=primary,secondary,amenity=post_box | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes: | You have to either use the key parameter or the tags parameter. |
/api/4/tags/popular
Path: | /api/4/tags/popular | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | /api/4/tags/popular?page=1&rp=10&sortname=tag&sortorder=asc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
UI Example: | /tags |
/api/4/wiki/languages
Path: | /api/4/wiki/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: |
|
||||||||||||||||||||||||||||||||||||
Example: | /api/4/wiki/languages?sortname=wiki_key_pages&sortorder=desc | ||||||||||||||||||||||||||||||||||||
UI Example: | /reports/languages |