Meta

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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    other_key:STRINGOther key.
    together_count:INTNumber of objects that have both keys.
    to_fraction:FLOATFraction of objects with this key that also have the other key.
    from_fraction:FLOATFraction 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

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:
total:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    project_id:STRINGProject ID
    project_name:STRINGProject name
    project_icon_url:STRINGProject icon URL
    key:STRINGKey
    value:STRINGValue
    on_node:BOOLFor nodes?
    on_way:BOOLFor ways?
    on_relation:BOOLFor relations?
    on_area:BOOLFor areas?
    description:STRINGDescription
    doc_url:STRINGDocumentation URL
    icon_url:STRINGIcon 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    other_key:STRINGOther key.
    count_all:INTNumber of objects that have the other key.
    similarity:INTAn 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    type:STRINGObject type ("all", "nodes", "ways", or "relations")
    count:INTNumber of objects with this type and key.
    count_fraction:FLOATNumber of objects in relation to all objects.
    values:INTNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    value:STRINGValue
    count:INTNumber of times this key/value is in the OSM database.
    fraction:FLOATNumber of times in relation to number of times this key is in the OSM database.
    in_wiki:BOOLIs there at least one wiki page for this tag.
    desclang:STRINGLanguage the description of the tag is in.
    descdir:STRINGWriting direction ("ltr", "rtl", or "auto") of description of the tag.
    description:STRINGDescription 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    lang:STRINGLanguage code.
    dir:STRINGWriting direction ("ltr", "rtl", or "auto") of description.
    language:STRINGLanguage name in its language.
    language_en:STRINGLanguage name in English.
    title:STRINGWiki page title.
    description:STRINGShort description of key from wiki page.
    image:HASHAssociated image.
        title:STRINGWiki page title of associated image.
        width:INTWidth of image.
        height:INTHeight of image.
        mime:STRINGMIME type of image.
        image_url:STRINGImage URL
        thumb_url_prefix:STRINGPrefix of thumbnail URL.
        thumb_url_suffix:STRINGSuffix of thumbnail URL.
    on_node:BOOLIs this a key for nodes?
    on_way:BOOLIs this a key for ways?
    on_area:BOOLIs this a key for areas?
    on_relation:BOOLIs this a key for relations?
    tags_implies:ARRAY OF STRINGSList of keys/tags implied by this key.
    tags_combination:ARRAY OF STRINGSList of keys/tags that can be combined with this key.
    tags_linked:ARRAY OF STRINGSList 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    count_all:INTNumber of objects in the OSM database with this key.
    count_all_fraction:FLOATNumber of objects in relation to all objects.
    count_nodes:INTNumber of nodes in the OSM database with this key.
    count_nodes_fraction:FLOATNumber of nodes in relation to all tagged nodes.
    count_ways:INTNumber of ways in the OSM database with this key.
    count_ways_fraction:FLOATNumber of ways in relation to all ways.
    count_relations:INTNumber of relations in the OSM database with this key.
    count_relations_fraction:FLOATNumber of relations in relation to all relations.
    values_all:INTNumber of different values for this key.
    users_all:INTNumber of users owning objects with this key.
    in_wiki:BOOLHas this key at least one wiki page?
    projects:INTNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key_common:STRINGKey thats used often in OSM database
    count_all_common:INTNumber of objects in the OSM database with the common key.
    key_rare:STRINGKey thats used rarely in OSM database
    count_all_rare:INTNumber of objects in the OSM database with the rare key.
    similarity:INTAn 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    lang:HASHHash 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    count_all:INTNumber of objects in database with this key.
    count_all_fraction:FLOATFraction of objects in database with this key.
    values_all:INTNumber of different values for this key.
    users_all:INTNumber of different users who own objects with this key.
    prevalent_values:HASHOften used values.
        value:STRINGValue
        count:INTNumber of occurances of this value.
        fraction:FLOATFraction 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
    on_node:BOOLFor nodes?
    on_way:BOOLFor ways?
    on_relation:BOOLFor relations?
    on_area:BOOLFor areas?
    description:STRINGDescription
    doc_url:STRINGDocumentation URL
    icon_url:STRINGIcon URL
    count_all:INTEGERNumber of objects with this key/tag in database
    in_wiki:BOOLIs 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    id:STRINGProject id
    name:STRINGProject name
    project_url:STRINGProject URL
    icon_url:STRINGIcon URL
    doc_url:STRINGDocumentation URL
    description:STRINGProject description
    key_entries:INTKey entries for this project
    tag_entries:INTTag entries for this project
    unique_keys:INTUnique keys known to this project
    unique_tags:INTUnique 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    projects:INTNumber of projects using this key
    in_wiki:BOOLIs this key described in any wiki pages
    count_all:INTNumber of objects in the OSM database with this key.
    count_all_fraction:FLOATNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
    projects:INTNumber of projects using this tag
    in_wiki:BOOLIs this tag described in any wiki pages
    count_all:INTNumber of objects in the OSM database with this tag.
    count_all_fraction:FLOATNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    project_id:STRINGProject ID
    project_name:STRINGProject name
    project_icon_url:STRINGProject icon URL
    key:STRINGKey
    value:STRINGValue
    on_node:BOOLFor nodes?
    on_way:BOOLFor ways?
    on_relation:BOOLFor relations?
    on_area:BOOLFor areas?
    description:STRINGDescription
    doc_url:STRINGDocumentation URL
    icon_url:STRINGIcon 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    rtype:STRINGRelation type
    role:STRINGRelation member role.
    count_all_members:INTNumber of members with this role.
    count_all_members_fraction:FLOATNumber of members with this role devided by all members.
    count_node_members:INTNumber of members of type node with this role.
    count_node_members_fraction:FLOATNumber of members of type node with this role devided by all members of type node.
    count_way_members:INTNumber of members of type way with this role.
    count_way_members_fraction:FLOATNumber of members of type way with this role devided by all members of type way.
    count_relation_members:INTNumber of members of type relation with this role.
    count_relation_members_fraction:FLOATNumber 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    type:STRINGMember type ("all", "nodes", "ways", or "relations")
    count:INTNumber 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    lang:STRINGLanguage code.
    language:STRINGLanguage name in its language.
    language_en:STRINGLanguage name in English.
    title:STRINGWiki page title.
    dir:STRINGWriting direction ("ltr", "rtl", or "auto") of description.
    description:STRINGShort description of key from wiki page.
    image:HASHAssociated image.
        title:STRINGWiki page title of associated image.
        width:INTWidth of image.
        height:INTHeight of image.
        mime:STRINGMIME type of image.
        image_url:STRINGImage URL
        thumb_url_prefix:STRINGPrefix of thumbnail URL.
        thumb_url_suffix:STRINGSuffix 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    rtype:STRINGRelation type
    count:INTNumber of relations with this type.
    count_fraction:INTNumber of relations with this type divided by the overall number of relations.
    prevalent_roles:ARRAYPrevalent member roles.
        role:STRINGMember role
        count:INTNumber of members with this role.
        fraction:FLOATNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
    count_all:INTNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    rtype:STRINGRelation type.
    role:STRINGRole
    count_all:INTNumber 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
    count_all:INTNumber 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:STRINGURL
