# Finland PRH Company Registry Scraper (`devilscrapes/finland-prh-companies-scraper`) Actor

Export Finnish registered-company records from the official PRH/YTJ open-data API — business ID, legal name, company form, industry code, registration and dissolution dates, address and website — filtered by name, city, postal code, industry code or date range, as clean JSON, CSV or Excel.

- **URL**: https://apify.com/devilscrapes/finland-prh-companies-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## Finland PRH Company Registry Scraper

**💰 $4.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Export Finnish registered-company records from the official PRH/YTJ open-data API — business ID, legal name, company form, industry code, registration and dissolution dates, address and website — filtered by name, city, postal code, industry code or date range, as clean JSON, CSV or Excel.

</div>

***

> **Quick answer:** The **Finland PRH Company Registry Scraper** exports Finnish registered-company records from PRH/YTJ's official open-data API — business ID (Y-tunnus), legal name, company form, industry code, registration and dissolution dates, address and website — filtered by name, city, postal code, industry code or date range, into JSON, CSV or Excel. The API is free, keyless and authoritative, but it nests names, addresses, company forms and industry codes three to four levels deep; we flatten each company to one English-labelled row and skip malformed entries instead of crashing on them. Pricing is pay-per-result — **$4.20 per 1 000 companies**, no subscription, no card required to try it.

### 🎯 What this scrapes

PRH's YTJ open-data API is Finland's authoritative company registry — free, keyless and public — but its JSON nests names, addresses, company forms and industry codes three or four levels deep, and a shallow clone cluster already scrapes it inconsistently (one live competitor fails 10 of every 51 runs). This Actor flattens every registered company into one row with English field names, keeps running cleanly through malformed entries and empty result sets, and prices at $4.20 per 1,000 results — matching or undercutting every live competitor on this exact API.

### 🔥 What we handle for you

- 🧊 **Flattens PRH's nested JSON** — company names, forms, addresses and industry codes flattened into one clean, English-labelled row per company.
- 🧱 **Honest zero-match handling** — a narrow filter combination that matches nothing still finishes SUCCEEDED with a clear status message, never billed as a failed run.
- 🩹 **Per-row fault isolation** — one malformed registry entry is logged and skipped; it never crashes the rest of the page.
- 🔁 **Retries transient 429/5xx responses** with exponential backoff instead of failing the whole run.
- 🎯 **Typed, validated dataset rows** — Pydantic-checked, stable business IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- Build a Nordic B2B prospect list filtered by city, industry code or registration date.
- Run a KYC/AML supplier or counterparty check against Finland's authoritative company register.
- Screen a partner list for dissolved companies or special situations before contracting.
- Support market-entry research by pulling every registered company in a city or industry line.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `nameQuery` | `string` | no | '—' | Match companies whose name contains this text. Leave empty to filter by location, industry or business ID instead. |
| `location` | `string` | no | 'Helsinki' | Municipality or city name, e.g. Helsinki. Leave empty to search all of Finland. |
| `businessId` | `string` | no | '—' | Exact Finnish business ID, format <code>NNNNNNN-C</code>, e.g. <code>0100123-2</code>. Leave empty to skip this filter. |
| `postalCode` | `string` | no | '—' | Exact 5-digit Finnish postal code, e.g. <code>00131</code>. Leave empty to skip this filter. |
| `industryCode` | `string` | no | '—' | PRH main business line code (Finnish TOL 2008 / NACE-style), e.g. <code>62010</code>. Leave empty for all industries. |
| `registeredAfter` | `string` | no | '—' | Only include companies registered on or after this date, e.g. <code>2020-01-01</code>. Leave empty to skip this filter. |
| `registeredBefore` | `string` | no | '—' | Only include companies registered on or before this date. Leave empty to skip this filter. |
| `maxResults` | `integer` | no | 100 | Stop after this many companies. Each company is one billed result row. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | PRH is a public government API and does not need a proxy. Leave this off unless your account requires egress through… |

#### Example input

