A key is needed. You can ask here for the key required to use the API:
https://www.nif.pt/contactos/api/
APIs:
- Search (Pesquisa): It allows you to validate a NIF and obtain all the information about it.
- Purchase of credits (CompraDeCreditos): If you exceed the free usage limits, you can top up your account with credits. Using an order as an example below, you will obtain payment details, which you can use at any ATM or your home banking. The parameters invoice_name and invoice_nif are not mandatory (in these cases, the invoice will be issued to "Final Consumer"), but if invoice_nif is sent, it must be a valid TIN.
- Credit Check (VerificacaoDeCreditos): To find out how many credits you've spent, whether they're free or paid.
More information: https://www.nif.pt/