name:STRINGName
description:STRINGDescription
icon:STRINGPath to icon which appears on the lop left corner of all pages.
contact:STRINGContact information to admin.
area:STRINGDescription 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:STRINGName
data_until:STRINGAll changes in the source until this date are reflected in taginfo.
update_start:STRINGDate/Timestamp when last update was started.
update_end:STRINGDate/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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    other_key:STRINGOther key.
    other_value:STRINGOther value (may be empty).
    together_count:INTNumber of objects that have both this tag and other key (or tag).
    to_fraction:FLOATFraction of objects with this tag that also have the other key (or tag).
    from_fraction:FLOATFraction 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

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:
total:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    project_id:STRINGProject ID
    project_name:STRINGProject name
    project_icon_url:STRINGProject icon URL
    key:STRINGKey
    value:STRINGValue
    on_node:BOOLFor nodes?
    on_way:BOOLFor ways?
    on_relation:BOOLFor relations?
    on_area:BOOLFor areas?
    description:STRINGDescription
    doc_url:STRINGDocumentation URL
    icon_url:STRINGIcon 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    type:STRINGObject type ("all", "nodes", "ways", or "relations")
    count:INTNumber of objects with this type and tag.
    count_fraction:FLOATNumber 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    lang:STRINGLanguage code.
    dir:STRINGWriting direction ("ltr", "rtl", or "auto") of description.
    language:STRINGLanguage name in its language.
    language_en:STRINGLanguage name in English.
    title:STRINGWiki page title.
    description:STRINGShort description of tag from wiki page.
    image:HASHAssociated image.
        title:STRINGWiki page title of associated image.
        width:INTWidth of image.
        height:INTHeight of image.
        mime:STRINGMIME type of image.
        image_url:STRINGImage URL
        thumb_url_prefix:STRINGPrefix of thumbnail URL.
        thumb_url_suffix:STRINGSuffix of thumbnail URL.
    on_node:BOOLIs this a tag for nodes?
    on_way:BOOLIs this a tag for ways?
    on_area:BOOLIs this a tag for areas?
    on_relation:BOOLIs this a tag for relations?
    tags_implies:ARRAY OF STRINGSList of keys/tags implied by this tag.
    tags_combination:ARRAY OF STRINGSList of keys/tags that can be combined with this tag.
    tags_linked:ARRAY OF STRINGSList 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
    in_wiki:BOOLIn there a page in the wiki for this tag?
    count_all:INTNumber of objects in the OSM database with this tag.
    count_all_fraction:FLOATNumber of objects in relation to all objects.
    count_nodes:INTNumber of nodes in the OSM database with this tag.
    count_nodes_fraction:FLOATNumber of nodes in relation to all tagged nodes.
    count_ways:INTNumber of ways in the OSM database with this tag.
    count_ways_fraction:FLOATNumber of ways in relation to all ways.
    count_relations:INTNumber of relations in the OSM database with this tag.
    count_relations_fraction:FLOATNumber of relations in relation to all relations.
    on_node:BOOLIs this a tag for nodes?
    on_way:BOOLIs this a tag for ways?
    on_area:BOOLIs this a tag for areas?
    on_relation:BOOLIs this a tag for relations?
    wiki:HASHHash with language codes as keys and values are hashes with the following keys:
        description:STRINGDescription of this tag.
        image:HASHOptional hash with information about descriptive image:
            image:STRINGWiki page title of associated image.
            width:INTWidth of image.
            height:INTHeight of image.
            mime:STRINGMIME type of image.
            image_url:STRINGImage URL
            thumb_url_prefix:STRINGPrefix of thumbnail URL.
            thumb_url_suffix:STRINGSuffix of thumbnail URL.
        osmcarto_rendering:HASHOptional hash with information about default rendering:
            image:STRINGWiki page title of associated image.
            width:INTWidth of image.
            height:INTHeight of image.
            mime:STRINGMIME type of image.
            image_url:STRINGImage URL
            thumb_url_prefix:STRINGPrefix of thumbnail URL.
            thumb_url_suffix:STRINGSuffix 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:INTTotal number of results.
