{
  "id": "de_ags",
  "kind": "datatype",
  "status": "stable",
  "name": "German municipality key (Amtlicher Gemeindeschlüssel, AGS)",
  "doc": "Eight-digit official code of a German municipality that the statistical offices publish in the municipality directory (Gemeindeverzeichnis): two digits for the state (01 Schleswig-Holstein to 16 Thüringen), one for the government region, two for the district and three for the municipality. The first five digits are the district key (Kreisschlüssel).",
  "is_pii": false,
  "categories": [
    "geo"
  ],
  "country": [
    "DE"
  ],
  "langs": [
    "common"
  ],
  "classification": "identifier",
  "regexp": "^(?:0[1-9]|1[0-6])\\d{6}$",
  "examples": [
    {
      "value": "03459033",
      "description": "Wallenhorst",
      "valid": true
    },
    {
      "value": "12060020",
      "description": "Bernau bei Berlin",
      "valid": true
    },
    {
      "value": "3459033",
      "description": "Leading zero dropped",
      "valid": false
    },
    {
      "value": "17060020",
      "description": "There is no state 17",
      "valid": false
    }
  ],
  "mappings": {
    "wikidata": "P439"
  },
  "links": [
    {
      "type": "wikipedia",
      "url": "https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl%C3%BCssel"
    },
    {
      "type": "wikidata",
      "url": "https://www.wikidata.org/wiki/Property:P439"
    },
    {
      "type": "doc",
      "url": "https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/_inhalt.html"
    }
  ],
  "translations": {
    "de": {
      "name": "Amtlicher Gemeindeschlüssel (AGS)"
    },
    "ru": {
      "name": "Официальный код общины Германии (AGS)",
      "doc": "Восьмизначный код общины - две цифры земли, одна цифра административного округа, две цифры района и три цифры общины."
    }
  },
  "quality": {
    "score": 90,
    "missing": [
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/DE/geo/de_ags.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/DE/geo/de_ags.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/DE/geo/de_ags.yaml"
  },
  "urls": {
    "html": "http://registry.apicrafter.io/datatype/de_ags",
    "json": "http://registry.apicrafter.io/api/v1/datatypes/de_ags.json"
  }
}