nif APInif.pt ↗
Search and retrieve Portuguese company data by name or NIF tax number. Get company name, NIF, and registered location via 2 simple endpoints.
What is the nif API?
The nif.pt API gives developers access to Portuguese company records through 2 endpoints: search_companies for name-based searches and get_company for direct NIF lookups. Each response returns structured fields including the 9-digit NIF, registered company name, and postal location. It covers companies registered in Portugal and is suited for business verification, data enrichment, and due-diligence workflows.
curl -X GET 'https://api.parse.bot/scraper/471eb2aa-f1ff-487d-818c-76243e8fe6ba/search_companies?query=sonae' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace nif-pt-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: NIF.PT SDK — bounded, re-runnable; every call capped."""
from parse_apis.nif_pt_api import NifPt, CompanyNotFound
client = NifPt()
# Search companies by name
for company in client.companies.search(query="sonae", limit=3):
print(company.name, company.nif, company.location)
# Get a specific company by NIF
try:
detail = client.companies.get(nif="506467473")
print(detail.name, detail.nif, detail.location)
except CompanyNotFound as e:
print(f"Company not found: {e.nif}")
print("exercised: companies.search, companies.get")
Search Portuguese companies by name. Returns all matching companies with their NIF, name, and location. A single page of results is returned per query.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Company name or partial name to search for. |
{
"type": "object",
"fields": {
"companies": "array of company results with nif, name, and location"
},
"sample": {
"data": {
"companies": [
{
"nif": "506440613",
"name": "Sonae Holdings, S.a",
"location": "4470-177 Maia"
},
{
"nif": "509736530",
"name": "Sonae Corporate, S.a",
"location": "4470-177 Maia"
}
]
},
"status": "success"
}
}About the nif API
Endpoints and Data Coverage
The API exposes two endpoints for querying the Portuguese company registry. search_companies accepts a query parameter — a full or partial company name — and returns an array of matching companies, each with their nif, name, and location. This is useful when you have a business name but need the corresponding tax identification number. get_company takes a 9-digit nif string and returns the canonical record for that specific company: its nif, name, and location (postal code and city).
Response Shape
Both endpoints return the same core fields: nif (9-digit string), name (registered company name), and location (postal code plus city). The search_companies endpoint wraps results in a companies array, so a single call can surface multiple matches when a name query is ambiguous. The get_company endpoint returns a single flat object when the NIF is found.
Pagination and Scope
search_companies returns a single page of results per query. There is no cursor or offset parameter, so results are limited to what nif.pt returns for that query string. Coverage is scoped to Portuguese entities with a valid NIF — individuals and foreign entities without a Portuguese tax number are not represented.
The nif API is a managed, monitored endpoint for nif.pt — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when nif.pt changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official nif.pt API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Verify a Portuguese supplier's NIF before processing a B2B invoice.
- Enrich a CRM record by resolving a company name to its official registered name and postal location.
- Cross-check NIF numbers submitted in vendor onboarding forms against the official registry.
- Build an autocomplete lookup for Portuguese company names using the
search_companiesquery parameter. - Validate that a given 9-digit NIF maps to a real, named entity via
get_company. - Deduplicate company records by resolving variant name spellings to a canonical NIF.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does nif.pt have an official developer API?+
What does `get_company` return for a given NIF?+
get_company returns three fields: nif (the 9-digit tax identification number), name (the registered company name), and location (postal code and city). It does not return incorporation dates, directors, financial filings, or legal status.How many results does `search_companies` return, and can I paginate?+
query string. There is no pagination parameter (no page, offset, or cursor). If you need deeper results, you would need to refine the query string. You can fork this API on Parse and revise it to add a pagination parameter if the underlying source supports it.Does the API return company registration status, financial data, or director names?+
nif, name, and location only. Registration status, shareholder details, financial statements, and director information are not included in the response. You can fork this API on Parse and revise it to add those fields if nif.pt surfaces them for specific lookups.