{
  "id": "osm_id",
  "kind": "datatype",
  "status": "draft",
  "name": "OpenStreetMap element ID",
  "doc": "Identifier of an OpenStreetMap element, that is a node, a way or a relation. IDs are positive 64-bit integers that are unique only within one element type, so node 100 and way 100 are different objects. Datasets write the ID as a bare number, with a type letter (n, w or r; N, W or R in Nominatim), or as type/number like in OpenStreetMap URLs. osm2pgsql stores relation IDs as negative numbers.",
  "children": [
    "osm_node_id",
    "osm_relation_id",
    "osm_way_id"
  ],
  "is_pii": false,
  "categories": [
    "geo"
  ],
  "langs": [
    "common"
  ],
  "classification": "identifier",
  "regexp": "^(?:-|[nwrNWR]|(?:node|way|relation)/)?[1-9][0-9]{0,18}$",
  "examples": [
    {
      "value": "62422",
      "description": "Berlin boundary relation, bare number",
      "valid": true
    },
    {
      "value": "n164979149",
      "description": "Mount Everest summit node, osmium type letter",
      "valid": true
    },
    {
      "value": "w32965412",
      "description": "Statue of Liberty way, osmium type letter",
      "valid": true
    },
    {
      "value": "R62422",
      "description": "Berlin boundary relation, Nominatim lookup form",
      "valid": true
    },
    {
      "value": "relation/51701",
      "description": "Switzerland boundary relation, OpenStreetMap URL form",
      "valid": true
    },
    {
      "value": "-62422",
      "description": "Berlin boundary relation as osm2pgsql stores it",
      "valid": true
    },
    {
      "value": "0",
      "description": "IDs start at 1",
      "valid": false
    },
    {
      "value": "x62422",
      "description": "unknown element type letter",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://wiki.openstreetmap.org/wiki/Elements"
    },
    {
      "type": "doc",
      "url": "https://nominatim.org/release-docs/latest/api/Lookup/"
    },
    {
      "type": "doc",
      "url": "https://docs.osmcode.org/osmium/latest/osmium-getid.html"
    }
  ],
  "translations": {
    "fr": {
      "name": "Identifiant d'objet OpenStreetMap"
    },
    "ru": {
      "name": "Идентификатор объекта OpenStreetMap"
    }
  },
  "quality": {
    "score": 80,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)",
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/any/geo/osm_id.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/geo/osm_id.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/geo/osm_id.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/osm_id",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/osm_id.json"
  }
}