Portugal NIF, IBAN, Postcode & CAE Validator avatar

Portugal NIF, IBAN, Postcode & CAE Validator

Pricing

from $0.35 / 1,000 result items

Go to Apify Store
Portugal NIF, IBAN, Postcode & CAE Validator

Portugal NIF, IBAN, Postcode & CAE Validator

One input item checked and returned as a dataset row, valid or not.

Pricing

from $0.35 / 1,000 result items

Rating

0.0

(0)

Developer

PearLink Systems Unipessoal

PearLink Systems Unipessoal

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

4 days ago

Last modified

Categories

Share

Returns one row per input value saying whether it is a valid Portuguese NIF/NIPC tax number, IBAN (any country), Portuguese postcode (código postal) or CAE-Rev.4 activity code, with its normalized form and the facts it encodes: taxpayer entity type (person, company, public body, fund…), bank and branch code, or the official CAE designation. Input is a list of up to 100,000 strings, auto-detected or forced to one kind. Source: check-digit algorithms plus the official CAE-Rev.4 list (Decreto-Lei n.º 9/2025); no external calls, nothing stored. Price: $0.50 per 1,000 items, valid or not.

What you can use it for

  • Clean a CRM or supplier list before importing it: catch mistyped NIFs and IBANs, normalize PT 500.000.000 to 500000000.
  • Tell companies from people: the NIF prefix shows whether a taxpayer is a natural person, a company, a public body, an estate or an investment fund. Useful for GDPR filtering.
  • Check payment details before a SEPA transfer: mod-97 checksum for every country, plus the Portuguese NIB check digits and bank/branch codes for PT IBANs.
  • Map CAE codes to activity names using the official CAE-Rev.4 list (in force since 1 January 2025).
  • Let an AI agent validate data through Apify's MCP server: send a list, read back structured rows.

Input

FieldTypeDescription
itemsstring[]Values to validate, up to 100,000. Spaces and dots are ignored. Send values as strings so leading zeros in CAE codes survive.
kindstringauto (default) detects each item's kind from its shape. Or force nif, iban, postcode or cae.
{
"items": ["123456789", "PT50 0002 0123 1234 5678 9015 4", "1000-001", "62100"],
"kind": "auto"
}

More inputs that return results:

  • Supplier NIFs, one invalid: {"items": ["500051070", "600052737", "PT 515 615 021", "500000001"], "kind": "nif"}
  • IBANs from several countries: {"items": ["PT50000201231234567890154", "DE89370400440532013000", "GB82WEST12345698765432"], "kind": "iban"}
  • Every CAE level: {"items": ["J", "62", "621", "6210", "62100"], "kind": "cae"}

Output

One dataset row per input item, in input order.

[
{
"input": "123456789",
"kind": "nif",
"valid": true,
"normalized": "123456789",
"details": { "entityType": "natural-person", "isNaturalPerson": true },
"error": null
},
{
"input": "PT50 0002 0123 1234 5678 9015 4",
"kind": "iban",
"valid": true,
"normalized": "PT50000201231234567890154",
"details": { "country": "PT", "bankCode": "0002", "branchCode": "0123" },
"error": null
},
{
"input": "1000-001",
"kind": "postcode",
"valid": true,
"normalized": "1000-001",
"details": { "formatOnly": true },
"error": null
},
{
"input": "62100",
"kind": "cae",
"valid": true,
"normalized": "62100",
"details": {
"revision": "CAE-Rev.4",
"level": "subclass",
"designation": "Atividades de programação informática"
},
"error": null
},
{
"input": "500000001",
"kind": "nif",
"valid": false,
"normalized": "500000001",
"details": null,
"error": "Invalid NIF check digit"
}
]
FieldMeaning
inputThe item exactly as you sent it.
kindnif, iban, postcode, cae, or unknown when auto-detection could not classify it.
validtrue when every check for that kind passed.
normalizedCanonical form (NIF as 9 digits, IBAN uppercase without spaces, CAE without dots).
detailsKind-specific facts, see below. null for invalid items.
errorWhy the item is invalid, in English. null for valid items.

What each kind checks

  • NIF/NIPC: 9 digits and the mod-11 check digit. entityType comes from the prefix: 1, 2, 3 natural person; 45 non-resident natural person; 8 sole trader (old series); 5 legal person; 6 public administration; 70, 74, 75 undivided estate; 71 non-resident legal person; 72 investment fund; 77, 78, 79 special tax-authority series; 90, 91 condominium or irregular company; 98 non-resident without establishment; 99 civil company without legal personality.
  • IBAN: ISO 13616 format and mod-97 checksum for any country. Portuguese IBANs also get a length check (25), a NIB check-digit check, and bankCode / branchCode. Other countries' lengths are not checked individually.
  • Postcode: format NNNN-NNN only. The Actor does not confirm that the postcode exists (details.formatOnly is always true), because the CTT postcode database is not openly licensed.
  • CAE: the code must exist in CAE-Rev.4 at any level: section (J), division (62), group (621), class (6210) or subclass (62100). details gives the level and the official Portuguese designation.

Pricing

You pay $0.50 per 1,000 items ($0.0005 per item), valid or invalid, plus Apify's small per-run start fee. If you set a maximum cost for the run, the Actor stops cleanly at that limit, and you get exactly the rows you paid for.

Data sources and licence

  • NIF, IBAN and postcode checks are algorithms; no external data is used. The NIF prefix table follows the Autoridade Tributária / RNPC series.
  • The CAE-Rev.4 list is extracted from the annex of Decreto-Lei n.º 9/2025, as published by INE in its metadata system (SMI, version 5497). Official legislative texts are not protected by copyright in Portugal (Código do Direito de Autor, art. 8.º).
  • This Actor is not affiliated with or endorsed by the Autoridade Tributária, INE, Banco de Portugal or CTT.
  • No input data is stored beyond your own run's dataset, and nothing you send is logged.