### /api/4/site/info Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get information about this taginfo site. ```APIDOC ## GET /api/4/site/info ### Description Get information about this taginfo site. ### Method GET ### Endpoint /api/4/site/info ### Response #### Success Response (200) - **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. #### Response Example ```json { "url": "http://taginfo.example.com", "name": "Taginfo Example", "description": "An example Taginfo instance.", "icon": "/images/icon.png", "contact": "admin@example.com", "area": "Global" } ``` ``` -------------------------------- ### /api/4/site/config/geodistribution Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get information about the background map for distribution charts. ```APIDOC ## GET /api/4/site/config/geodistribution ### Description Get information about the background map for distribution charts. ### Method GET ### Endpoint /api/4/site/config/geodistribution ### Response #### Success Response (200) - **width** (integer) - width of background image - **height** (integer) - height of background image - **scale_image** (float) - scale factor for images - **scale_compare_image** (float) - scale factor for comparison images - **background_image** (string) - URL of background image - **image_attribution** (string) - map attribution for comparison background #### Response Example ```json { "width": 1024, "height": 768, "scale_image": 1.0, "scale_compare_image": 0.8, "background_image": "http://example.com/background.png", "image_attribution": "© OpenStreetMap contributors" } ``` ``` -------------------------------- ### /api/4/site/sources Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get information about the data sources used by Taginfo. ```APIDOC ## GET /api/4/site/sources ### Description Get information about the data sources used by Taginfo. ### Method GET ### Endpoint /api/4/site/sources ### Response #### Success Response (200) - **data** (array of hashes) - Array with results. - **id** (string) - Id - **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. #### Response Example ```json { "data": [ { "id": "osm", "name": "OpenStreetMap", "data_until": "2023-10-27T10:00:00Z", "update_start": "2023-10-27T09:00:00Z", "update_end": "2023-10-27T09:30:00Z" } ] } ``` ``` -------------------------------- ### /api/4/tag/distribution/ways Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get a map image showing the distribution of a specific tag on ways in the database. Returns an empty image if no map is available. ```APIDOC ## GET /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. ### Method GET ### Endpoint `/api/4/tag/distribution/ways` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. - **value** (string) - Required - Tag value. ### Result PNG image representing the tag distribution on ways. ``` -------------------------------- ### Get Wikidata Keys Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves all Wikidata entries associated with keys. Supports filtering by language and a query string, with options for paging and sorting. ```APIDOC ## GET /api/4/wikidata/keys ### Description Get all wikidata entries about keys. Supports filtering by language and a query string, with options for paging and sorting. ### Method GET ### Endpoint `/api/4/wikidata/keys` ### Parameters #### Query Parameters - **lang** (string) - Optional - Language for description (default: 'en'). - **query** (string) - Optional - Only show results matching this string (substring match on key/item code/item description). #### Paging This endpoint supports paging. #### Sort - **key** - **item** ### 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. - **item** (STRING) - The wikidata items Q or P code. - **key** (STRING) - The OSM key. - **description** (STRING) - The description of the wikidata item. ### Request Example `/api/4/wikidata/keys?lang=fr&page=1&rp=10&sortname=item&sortorder=asc` ``` -------------------------------- ### /api/4/tags/list Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get information on given tags or all tags documented on the wiki with a specific key. This endpoint allows querying for specific tags or retrieving all tags associated with a given key. ```APIDOC ## GET /api/4/tags/list ### Description Get information on given tags or all tags documented on the wiki with given key. ### Method GET ### Endpoint /api/4/tags/list ### Parameters #### Query Parameters - **key** (string) - Optional - Key (optional) - **tags** (string) - Optional - Comma-separated list of tags in format key1=value1a,value1b,...,key2=value2a,value2b,... (optional) ### 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 at least one wiki page 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. ### Notes You have to either use the `key` parameter or the `tags` parameter. ``` -------------------------------- ### Get Wikidata Tags Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves all Wikidata entries associated with tags. Supports filtering by language and a query string, with options for paging and sorting. ```APIDOC ## GET /api/4/wikidata/tags ### Description Get all wikidata entries about tags. Supports filtering by language and a query string, with options for paging and sorting. ### Method GET ### Endpoint `/api/4/wikidata/tags` ### Parameters #### Query Parameters - **lang** (string) - Optional - Language for description (default: 'en'). - **query** (string) - Optional - Only show results matching this string (substring match on key/value/item code/item description). #### Paging This endpoint supports paging. #### Sort - **tag** - **item** ### 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. - **item** (STRING) - The wikidata items Q or P code. - **key** (STRING) - The OSM key. - **value** (STRING) - The OSM value. - **description** (STRING) - The description of the wikidata item. ### Request Example `/api/4/wikidata/tags?lang=fr&page=1&rp=10&sortname=item&sortorder=asc` ``` -------------------------------- ### /api/4/tag/overview Source: https://taginfo.openstreetmap.org/taginfo/apidoc Show various data for a given tag, including project mentions, wiki page availability, and object counts. ```APIDOC ## GET /api/4/tag/overview ### Description Show various data for given tag. ### Method GET ### Endpoint `/api/4/tag/overview` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. - **value** (string) - Required - Tag value. ### Result - **total** (integer) - Total number of results (always 1). - **url** (string) - URL of the request. - **data_until** (string) - All changes in the source until this date are reflected in this taginfo result. - **data** (hash) - Hash with data: - **key** (string) - The tag key that was requested. - **value** (string) - The tag value that was requested. - **projects** (integer) - Number of projects mentioning this tag. - **wiki_pages** (array of hashes) - Language codes for which wiki pages about this tag are available. Each hash contains: - **lang** (string) - Language code. - **english** (string) - English name of this language. - **native** (string) - Native name of this language. - **dir** (string) - Printing direction for native name ("ltr", "rtl", or "auto"). - **has_map** (boolean) - Is a map with the geographical distribution of this tag available? - **counts** (array of hashes) - Objects counts. Each hash contains: - **type** (string) - Object type ("all", "nodes", "ways", or "relations"). - **count** (integer) - Number of objects with this type and tag. - **count_fraction** (float) - Number of objects in relation to all objects. - **description** (hash of hashes) - Description of this tag (hash key is language code). Each hash contains: - **text** (string) - Description text. - **dir** (string) - Printing direction for this language ("ltr", "rtl", or "auto"). ### Request Example `/api/4/tag/overview?key=amenity&value=restaurant` ``` -------------------------------- ### /api/4/key/overview Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves comprehensive data for a specified tag key, including counts, associated projects, and wiki page availability. ```APIDOC ## /api/4/key/overview ### Description Show various data for given key. ### Method GET ### Endpoint `/api/4/key/overview` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. ### Result - **total** (integer) - Total number of results (always 1). - **url** (string) - URL of the request. - **data_until** (string) - All changes in the source until this date are reflected in this taginfo result. - **data** (hash) - Hash with data. - **key** (string) - The tag key that was requested. - **projects** (integer) - Number of projects mentioning this key. - **users** (integer) - Number of users last editing objects with this key. - **wiki_pages** (array of hashes) - Language codes for which wiki pages about this key are available. - **lang** (string) - Language code. - **english** (string) - English name of this language. - **native** (string) - Native name of this language. - **dir** (string) - Printing direction for native name ("ltr", "rtl", or "auto"). - **has_map** (boolean) - Is a map with the geographical distribution of this key available? - **counts** (array of hashes) - Objects counts. - **type** (string) - Object type ("all", "nodes", "ways", or "relations"). - **count** (integer) - Number of objects with this type and key. - **count_fraction** (float) - Number of objects in relation to all objects. - **values** (integer) - Number of different values for this key. - **description** (hash of hashes) - Description of this key (hash key is language code). - **text** (string) - Description text. - **dir** (string) - Printing direction for this language ("ltr", "rtl", or "auto"). - **prevalent_values** (array of hashes) - Prevalent values ordered by count from most often used down. - **value** (string) - The tag value. - **count** (integer) - Number of objects with this tag value. - **fraction** (float) - Fraction of number of objects with this tag value compared to all objects. ``` -------------------------------- ### /api/4/tag/chronology Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get chronology of tag counts for a specific tag. ```APIDOC ## GET /api/4/tag/chronology ### Description Get chronology of tag counts for a specific tag. ### Method GET ### Endpoint /api/4/tag/chronology ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. - **value** (string) - Required - Tag value. ### Request Example ```json { "key": "highway", "value": "primary" } ``` ### Response #### Success Response (200) - **total** (integer) - 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. - **date** (text) - Date in format YYYY-MM-DD. - **nodes** (integer) - Difference of number of nodes with this tag relative to previous entry. - **ways** (integer) - Difference of number of ways with this tag relative to previous entry. - **relations** (integer) - Difference of number of relations with this tag relative to previous entry. #### Response Example ```json { "total": 100, "url": "/api/4/tag/chronology?key=highway&value=primary", "data_until": "2023-10-27T10:00:00Z", "data": [ { "date": "2023-10-26", "nodes": 10, "ways": 5, "relations": 1 }, { "date": "2023-10-25", "nodes": -5, "ways": -2, "relations": 0 } ] } ``` ``` -------------------------------- ### /api/4/projects/all Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of all projects known to Taginfo. Supports filtering by query and status, with options for paging and sorting. ```APIDOC ## GET /api/4/projects/all ### Description Get list of all projects using OSM tags known to taginfo. ### Method GET ### Endpoint /api/4/projects/all ### Parameters #### Query Parameters - **query** (string) - Optional - Only show projects where name or description matches this query (substring match). - **status** (string) - Optional - Only show projects with given status (default is "OK"). ### Paging Optional paging parameters are supported. ### Sort Supports sorting by `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 ### Request Example ```json /api/4/projects/all?page=1&rp=10&sortname=name&sortorder=asc ``` ``` -------------------------------- ### /api/4/projects/keys Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of all keys used by at least one project. Supports filtering by a query string and pagination. ```APIDOC ## GET /api/4/projects/keys ### Description Get list of all keys used by at least one project. ### Method GET ### Endpoint `/api/4/projects/keys` ### Parameters #### Query Parameters - **query** (string) - Optional - Only show keys matching this query (substring match). - **page** (integer) - Optional - Result page number (first has page number 1). - **rp** (integer) - Optional - Results per page. - **sortname** (string) - Optional - Sort by `key`, `projects`, `in_wiki`, `count_all`. - **sortorder** (string) - Optional - Sort order (asc or desc). ### Response #### Success Response (200) - **total** (integer) - Total number of results. - **page** (integer) - Result page number. - **rp** (integer) - 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** (integer) - Number of projects using this key - **in_wiki** (boolean) - Is there at least one wiki page for this key? - **count_all** (integer) - Number of objects in the OSM database with this key. - **count_all_fraction** (float) - Number of objects in relation to all objects. ### Request Example `/api/4/projects/keys?page=1&rp=10&sortname=key&sortorder=asc` ``` -------------------------------- ### /api/4/tags/popular Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get a list of the most frequently used tags. This endpoint is useful for discovering commonly used tags and can be filtered by a query. ```APIDOC ## GET /api/4/tags/popular ### Description Get list of most often used tags. ### Method GET ### Endpoint /api/4/tags/popular ### Parameters #### Query Parameters - **query** (string) - Optional - Only show tags matching this query (substring match in key and value, optional). ### Paging Optional ### 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 at least one wiki page 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 ``` -------------------------------- ### /api/4/key/projects Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of projects that utilize a specific tag key, with options for filtering and sorting. ```APIDOC ## /api/4/key/projects ### Description Get projects using a given key. ### Method GET ### Endpoint `/api/4/key/projects` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. - **query** (string) - Optional - Only show results where the project name or tag value matches this query (substring match). #### Query Parameters (Filter) - **filter** (string) - Optional - Filter by object type: `all`, `nodes`, `relations`, `ways`. #### Query Parameters (Paging) - **page** (integer) - Optional - Result page number (first has page number 1). - **rp** (integer) - Optional - Results per page. #### Query Parameters (Sort) - **sortname** (string) - Optional - Sort by `project_name` or `tag`. - **sortorder** (string) - Optional - Sort order: `asc` or `desc`. ### Result - **total** (integer) - Total number of results. - **page** (integer) - Result page number (first has page number 1). - **rp** (integer) - 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** (boolean) - For nodes? - **on_way** (boolean) - For ways? - **on_relation** (boolean) - For relations? - **on_area** (boolean) - For areas? - **description** (string) - Description. - **doc_url** (string) - Documentation URL. - **icon_url** (string) - Icon URL. ``` -------------------------------- ### /api/4/keys/all Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of all keys available in the Taginfo database. This endpoint supports filtering and sorting to help narrow down the results. ```APIDOC ## /api/4/keys/all ### Description Get list of all keys. ### Method GET ### Endpoint `/api/4/keys/all` ### Parameters #### Query Parameters - **query** (string) - Optional - Only show keys matching this query (substring match). #### Filter Parameters - **characters_colon** (boolean) - Category B: Only show keys like category A but with one ore more colons (:) inside. - **characters_letters** (boolean) - Category C: Only show keys like category B but with uppercase latin letters or letters from other scripts. - **characters_plain** (boolean) - Category A: Only show keys with latin lowercase letters (a to z) or underscore (_), first and last characters must be letters. - **characters_problem** (boolean) - Category E: Only show keys with problematic characters. - **characters_rest** (boolean) - Category F: Only show keys not fitting in category A through E. - **characters_space** (boolean) - Category D: Only show keys with at least one whitespace character (space, tab, new line, carriage return, or from other scripts). - **in_wiki** (boolean) - Only show keys that appear in the wiki. - **not_in_db** (boolean) - Only show keys that do not appear in the database. #### Sort Parameters - **key** (string) - Sort by key name. - **count_all** (string) - Sort by total count of objects. - **count_nodes** (string) - Sort by count of nodes. - **count_ways** (string) - Sort by count of ways. - **count_relations** (string) - Sort by count of relations. - **values_all** (string) - Sort by number of different values. - **users_all** (string) - Sort by number of users. - **in_wiki** (string) - Sort by wiki presence. - **length** (string) - Sort by key length. ### Result #### Success Response - **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) - Is there at least one wiki page for this key? - **projects** (INT) - Number of projects using this key ### Request Example `/api/4/keys/all?page=1&rp=10&filter=in_wiki&sortname=key&sortorder=asc` ``` -------------------------------- ### /api/4/tag/distribution/nodes Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get a map image showing the distribution of a specific tag on nodes in the database. Returns an empty image if no map is available. ```APIDOC ## GET /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. ### Method GET ### Endpoint `/api/4/tag/distribution/nodes` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. - **value** (string) - Required - Tag value. ### Result PNG image representing the tag distribution on nodes. ``` -------------------------------- ### /api/4/keys/similar Source: https://taginfo.openstreetmap.org/taginfo/apidoc Fetches a list of similar key pairs, where one key is used frequently and the other rarely. Supports JSON format, optional query filtering, paging, and sorting. ```APIDOC ## /api/4/keys/similar ### Description Get list of pairs of similar keys, one used very often, one used rarely. ### Method GET ### Endpoint `/api/4/keys/similar` ### Parameters #### Query Parameters - **query** (string) - Optional - Only show keys matching this query (substring match). - **page** (INT) - Optional - Result page number (first has page number 1). - **rp** (INT) - Optional - Results per page. - **sortname** (string) - Optional - Field to sort by. Allowed values: `key_common`, `key_rare`, `count_all_common`, `count_all_rare`, `similarity`. - **sortorder** (string) - Optional - Order of sorting. Allowed values: `asc`, `desc`. ### 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. ### Request Example ```json { "example": "/api/4/keys/similar?page=1&rp=10&sortname=count_all_common&sortorder=desc" } ``` ``` -------------------------------- ### /api/4/key/values Source: https://taginfo.openstreetmap.org/taginfo/apidoc Get values used with a given key. Supports JSON and CSV formats, with optional language, query filtering, and sorting. ```APIDOC ## /api/4/key/values ### Description Get values used with a given key. ### Method GET ### Endpoint `/api/4/key/values` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. - **lang** (string) - Optional - Language for description (default: 'en'). - **query** (string) - Optional - Only show results where the value matches this query (substring match). ### Paging Optional. Parameters like `page` and `rp` can be used. ### Filter Supports filtering by `all`, `nodes`, `relations`, or `ways`. ### Sort Supports sorting by `value`, `count_all`, `count_nodes`, `count_ways`, `count_relations`, or `in_wiki`. ### Result - **total** (integer) - Total number of results. - **page** (integer) - Result page number. - **rp** (integer) - 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** (integer) - 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** (boolean) - Is there at least one wiki page for this tag? - **description** (string) - Description of the tag from the wiki. - **desclang** (string) - Language the description of the tag is in. - **descdir** (string) - Writing direction ("ltr", "rtl", or "auto") of description of the tag. ### Request Example `/api/4/key/values?key=highway&page=1&rp=10&sortname=count_ways&sortorder=desc` ``` -------------------------------- ### /api/4/key/distribution/ways Source: https://taginfo.openstreetmap.org/taginfo/apidoc Generates a PNG image visualizing the geographical distribution of a specific tag key across ways in the OpenStreetMap database. ```APIDOC ## GET /api/4/key/distribution/ways ### Description Get map with distribution of this key in the database (ways only). ### Method GET ### Endpoint `/api/4/key/distribution/ways` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key. ### Result - PNG image. ### Example `/api/4/key/distribution/ways?key=highway` ``` -------------------------------- ### /api/4/wiki/key_status Source: https://taginfo.openstreetmap.org/taginfo/apidoc Lists all keys documented on the wiki along with their status. An optional status filter can be applied. Supports optional paging. ```APIDOC ## GET /api/4/wiki/key_status ### Description List all keys documented on the wiki with their status. ### Method GET ### Endpoint /api/4/wiki/key_status ### Parameters #### Query Parameters - **status** (string) - Optional - Only show keys with this status. - **page** (integer) - Optional - Result page number (first has page number 1). - **rp** (integer) - Optional - Results per page. ### Response #### Success Response (200) - **total** (integer) - Total number of results. - **page** (integer) - Result page number. - **rp** (integer) - 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, where each hash contains: - **status** (string) - Status. - **key** (string) - Key. - **langs** (array of strings) - List of languages that have this status and key. ### Request Example ```json { "example": "/api/4/wiki/key_status?status=obsolete" } ``` ``` -------------------------------- ### /api/4/keys/wiki_pages Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of wiki pages in various languages for all keys. Supports JSON format, optional query filtering, paging, and sorting by key. ```APIDOC ## /api/4/keys/wiki_pages ### Description Get list of wiki pages in different languages for all keys. ### Method GET ### Endpoint `/api/4/keys/wiki_pages` ### Parameters #### Query Parameters - **query** (string) - Optional - Only show keys matching this query (substring match). - **page** (INT) - Optional - Result page number (first has page number 1). - **rp** (INT) - Optional - Results per page. - **sortname** (string) - Optional - Field to sort by. Allowed values: `key`. - **sortorder** (string) - Optional - Order of sorting. Allowed values: `asc`, `desc`. ### 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. ### Request Example ```json { "example": "/api/4/keys/wiki_pages?page=1&rp=10&sortname=key&sortorder=asc" } ``` ``` -------------------------------- ### /api/4/project/tags Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of all keys and tags used by a specific project. Supports JSON and CSV formats, with options for paging and sorting. ```APIDOC ## GET /api/4/project/tags ### Description Get list of all keys/tags used by a project. ### Method GET ### Endpoint /api/4/project/tags ### Parameters #### Query Parameters - **project** (string) - Required - Project ID ### Paging Optional paging parameters are supported. ### Sort Supports sorting by `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 there at least one wiki page for this key/tag? ### Request Example ```json /api/4/project/tags?project=id_editor&page=1&rp=10&sortname=tag&sortorder=asc ``` ``` -------------------------------- ### /api/4/project/icon Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves the icon for a given project. Requires a project ID. ```APIDOC ## GET /api/4/project/icon ### Description Get icon of a project. ### Method GET ### Endpoint /api/4/project/icon ### Parameters #### Query Parameters - **project** (string) - Required - Project ID ### Result Image in some format. ### Request Example ```json /api/4/project/icon?project=id_editor ``` ``` -------------------------------- ### /api/4/key/wiki_pages Source: https://taginfo.openstreetmap.org/taginfo/apidoc Retrieves a list of wiki pages in various languages that describe a specific tag key. This endpoint is useful for understanding the context and usage of a particular key. ```APIDOC ## /api/4/key/wiki_pages ### Description Get list of wiki pages in different languages describing a key. ### Method GET ### Endpoint `/api/4/key/wiki_pages` ### Parameters #### Query Parameters - **key** (string) - Required - Tag key ### Result #### Success Response - **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. - **status** (STRING) - Status of this key/tag. ### Request Example `/api/4/key/wiki_pages?key=highway` ### 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/wiki/inconsistent_key_status Source: https://taginfo.openstreetmap.org/taginfo/apidoc Lists all keys documented on the wiki that have differing statuses across different languages. Supports optional paging. ```APIDOC ## GET /api/4/wiki/inconsistent_key_status ### Description List all keys documented on the wiki which have a different status in different languages. ### Method GET ### Endpoint /api/4/wiki/inconsistent_key_status ### Parameters #### Query Parameters - **page** (integer) - Optional - Result page number (first has page number 1). - **rp** (integer) - Optional - Results per page. ### Response #### Success Response (200) - **total** (integer) - Total number of results. - **page** (integer) - Result page number. - **rp** (integer) - 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, where each hash contains: - **key** (string) - Key. - **counts** (hash) - Hash mapping status values to counts of wiki pages. ### Request Example ```json { "example": "/api/4/wiki/inconsistent_key_status" } ``` ```