# firmafind Complete API Reference for LLMs

firmafind is an independent software service providing a REST API for Austrian Firmenbuch (company register) data. It is not a public authority or a government portal.

Base URL: `https://firmafind.at`

---

## Authentication

Pass your API key in the `x-api-key` header:

```http
GET /api/companies?name=Red+Bull HTTP/1.1
Host: firmafind.at
x-api-key: ff_live_your_api_key
```

Obtain an API key at https://firmafind.at/dashboard/keys.

---

## Endpoints Summary

### 1. Public Company Search (No API Key)
- **Endpoint**: `GET /api/companies/public`
- **Query Parameters**:
  - `q` (string, min 2 chars, required): Search query.
  - `country` (enum `AT` | `CZ`, default `AT`): Country filter.
- **Rate Limit**: 30 requests/day per IP address.

### 2. Authenticated Company Search
- **Endpoint**: `GET /api/companies`
- **Headers**: `x-api-key: <KEY>`
- **Query Parameters**:
  - `name` (string, required): Company name search term.
  - `exact` (boolean, optional): Require exact name match.
  - `rechtsform` (string, optional): Filter by legal form (e.g. `GmbH`, `AG`).
  - `gericht` (string, optional): Filter by court.

### 3. Company Details
- **Endpoint**: `GET /api/companies/{fnr}`
- **Headers**: `x-api-key: <KEY>`
- **Path Parameters**:
  - `fnr` (string, required): Firmenbuchnummer (e.g. `123456x`).
- **Response**: Full company record including legal form, address, share capital, managing directors, authorized signatories, and register transaction history.

### 4. Company Register Changes
- **Endpoint**: `GET /api/companies/changes`
- **Headers**: `x-api-key: <KEY>`
- **Query Parameters**:
  - `from` (date YYYY-MM-DD, required): Start date.
  - `to` (date YYYY-MM-DD, required): End date (max 31 day range).
  - `court` (string, optional): Filter by court.
  - `changeType` (enum `new` | `change` | `delete`, optional): Action filter.

### 5. Document List
- **Endpoint**: `GET /api/documents`
- **Headers**: `x-api-key: <KEY>`
- **Query Parameters**:
  - `fnr` (string, required): Firmenbuchnummer.
  - `limit` (integer, optional): Maximum entries.

### 6. Document Download
- **Endpoint**: `GET /api/documents/{key}`
- **Headers**: `x-api-key: <KEY>`
- **Cost**: 10 credits.
- **Response**: Document metadata and base64-encoded PDF or XML payload.

### 9. Austrian New Company Finder (Free Web Tool)
- **URL**: https://firmafind.at/tools/new-companies-austria
- **No API key required.** Explore newly registered Austrian companies with filtering by date, region, legal form, name, and trade activity.
- **Future API**: `GET /api/companies?registered_after=...&state=...&legal_form=...`

---

## MCP Integration

Run the firmafind MCP Server using `npx`:

```bash
FIRMAFIND_API_KEY="your_api_key" npx -y @firmafind/mcp-server
```

OpenCode configuration (`opencode.json`):
```json
{
  "mcp": {
    "firmafind": {
      "type": "local",
      "command": ["npx", "-y", "@firmafind/mcp-server"],
      "enabled": true,
      "env": {
        "FIRMAFIND_API_KEY": "your_api_key"
      }
    }
  }
}
```

OpenAPI specification file: https://firmafind.at/openapi.yaml

GET /api/insolvency-status?fnr=123456a (x-api-key, standard 1 credit per authenticated request; release-gated pending live validation). Returns detected Firmenbuch insolvency events, procedure dates where available, register dates, source and successful retrieval time. currentInsolvencyStatus is unknown; completeCoverage is false. Not 100%: coverage and timeliness are not guaranteed. Missing entries do not rule out insolvency. Technical failures return errors, never a negative finding. MCP: get_insolvency_status.
