> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nesu.pt/llms.txt
> Use this file to discover all available pages before exploring further.

# Nesu API

> Search Portuguese companies and retrieve their details with a simple JSON API.

Find Portuguese companies by name or NIF, then retrieve their address, activity, legal structure, and available debt brackets. You use one API key to access company data and monitor your account's usage.

* **Search by name or NIF** — find up to 20 directory matches with normalized company-name search or an exact NIF query.
* **Retrieve company details** — get the company's legal name, address, primary CAE, share capital, and available tax and social-security debt brackets.
* **Cached company lookups** — receive stored details for records less than six days old, with an upstream refresh for missing or older records.
* **Monitor your usage** — check your included allowance, purchased credits, and remaining rate-limit capacity without spending a credit.

## Your first company lookup

You need an active API key, available rate-limit capacity, and a credit to run this example. Set `NESU_API_KEY` to your full key, including the `nesu_` prefix. The [quickstart](/quickstart) walks you through setup.

```bash theme={null}
curl --fail-with-body --silent --show-error \
  --header "Authorization: Bearer $NESU_API_KEY" \
  'https://api.nesu.pt/api/v1/companies/509442013'
```

You receive a JSON response with `result: "success"` and the company's details in `data`. This example uses illustrative fixture data, not a live company record or debt report:

```json theme={null}
{
  "result": "success",
  "data": {
    "nif": 509442013,
    "title": "Exemplo, Lda",
    "address": "Rua de Exemplo, 1",
    "zipcode": "1000-001",
    "city": "Lisboa",
    "activity": "Atividade de exemplo",
    "status": "",
    "cae": "",
    "structure": {
      "nature": "Sociedade por quotas",
      "capital": "5000.00",
      "capital_currency": "EUR"
    },
    "tax_debt": {
      "start": 10000,
      "end": 50000,
      "last_updated": "2026-09-15"
    },
    "social_security_debt": null
  }
}
```

<Note>
  Each admitted company search or lookup consumes one credit, including requests that later fail. Your API keys share your account's credits and rate limit.
</Note>

## Explore the docs

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create your key, check usage, and make your first company requests.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/get-company">
    Explore endpoint parameters, response fields, and request examples.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Authenticate requests and manage your API keys.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/errors">
    Understand problem responses and resolve failed requests.
  </Card>

  <Card title="Limits and credits" icon="gauge-high" href="/limits">
    Understand allowances, shared limits, and retry headers.
  </Card>

  <Card title="Account usage" icon="chart-simple" href="/api-reference/get-usage">
    Read your plan, credit balance, quotas, and reset time.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.