page:INTResult page number (first has page number 1).
rp:INTResults per page.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    key:STRINGKey
    value:STRINGValue
    in_wiki:BOOLIn there a page in the wiki for this tag?
    count_all:INTNumber of objects in the OSM database with this tag.
    count_all_fraction:FLOATNumber of objects in relation to all objects.
    count_nodes:INTNumber of nodes in the OSM database with this tag.
    count_nodes_fraction:FLOATNumber of nodes in relation to all tagged nodes.
    count_ways:INTNumber of ways in the OSM database with this tag.
    count_ways_fraction:FLOATNumber of ways in relation to all ways.
    count_relations:INTNumber of relations in the OSM database with this tag.
    count_relations_fraction:FLOATNumber of relations in relation to all relations.
    projects:INTNumber 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:INTTotal number of results.
url:STRINGURL of the request.
data_until:STRINGAll changes in the source until this date are reflected in this taginfo result.
data:ARRAY OF HASHESArray with results.
    code:STRINGLanguage code.
    dir:STRINGDirection this language is written in ("ltr", "rtl", or "auto").
    native_name:STRINGName of language in this language.
    english_name:STRINGName of language in English.
    wiki_key_pages:INTNumber of "Key" wiki pages in this language.
    wiki_key_pages_fraction:FLOATNumber of "Key" wiki pages in this language in relation to the number of keys described in any language in the wiki.
    wiki_tag_pages:INTNumber of "Tag" wiki pages in this language.
    wiki_tag_pages_fraction:FLOATNumber 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.