```json
{
  "location": "Helsinki",
  "maxResults": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `business_id` | `string` | Finnish business ID (Y-tunnus), e.g. `0100123-2`. |
| `business_id_registered` | `string` | Date this business ID was registered (`YYYY-MM-DD`). |
| `company_name` | `string` | Current registered company name. |
| `company_form_code` | `string` | PRH company form code, e.g. `16`. |
| `company_form` | `string` | Company form in English, e.g. `Limited company`. |
| `main_business_line_code` | `string` | PRH main business line (TOL 2008) code. |
| `main_business_line` | `string` | Main business line description in English. |
| `registration_date` | `string` | Company registration date (`YYYY-MM-DD`). |
| `end_date` | `string` | Dissolution/end date (`YYYY-MM-DD`), if dissolved. |
| `is_dissolved` | `boolean` | True when the company has an `end_date`. |
| `street_address` | `string` | Business street address, or a PL/PO-box fallback. |
| `postal_code` | `string` | Business postal code. |
| `city` | `string` | Business city, English name where available. |
| `website` | `string` | Company website, when registered. |
| `has_special_situation` | `boolean` | True when PRH lists a special situation (e.g. bankruptcy, restructuring) for this company. |
| `last_modified` | `string` | Timestamp PRH last modified this record. |
| `url` | `string` | Public YTJ lookup URL for this business ID. |

#### Example output

```json
{
  "business_id": "0100123-2",
  "business_id_registered": "1978-03-15",
  "company_name": "Oy Emar Ab",
  "company_form_code": "16",
  "company_form": "Limited company",
  "main_business_line_code": "66190",
  "main_business_line": "Other activities auxiliary to financial services, except insurance and pension funding",
  "registration_date": "1968-04-26",
  "end_date": null,
  "is_dissolved": false,
  "street_address": null,
  "postal_code": "00131",
  "city": "HELSINKI",
  "website": null,
  "has_special_situation": false,
  "last_modified": "2026-04-03T10:17:56",
  "url": "https://tietopalvelu.ytj.fi/yritys/0100123-2"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.20 | One-off warm-up charge per run |
| `result` | $0.004 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$4.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Returns current registry data only — no financials, shareholders, beneficial owners or historical name/address change logs.
- No company-form filter — PRH's API accepts one but silently ignores it, so it isn't exposed here to avoid a misleading no-op input.
- The `url` field links to PRH's official lookup page, which renders client-side and cannot be verified per-ID without a browser.

### ❓ FAQ

**Do I need an API key?**

No. PRH/YTJ is open Finnish government data and needs no credentials — leave the proxy setting off too.

**What happens if my filters match nothing?**

The run finishes successfully with zero rows and a status message naming the filters you searched — you're never billed for a failed run just because a search was narrow.

**Can I pull every company in an industry or city?**

Yes — set an industry code or city and raise Maximum companies (up to 1,000 per run); the Actor pages until PRH runs out or your cap is reached.

**Is the data in Finnish?**

Company forms and industry lines are returned in English where PRH publishes an English description; names, addresses and cities fall back to Finnish when no English text exists.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `nameQuery` (type: `string`):

Match companies whose name contains this text. Leave empty to filter by location, industry or business ID instead.

## `location` (type: `string`):

Municipality or city name, e.g. Helsinki. Leave empty to search all of Finland.

## `businessId` (type: `string`):

Exact Finnish business ID, format <code>NNNNNNN-C</code>, e.g. <code>0100123-2</code>. Leave empty to skip this filter.

## `postalCode` (type: `string`):

Exact 5-digit Finnish postal code, e.g. <code>00131</code>. Leave empty to skip this filter.

## `industryCode` (type: `string`):

PRH main business line code (Finnish TOL 2008 / NACE-style), e.g. <code>62010</code>. Leave empty for all industries.

## `registeredAfter` (type: `string`):

Only include companies registered on or after this date, e.g. <code>2020-01-01</code>. Leave empty to skip this filter.

## `registeredBefore` (type: `string`):

Only include companies registered on or before this date. Leave empty to skip this filter.

## `maxResults` (type: `integer`):

Stop after this many companies. Each company is one billed result row.

## `proxyConfiguration` (type: `object`):

PRH is a public government API and does not need a proxy. Leave this off unless your account requires egress through Apify Proxy.

## Actor input object example

```json
{
  "location": "Helsinki",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# 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 = {
    "location": "Helsinki",
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/finland-prh-companies-scraper").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 = {
    "location": "Helsinki",
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/finland-prh-companies-scraper").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 '{
  "location": "Helsinki",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/finland-prh-companies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/finland-prh-companies-scraper"
        }
    }
}

```

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/sBm2opiLJsaxFMETD/builds/bfl4KQNXRxuMnVFuz/openapi.json
