---
id: "ddi_agency_id"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["science", "government"]
langs: ["common"]
quality: 80
url: "http://registry.apicrafter.io/datatype/ddi_agency_id"
---

# DDI agency identifier (`ddi_agency_id`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Identifier of an organization that maintains metadata in the Data Documentation Initiative (DDI) standard, such as a national statistics office, a data archive or a survey project. The organization registers it in the DDI Agency Registry in the form country code, dot, name (for example dk.dst; international bodies use int, as in int.esseric), and may extend it with sub-agency labels separated by dots (us.mpc.ipums). The DDI Lifecycle schema allows labels of letters, digits and hyphens, up to 63 characters each and 253 in total. It also accepts a single label, but the identifiers listed in the registry all have a prefix, so the regexp requires at least one dot and a first label of two or three letters (the country code or int). Without that, dates such as 01.01.2015 and decimal numbers matched. The agency identifier is the namespace part of DDI URNs (urn:ddi:<agency>:<id>:<version>) and the registration authority in ISO/IEC 11179-6 identifiers (IRDI).

- Personal data (PII): no
- Categories: Scientific (science), Government related (government)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?=.{3,253}$)[A-Za-z]{2,3}(?:\.[A-Za-z0-9-]{1,63})+$
```

## Examples

- `dk.dst` — Statistics Denmark
- `ca.statcan` — Statistics Canada
- `fr.insee` — INSEE, France
- `us.mpc.ipums` — Sub-agency of us.mpc (Minnesota Population Center), from the DDI Lifecycle guide
- `urn:ddi:us.mpc:V321:2` (invalid example) — Full DDI URN, not the agency identifier alone
- `01.01.2015` (invalid example) — A date, not an agency identifier

## Translations

- fr: Identifiant d'agence DDI
- ru: Идентификатор агентства DDI

## Sources

- doc: <https://registry.ddialliance.org/Agency>
- doc: <https://docs.ddialliance.org/DDI-Lifecycle/3.3/xmlschema/schemas/reusable_xsd/simpleTypes/DDIAgencyIDType.html>
- doc: <https://docs.ddialliance.org/DDI-Lifecycle/guide/General%20Structures/Identification/>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/ddi_agency_id.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/science/ddi_agency_id.yaml>
