# Finnish Company Lookup (MCP) (`nectia/finnish-company-lookup-mcp`) Actor

MCP server for the Finnish Business Register (PRH/YTJ). Look up any Finnish company by Business ID (Y-tunnus) or name.

- **URL**: https://apify.com/nectia/finnish-company-lookup-mcp.md
- **Developed by:** [Anton Aouat](https://apify.com/nectia) (community)
- **Categories:** MCP servers, Integrations
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 details

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Finnish Company Lookup — MCP Server (PRH / YTJ)

Look up **any Finnish company** by Business ID (Y-tunnus) or name, straight from
the official **PRH / YTJ open data** register — as a [Model Context Protocol](https://modelcontextprotocol.io)
server your AI agent can call.

Built for AI automation agencies, n8n / LangChain builders, and internal IT teams
who need Finnish company data without wrestling with Finnish API docs.

### Tools

| Tool | What it does |
|------|--------------|
| `search_companies` | Search by `name`, `location` (municipality), or `companyForm`. Returns matches with Business ID + current name. |
| `get_company` | Full registry detail for one `businessId`: current name, aux names, company form, main line of business, registered addresses, website, trade-register status, special situations. |
| `get_financial_periods` | List the financial years a company has filed digital statements for (PRH XBRL open data). |
| `get_financials` | Parse a company's digital financial statement into clean key figures — revenue, operating profit, profit before tax, taxes, net profit, personnel expenses, total assets, equity, liabilities (EUR) — plus the full income statement and balance sheet. Defaults to the latest year. |
| `get_company_notices` | List a company's registered filings (trade-register change history) for KYC/monitoring — date, notification type, and what each filing changed (board, share capital, financial statements, address, …). Newest first. |

Registry descriptions can be returned in `en`, `fi`, or `sv` via the `language` argument. Financial line-item labels are Finnish (from the official taxonomy); key-figure names are English.

> **Financials coverage:** based on PRH's digital financial-statement filings, which are mostly SMEs. Many large companies do not e-file here; `get_financial_periods` returns an empty list when nothing is available.

#### Example

```jsonc
// get_company
{ "businessId": "2336509-6", "language": "en" }
```

```jsonc
{
  "businessId": "2336509-6",
  "name": "Supercell Oy",
  "auxiliaryNames": ["Supercell Ltd"],
  "companyForm": "Limited company",
  "mainBusinessLine": { "code": "62200", "description": "Computer consultancy ..." },
  "website": "www.supercell.com",
  "registeredInTradeRegister": true,
  "addresses": [{ "kind": "visiting", "street": "Jätkäsaarenlaituri", "postCode": "00180", "city": "HELSINKI" }]
}
```

### Use it

#### Hosted (Apify) — recommended

Connect your MCP client to the Actor's Standby URL at the `/mcp` path. Billing is
per successful tool call (Pay-Per-Event) — no keys to manage beyond your Apify token.

#### Local (stdio)

```bash
npm install
npm run build
```

Then register with any MCP client (e.g. Claude Desktop):

```jsonc
{
  "mcpServers": {
    "prh-ytj": { "command": "node", "args": ["/abs/path/to/servers/prh-ytj/dist/server.js"] }
  }
}
```

Or run the HTTP transport locally: `PORT=3999 npm run standby` → `POST http://localhost:3999/mcp`.

### Develop

```bash
npm test        # unit tests against recorded PRH fixtures
npm run typecheck
npm run dev     # stdio server via tsx
```

**Architecture** (small, single-purpose units):

- `src/prh/client.ts` — HTTP only: PRH v3 calls, throttle, TTL cache.
- `src/prh/normalize.ts` — shape-mapping only: raw PRH JSON → clean agent shape.
- `src/tools.ts` — MCP contracts only: `search_companies`, `get_company`, optional billing hook.
- `src/server.ts` — stdio transport. `src/standby.ts` — Apify Standby HTTP transport.

### Data source & attribution

Data from the **Finnish Patent and Registration Office (PRH)** and Tax
Administration joint [YTJ open data](https://avoindata.prh.fi/en), licensed
CC BY 4.0. This server is an independent tool and is not affiliated with PRH.

### License

MIT

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nectia/finnish-company-lookup-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("nectia/finnish-company-lookup-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call nectia/finnish-company-lookup-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nectia/finnish-company-lookup-mcp"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/1rkZAiboHfh3Jccc2/builds/WSkhYyhm7jZxWkglD/openapi.json
