---
id: "esnif"
kind: "datatype"
status: "stable"
is_pii: true
categories: ["pii", "persons"]
country: ["ES"]
langs: ["es"]
quality: 65
url: "http://registry.apicrafter.io/datatype/esnif"
---

# Spanish Tax identification number (`esnif`)

Spanish tax identification number used to identify tax paying individuals

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Spain (ES)
- Languages: Spanish (es)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
[0-9]?[0-9]{7}[-]?[A-Z]
```

## Mappings

- dpv: `pd:OfficialID`
- google_dlp: `SPAIN_NIF_NUMBER`
- presidio: `ES_NIF`
- purview: `Spain tax identification number`, `EU Tax Identification Number (TIN)`, `EU Tax identification number`
- schema_org: `taxID`
- stdnum: `es.nif`

## Metacrafter rules

4 rules: 2 match the field name, 2 match values.

- `esniffield` (field, `es/es_persons.yaml`)
- `esnifvalue` (data, `es/es_persons.yaml`)
- `es_pii_esniffield` (field, `pii/es/es_pii.yaml`)
- `es_pii_esnifvalue` (data, `pii/es/es_pii.yaml`)

## Supported by tools

- `amazonmacie`
- `awsglue`
- `azureailanguage`
- `dataprep`
- `googledlp`
- `ibmguardium`
- `ibmknowledgecatalog`
- `metacrafter`
- `microsoftpurview`
- `openmetadata`
- `presidio`
- `pythonstdnum`
- `snowflake`

## Sources

- wikipedia: <https://es.wikipedia.org/wiki/N%C3%BAmero_de_identificaci%C3%B3n_fiscal>

## Quality

Score 65/100. Missing: anchored regexp, examples, negative example, translation.

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