API Documentation
See the OSM wiki for general information about the API.
Table of Contents
/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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
other_key: | STRING | Other key. |
together_count: | INT | Number of objects that have both keys. |
to_fraction: | FLOAT | Fraction of objects with this key that also have the other key. |
from_fraction: | FLOAT | Fraction of objects with other key that also have this key. |
|
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
/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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
project_id: | STRING | Project ID |
project_name: | STRING | Project name |
project_icon_url: | STRING | Project icon URL |
key: | STRING | Key |
value: | STRING | Value |
on_node: | BOOL | For nodes? |
on_way: | BOOL | For ways? |
on_relation: | BOOL | For relations? |
on_area: | BOOL | For areas? |
description: | STRING | Description |
doc_url: | STRING | Documentation URL |
icon_url: | STRING | Icon URL |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
other_key: | STRING | Other key. |
count_all: | INT | Number of objects that have the other key. |
similarity: | INT | An integer measuring the similarity of the two keys, smaller is more similar. |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
type: | STRING | Object type ("all", "nodes", "ways", or "relations") |
count: | INT | Number of objects with this type and key. |
count_fraction: | FLOAT | Number of objects in relation to all objects. |
values: | INT | Number of different values for this key. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
value: | STRING | Value |
count: | INT | Number of times this key/value is in the OSM database. |
fraction: | FLOAT | Number of times in relation to number of times this key is in the OSM database. |
in_wiki: | BOOL | Is there at least one wiki page for this tag. |
desclang: | STRING | Language the description of the tag is in. |
descdir: | STRING | Writing direction ("ltr", "rtl", or "auto") of description of the tag. |
description: | STRING | Description of the tag from the wiki. |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
lang: | STRING | Language code. |
dir: | STRING | Writing direction ("ltr", "rtl", or "auto") of description. |
language: | STRING | Language name in its language. |
language_en: | STRING | Language name in English. |
title: | STRING | Wiki page title. |
description: | STRING | Short description of key from wiki page. |
image: | HASH | Associated image. |
title: | STRING | Wiki page title of associated image. |
width: | INT | Width of image. |
height: | INT | Height of image. |
mime: | STRING | MIME type of image. |
image_url: | STRING | Image URL |
thumb_url_prefix: | STRING | Prefix of thumbnail URL. |
thumb_url_suffix: | STRING | Suffix of thumbnail URL. |
on_node: | BOOL | Is this a key for nodes? |
on_way: | BOOL | Is this a key for ways? |
on_area: | BOOL | Is this a key for areas? |
on_relation: | BOOL | Is this a key for relations? |
tags_implies: | ARRAY OF STRINGS | List of keys/tags implied by this key. |
tags_combination: | ARRAY OF STRINGS | List of keys/tags that can be combined with this key. |
tags_linked: | ARRAY OF STRINGS | List of keys/tags related to this key. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
count_all: | INT | Number of objects in the OSM database with this key. |
count_all_fraction: | FLOAT | Number of objects in relation to all objects. |
count_nodes: | INT | Number of nodes in the OSM database with this key. |
count_nodes_fraction: | FLOAT | Number of nodes in relation to all tagged nodes. |
count_ways: | INT | Number of ways in the OSM database with this key. |
count_ways_fraction: | FLOAT | Number of ways in relation to all ways. |
count_relations: | INT | Number of relations in the OSM database with this key. |
count_relations_fraction: | FLOAT | Number of relations in relation to all relations. |
values_all: | INT | Number of different values for this key. |
users_all: | INT | Number of users owning objects with this key. |
in_wiki: | BOOL | Has this key at least one wiki page? |
projects: | INT | Number of projects using this key |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key_common: | STRING | Key thats used often in OSM database |
count_all_common: | INT | Number of objects in the OSM database with the common key. |
key_rare: | STRING | Key thats used rarely in OSM database |
count_all_rare: | INT | Number of objects in the OSM database with the rare key. |
similarity: | INT | An integer measuring the similarity of the two keys, smaller is more similar. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
lang: | HASH | Hash with language codes as keys and values showing what type of wiki pages are available. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
count_all: | INT | Number of objects in database with this key. |
count_all_fraction: | FLOAT | Fraction of objects in database with this key. |
values_all: | INT | Number of different values for this key. |
users_all: | INT | Number of different users who own objects with this key. |
prevalent_values: | HASH | Often used values. |
value: | STRING | Value |
count: | INT | Number of occurances of this value. |
fraction: | FLOAT | Fraction of all values. |
|
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/tags
Path: |
/api/4/project/tags |
Description: |
Get list of all keys/tags used by a project. |
Parameters: |
project — Project ID |
Paging: |
optional |
Filter: |
none |
Sort: |
tag, count_all, in_wiki |
Result: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
on_node: | BOOL | For nodes? |
on_way: | BOOL | For ways? |
on_relation: | BOOL | For relations? |
on_area: | BOOL | For areas? |
description: | STRING | Description |
doc_url: | STRING | Documentation URL |
icon_url: | STRING | Icon URL |
count_all: | INTEGER | Number of objects with this key/tag in database |
in_wiki: | BOOL | Is this key/tag in wiki? |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
id: | STRING | Project id |
name: | STRING | Project name |
project_url: | STRING | Project URL |
icon_url: | STRING | Icon URL |
doc_url: | STRING | Documentation URL |
description: | STRING | Project description |
key_entries: | INT | Key entries for this project |
tag_entries: | INT | Tag entries for this project |
unique_keys: | INT | Unique keys known to this project |
unique_tags: | INT | Unique tags known to this project |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
projects: | INT | Number of projects using this key |
in_wiki: | BOOL | Is this key described in any wiki pages |
count_all: | INT | Number of objects in the OSM database with this key. |
count_all_fraction: | FLOAT | Number of objects in relation to all objects. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
projects: | INT | Number of projects using this tag |
in_wiki: | BOOL | Is this tag described in any wiki pages |
count_all: | INT | Number of objects in the OSM database with this tag. |
count_all_fraction: | FLOAT | Number of objects in relation to all objects. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
project_id: | STRING | Project ID |
project_name: | STRING | Project name |
project_icon_url: | STRING | Project icon URL |
key: | STRING | Key |
value: | STRING | Value |
on_node: | BOOL | For nodes? |
on_way: | BOOL | For ways? |
on_relation: | BOOL | For relations? |
on_area: | BOOL | For areas? |
description: | STRING | Description |
doc_url: | STRING | Documentation URL |
icon_url: | STRING | Icon URL |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
rtype: | STRING | Relation type |
role: | STRING | Relation member role. |
count_all_members: | INT | Number of members with this role. |
count_all_members_fraction: | FLOAT | Number of members with this role devided by all members. |
count_node_members: | INT | Number of members of type node with this role. |
count_node_members_fraction: | FLOAT | Number of members of type node with this role devided by all members of type node. |
count_way_members: | INT | Number of members of type way with this role. |
count_way_members_fraction: | FLOAT | Number of members of type way with this role devided by all members of type way. |
count_relation_members: | INT | Number of members of type relation with this role. |
count_relation_members_fraction: | FLOAT | Number of members of type relation with this role devided by all members of type relation. |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
type: | STRING | Member type ("all", "nodes", "ways", or "relations") |
count: | INT | Number of members with this type. |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
lang: | STRING | Language code. |
language: | STRING | Language name in its language. |
language_en: | STRING | Language name in English. |
title: | STRING | Wiki page title. |
dir: | STRING | Writing direction ("ltr", "rtl", or "auto") of description. |
description: | STRING | Short description of key from wiki page. |
image: | HASH | Associated image. |
title: | STRING | Wiki page title of associated image. |
width: | INT | Width of image. |
height: | INT | Height of image. |
mime: | STRING | MIME type of image. |
image_url: | STRING | Image URL |
thumb_url_prefix: | STRING | Prefix of thumbnail URL. |
thumb_url_suffix: | STRING | Suffix of thumbnail URL. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
rtype: | STRING | Relation type |
count: | INT | Number of relations with this type. |
count_fraction: | INT | Number of relations with this type divided by the overall number of relations. |
prevalent_roles: | ARRAY | Prevalent member roles. |
role: | STRING | Member role |
count: | INT | Number of members with this role. |
fraction: | FLOAT | Number of members with this role divided by all members. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
count_all: | INT | Number of objects in the database with this tag. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
rtype: | STRING | Relation type. |
role: | STRING | Role |
count_all: | INT | Number of objects in the database with this role. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
count_all: | INT | Number of objects in the database with this tag. |
|
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: |
url: | STRING | URL |
name: | STRING | Name |
description: | STRING | Description |
icon: | STRING | Path to icon which appears on the lop left corner of all pages. |
contact: | STRING | Contact information to admin. |
area: | STRING | Description of area covered. |
|
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: |
name: | STRING | Name |
data_until: | STRING | All changes in the source until this date are reflected in taginfo. |
update_start: | STRING | Date/Timestamp when last update was started. |
update_end: | STRING | Date/Timestamp when last update was finished. |
|
Example: |
/api/4/site/sources |
UI Example: |
/sources |
/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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
other_key: | STRING | Other key. |
other_value: | STRING | Other value (may be empty). |
together_count: | INT | Number of objects that have both this tag and other key (or tag). |
to_fraction: | FLOAT | Fraction of objects with this tag that also have the other key (or tag). |
from_fraction: | FLOAT | Fraction of objects with other key (or tag) that also have this tag. |
|
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
/api/4/tag/distribution/ways
/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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
project_id: | STRING | Project ID |
project_name: | STRING | Project name |
project_icon_url: | STRING | Project icon URL |
key: | STRING | Key |
value: | STRING | Value |
on_node: | BOOL | For nodes? |
on_way: | BOOL | For ways? |
on_relation: | BOOL | For relations? |
on_area: | BOOL | For areas? |
description: | STRING | Description |
doc_url: | STRING | Documentation URL |
icon_url: | STRING | Icon URL |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
type: | STRING | Object type ("all", "nodes", "ways", or "relations") |
count: | INT | Number of objects with this type and tag. |
count_fraction: | FLOAT | Number of objects in relation to all objects. |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
lang: | STRING | Language code. |
dir: | STRING | Writing direction ("ltr", "rtl", or "auto") of description. |
language: | STRING | Language name in its language. |
language_en: | STRING | Language name in English. |
title: | STRING | Wiki page title. |
description: | STRING | Short description of tag from wiki page. |
image: | HASH | Associated image. |
title: | STRING | Wiki page title of associated image. |
width: | INT | Width of image. |
height: | INT | Height of image. |
mime: | STRING | MIME type of image. |
image_url: | STRING | Image URL |
thumb_url_prefix: | STRING | Prefix of thumbnail URL. |
thumb_url_suffix: | STRING | Suffix of thumbnail URL. |
on_node: | BOOL | Is this a tag for nodes? |
on_way: | BOOL | Is this a tag for ways? |
on_area: | BOOL | Is this a tag for areas? |
on_relation: | BOOL | Is this a tag for relations? |
tags_implies: | ARRAY OF STRINGS | List of keys/tags implied by this tag. |
tags_combination: | ARRAY OF STRINGS | List of keys/tags that can be combined with this tag. |
tags_linked: | ARRAY OF STRINGS | List of keys/tags related to this tag. |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
in_wiki: | BOOL | In there a page in the wiki for this tag? |
count_all: | INT | Number of objects in the OSM database with this tag. |
count_all_fraction: | FLOAT | Number of objects in relation to all objects. |
count_nodes: | INT | Number of nodes in the OSM database with this tag. |
count_nodes_fraction: | FLOAT | Number of nodes in relation to all tagged nodes. |
count_ways: | INT | Number of ways in the OSM database with this tag. |
count_ways_fraction: | FLOAT | Number of ways in relation to all ways. |
count_relations: | INT | Number of relations in the OSM database with this tag. |
count_relations_fraction: | FLOAT | Number of relations in relation to all relations. |
on_node: | BOOL | Is this a tag for nodes? |
on_way: | BOOL | Is this a tag for ways? |
on_area: | BOOL | Is this a tag for areas? |
on_relation: | BOOL | Is this a tag for relations? |
wiki: | HASH | Hash with language codes as keys and values are hashes with the following keys: |
description: | STRING | Description of this tag. |
image: | HASH | Optional hash with information about descriptive image: |
image: | STRING | Wiki page title of associated image. |
width: | INT | Width of image. |
height: | INT | Height of image. |
mime: | STRING | MIME type of image. |
image_url: | STRING | Image URL |
thumb_url_prefix: | STRING | Prefix of thumbnail URL. |
thumb_url_suffix: | STRING | Suffix of thumbnail URL. |
osmcarto_rendering: | HASH | Optional hash with information about default rendering: |
image: | STRING | Wiki page title of associated image. |
width: | INT | Width of image. |
height: | INT | Height of image. |
mime: | STRING | MIME type of image. |
image_url: | STRING | Image URL |
thumb_url_prefix: | STRING | Prefix of thumbnail URL. |
thumb_url_suffix: | STRING | Suffix of thumbnail URL. |
|
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: |
total: | INT | Total number of results. |
page: | INT | Result page number (first has page number 1). |
rp: | INT | Results per page. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
key: | STRING | Key |
value: | STRING | Value |
in_wiki: | BOOL | In there a page in the wiki for this tag? |
count_all: | INT | Number of objects in the OSM database with this tag. |
count_all_fraction: | FLOAT | Number of objects in relation to all objects. |
count_nodes: | INT | Number of nodes in the OSM database with this tag. |
count_nodes_fraction: | FLOAT | Number of nodes in relation to all tagged nodes. |
count_ways: | INT | Number of ways in the OSM database with this tag. |
count_ways_fraction: | FLOAT | Number of ways in relation to all ways. |
count_relations: | INT | Number of relations in the OSM database with this tag. |
count_relations_fraction: | FLOAT | Number of relations in relation to all relations. |
projects: | INT | Number of projects using this tag |
|
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: |
total: | INT | Total number of results. |
url: | STRING | URL of the request. |
data_until: | STRING | All changes in the source until this date are reflected in this taginfo result. |
data: | ARRAY OF HASHES | Array with results. |
code: | STRING | Language code. |
dir: | STRING | Direction this language is written in ("ltr", "rtl", or "auto"). |
native_name: | STRING | Name of language in this language. |
english_name: | STRING | Name of language in English. |
wiki_key_pages: | INT | Number of "Key" wiki pages in this language. |
wiki_key_pages_fraction: | FLOAT | Number of "Key" wiki pages in this language in relation to the number of keys described in any language in the wiki. |
wiki_tag_pages: | INT | Number of "Tag" wiki pages in this language. |
wiki_tag_pages_fraction: | FLOAT | Number of "Tag" wiki pages in this language in relation to the number of tags described in any language in the wiki. |
|
Example: |
/api/4/wiki/languages?sortname=wiki_key_pages&sortorder=desc |
UI Example: |
/reports/languages |
This website only works with Javascript! Please enable Javascript in your browser.