# Finland YTJ Companies Scraper (`parseforge/finland-ytj-companies-scraper`) Actor

Scrape Finnish company registry from the YTJ/PRH open data API. Get business ID, name, addresses, industry codes, registration history, and 1M+ active companies. No API key required.

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

## Pricing

from $34.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

![ParseForge Banner](https://raw.githubusercontent.com/ParseForge/apify-assets/main/parseforge-banner.png)

## 🇫🇮 Finland YTJ Companies Scraper

> 🚀 **Export the Finnish company registry in seconds.** Filter by name, business ID, legal form, or trade register status. No API key, no registration, no manual CSV wrangling.

> 🕒 **Last updated:** 2026-05-12 · **📊 27+ fields** per record · **🇫🇮 1M+ Finnish entities** · **🌐 Finnish + Swedish + English** · **♻️ Live per run**

The **Finland YTJ Companies Scraper** pulls live records from the YTJ/PRH open data API (Patentti- ja rekisterihallitus, the Finnish Patent and Registration Office) and returns **27+ fields per record**, covering business ID, primary and former names, legal form, main business line, addresses, trade register status, and registered entry codes. The registry includes every active and historic Finnish company, association, and registered entity.

YTJ is the joint information system of the PRH and the Finnish Tax Administration. It is the authoritative source for Finnish corporate identity, and the open data API exposes the same records that drive due diligence, tax compliance, and beneficial ownership disclosures across Finland. This Actor handles trilingual names (Finnish, Swedish, English), parses postal and street addresses, distinguishes active and ended registrations, and flags VAT liability automatically.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| KYC and compliance teams, B2B sales prospecting, marketing data vendors, business journalists, due diligence analysts, academic researchers, GovTech vendors | KYC and AML enrichment, sales prospecting, market sizing, supplier verification, beneficial ownership research, business journalism, Finnish corporate due diligence |

---

### 📋 What the Finland YTJ Companies Scraper does

Several filtering workflows in a single run:

- 🔍 **Name search.** Partial-match on company name across primary, auxiliary, and former names.
- 🆔 **Business ID lookup.** Exact match on a Finnish business ID like `0112038-9`.
- 🏛️ **Legal form filter.** Filter by `OY`, `OYJ`, `AY`, `KY`, or any other registered form code.
- 📊 **Trade register status.** Active, removed, ended, or all statuses combined.
- 🌐 **Trilingual descriptions.** Finnish, Swedish, and English labels for legal form and main business line.

Each record includes business ID with registration date, primary name, former and auxiliary names, legal form codes and trilingual descriptions, main business line code (TOIMI taxonomy) and descriptions, status flags, registration and end dates, last-modified timestamp, active postal address with Finnish and Swedish city names, registered entry codes, VAT liability flag, and optional situation codes.

> 💡 **Why it matters:** Finland has more than 1 million registered business entities. KYC, sales prospecting, and journalism rely on the YTJ registry as the canonical record. Building your own scraper means parsing the legacy YTJ XML and navigating Finnish-only documentation. This Actor returns clean trilingual JSON on every run.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>name</code></td><td>string</td><td><code>"nokia"</code></td><td>Partial-match search on company name. Leave empty to browse all companies (paginated).</td></tr>
<tr><td><code>businessId</code></td><td>string</td><td><code>""</code></td><td>Exact match on a Finnish business ID (e.g. <code>0112038-9</code>). Overrides name search.</td></tr>
<tr><td><code>companyForm</code></td><td>string</td><td><code>""</code></td><td>Filter by legal form code (e.g. <code>OY</code>, <code>OYJ</code>, <code>AY</code>, <code>KY</code>).</td></tr>
<tr><td><code>tradeRegisterStatus</code></td><td>string</td><td><code>""</code></td><td>One of <code>1</code> (active), <code>2</code> (removed), <code>3</code> (ended), or empty for all.</td></tr>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
</tbody>
</table>

**Example: 100 companies matching "nokia".**

```json
{
    "maxItems": 100,
    "name": "nokia"
}
````

**Example: lookup by exact business ID.**

```json
{
    "maxItems": 1,
    "businessId": "0112038-9"
}
```

> ⚠️ **Good to Know:** historic and ended companies often lack address fields because the registry does not retain postal addresses after closure. The Actor returns `null` for those fields and surfaces the `endDate` so you can filter them in downstream queries.

***

### 📊 Output

Each company record contains **27+ fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `businessId` | string | `"0100004-5"` |
| 🔗 `url` | string | `"https://tietopalvelu.ytj.fi/yritystiedot.aspx?yavain=01000045&kielikoodi=3"` |
| 📅 `businessIdRegistrationDate` | ISO 8601 | null | `"1978-03-15"` |
| 🏢 `name` | string | `"Artjärven Kauppakeskus Oy"` |
| 🏷️ `formerNames` | string\[] | `["Osakeyhtiö Repolankatu 1"]` |
| 🏷️ `auxiliaryNames` | string\[] | `[]` |
| 🏛️ `companyForm` | string | null | `"Mutual real estate limited company"` |
| 🔢 `companyFormCode` | string | null | `"10"` |
| 🇫🇮 `companyFormFinnish` | string | null | `"Keskinäinen kiinteistöosakeyhtiö"` |
| 🇸🇪 `companyFormSwedish` | string | null | `"Ömsesidigt fastighetsaktiebolag"` |
| 🏷️ `mainBusinessLineCode` | string | null | `"TOIMI4-68203"` |
| 📝 `mainBusinessLineDescription` | string | null | `"Rental and operating of own or leased non-residential real estate"` |
| 🇫🇮 `mainBusinessLineFinnish` | string | null | `"Muu kiinteistöjen vuokraus ja hallinta"` |
| 🇸🇪 `mainBusinessLineSwedish` | string | null | `"Övrig uthyrning och förvaltning av fastigheter"` |
| 📊 `status` | string | null | `"2"` |
| 📊 `tradeRegisterStatus` | string | null | `"1"` |
| 📅 `registrationDate` | ISO 8601 | null | `"1937-04-20"` |
| 📅 `endDate` | ISO 8601 | null | `null` |
| 🕒 `lastModified` | ISO 8601 | null | `"2025-12-31T07:39:20"` |
| 🏠 `streetAddress` | string | null | `"Laukkakatu 6"` |
| 📮 `postCode` | string | null | `"15830"` |
| 🏙️ `city` | string | null | `"LAHTI"` |
| 🇸🇪 `cityInSwedish` | string | null | `"LAHTI"` |
| 🌍 `country` | string | null | `"Finland"` |
| 🏷️ `addressType` | string | null | `"postal"` |
| 📬 `postOfficeBox` | string | null | `null` |
| 📨 `careOf` | string | null | `null` |
| 🏷️ `registeredEntryCodes` | string\[] | `["1", "1"]` |
| 💶 `isVatLiable` | boolean | `false` |
| 🏷️ `situations` | string\[] (optional) | `["1"]` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-12T16:49:05.168Z"` |

#### 📦 Sample records

<details>
<summary><strong>🇫🇮 Active limited company: Artjärven Kauppakeskus Oy</strong></summary>

```json
{
    "businessId": "0100004-5",
    "url": "https://tietopalvelu.ytj.fi/yritystiedot.aspx?yavain=01000045&kielikoodi=3",
    "businessIdRegistrationDate": "1978-03-15",
    "name": "Artjärven Kauppakeskus Oy",
    "formerNames": ["Osakeyhtiö Repolankatu 1"],
    "auxiliaryNames": [],
    "companyForm": "Mutual real estate limited company",
    "companyFormCode": "10",
    "companyFormFinnish": "Keskinäinen kiinteistöosakeyhtiö",
    "companyFormSwedish": "Ömsesidigt fastighetsaktiebolag",
    "mainBusinessLineCode": "TOIMI4-68203",
    "mainBusinessLineDescription": "Rental and operating of own or leased non-residential real estate",
    "mainBusinessLineFinnish": "Muu kiinteistöjen vuokraus ja hallinta",
    "mainBusinessLineSwedish": "Övrig uthyrning och förvaltning av fastigheter",
    "status": "2",
    "tradeRegisterStatus": "1",
    "registrationDate": "1937-04-20",
    "endDate": null,
    "lastModified": "2025-12-31T07:39:20",
    "streetAddress": "Laukkakatu 6",
    "postCode": "15830",
    "city": "LAHTI",
    "cityInSwedish": "LAHTI",
    "country": "Finland",
    "addressType": "postal",
    "registeredEntryCodes": ["1", "1"],
    "isVatLiable": false,
    "scrapedAt": "2026-05-12T16:49:05.168Z"
}
```

</details>

<details>
<summary><strong>🇫🇮 Historic metalworks: Artjärven Metalli Oy (ended 2005)</strong></summary>

```json
{
    "businessId": "0100002-9",
    "url": "https://tietopalvelu.ytj.fi/yritystiedot.aspx?yavain=01000029&kielikoodi=3",
    "businessIdRegistrationDate": "1978-03-15",
    "name": "Artjärven Metalli Oy",
    "formerNames": [],
    "auxiliaryNames": [],
    "companyForm": "Limited company",
    "companyFormCode": "16",
    "companyFormFinnish": "Osakeyhtiö",
    "companyFormSwedish": "Aktiebolag",
    "mainBusinessLineCode": "TOIMI2-29120",
    "mainBusinessLineDescription": "Manufacture of pumps and compressors",
    "mainBusinessLineFinnish": "Pumppujen ja kompressorien valmistus",
    "mainBusinessLineSwedish": "Tillv av pumpar och kompressorer",
    "status": "2",
    "tradeRegisterStatus": "4",
    "registrationDate": "1976-04-23",
    "endDate": "2005-12-19",
    "streetAddress": null,
    "postCode": null,
    "city": null,
    "country": null,
    "registeredEntryCodes": ["1", "4", "1", "41"],
    "isVatLiable": false,
    "scrapedAt": "2026-05-12T16:49:05.167Z"
}
```

</details>

<details>
<summary><strong>🇫🇮 Closed sawmill: Vähämäyrä Oy (VAT-liable in past, ended 2017)</strong></summary>

```json
{
    "businessId": "0100006-1",
    "url": "https://tietopalvelu.ytj.fi/yritystiedot.aspx?yavain=01000061&kielikoodi=3",
    "businessIdRegistrationDate": "1978-03-15",
    "name": "Vähämäyrä Oy",
    "companyForm": "Limited company",
    "companyFormCode": "16",
    "companyFormFinnish": "Osakeyhtiö",
    "mainBusinessLineCode": "TOIMI3-16100",
    "mainBusinessLineDescription": "Sawmilling and planing of wood",
    "mainBusinessLineFinnish": "Puun sahaus, höyläys ja kyllästys",
    "status": "2",
    "tradeRegisterStatus": "4",
    "registrationDate": "1973-06-08",
    "endDate": "2017-10-23",
    "lastModified": "2018-10-24T01:30:08",
    "registeredEntryCodes": ["1", "4", "1", "55", "80"],
    "isVatLiable": false,
    "scrapedAt": "2026-05-12T16:49:05.168Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🇫🇮 | **Official YTJ/PRH feed.** Pulls directly from the Finnish Patent and Registration Office open data API. |
| 🌐 | **Trilingual labels.** Finnish, Swedish, and English descriptions for legal form and main business line. |
| 🏛️ | **Form and status filters.** Filter by OY, OYJ, AY, KY, and by active, removed, or ended trade register status. |
| 🆔 | **Lookup by business ID.** Exact-match retrieval for KYC and AML enrichment workflows. |
| ⚡ | **Fast.** Hundreds of companies per minute. 10,000 records in around fifteen minutes. |
| 🔁 | **Always fresh.** Every run pulls the live registry so newly registered companies appear within days. |
| 🚫 | **No authentication.** Works with open Finnish corporate data. No login or API key needed. |

> 📊 Finland has over 1 million registered business entities. YTJ is the single authoritative public registry.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ Finland YTJ Companies Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **1M+ Finnish entities** | **Live per run** | name, ID, form, status | ⚡ 2 min |
| Official YTJ search UI | Free | Same data, manual | Live | UI form | 🐢 Manual export per query |
| Bulk PRH CSV dumps | Free | Periodic snapshot | Monthly | None | 🕒 Multi-step ETL |
| Paid business-data platforms | $500+/month | Multi-country aggregated | Daily | Many | ⏳ Vendor onboarding |

Pick this Actor when you want the live Finnish company registry in clean trilingual JSON, with server-side filtering and zero pipeline maintenance.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the Finland YTJ Companies Scraper page on the Apify Store.
3. 🎯 **Set input.** Enter a name or business ID, optionally pick a legal form and status, and set `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 💼 KYC, AML & Due Diligence

- Enrich onboarding with canonical business IDs and legal form
- Verify supplier and counterparty details against the live registry
- Check VAT liability and trade register status for Finnish entities
- Beneficial ownership research and historic name tracking

</td>
<td width="50%" valign="top">

#### 📊 B2B Sales & Prospecting

- Build target lists by industry code (TOIMI taxonomy)
- Filter by city, region, or postal code
- Identify active OY and OYJ entities only
- Map auxiliary trade names back to the parent business

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 📈 Market Research & Analysts

- Sector market sizing by main business line and legal form
- Track company formation trends across years
- Compare active versus ended registrations
- Build regional company concentration maps

</td>
<td width="50%" valign="top">

#### 📰 Journalism & Civic Tech

- Investigate corporate links via business IDs
- Trace former names and rebranding patterns
- Cross-reference YTJ data with court and tax records
- Power public-interest registries and watchdog tools

</td>
</tr>
</table>

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Empirical datasets for papers, thesis work, and coursework
- Longitudinal studies tracking changes across snapshots
- Reproducible research with cited, versioned data pulls
- Classroom exercises on data analysis and ethical scraping

</td>
<td width="50%">

#### 🎨 Personal and creative

- Side projects, portfolio demos, and indie app launches
- Data visualizations, dashboards, and infographics
- Content research for bloggers, YouTubers, and podcasters
- Hobbyist collections and personal trackers

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Transparency reporting and accountability projects
- Advocacy campaigns backed by public-interest data
- Community-run databases for local issues
- Investigative journalism on public records

</td>
<td width="50%">

#### 🧪 Experimentation

- Prototype AI and machine-learning pipelines with real data
- Validate product-market hypotheses before engineering spend
- Train small domain-specific models on niche corpora
- Test dashboard concepts with live input

</td>
</tr>
</table>

***

### 🔌 Automating Finland YTJ Companies Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Hourly, daily, or weekly refreshes keep downstream databases in sync automatically.

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Enter a name or business ID (optionally with a form or status filter), click Start, and the Actor calls the YTJ/PRH open data v3 endpoint, normalises trilingual descriptions, picks the active address, and emits clean JSON. No browser automation, no captchas, no setup.

#### 📏 How accurate is the data?

Records come straight from the official YTJ/PRH registry, the authoritative Finnish corporate data source. Historic and ended companies sometimes lack address fields because the registry does not retain postal information after closure.

#### 🔁 How often is the dataset refreshed?

YTJ updates daily as PRH processes new registrations, amendments, and closures. Every run of this Actor fetches the live API, so your dataset reflects the registry at run time.

#### 🆔 How do I look up a single company?

Set the `businessId` field to the exact ID (with the dash, like `0112038-9`) and leave `name` empty. Business ID lookup overrides name search.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval (hourly, daily, weekly) and keep a downstream KYC or CRM database in sync.

#### ⚖️ Is this data legal to use?

YTJ open data is published under the Creative Commons Attribution 4.0 licence by PRH and the Finnish Tax Administration. Public reuse is explicitly permitted with attribution.

#### 💼 Can I use this data commercially?

Yes. CC BY 4.0 permits commercial use with attribution. KYC, AML, and B2B data products in Finland are commonly built on the YTJ open feed.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🏷️ What do the registeredEntryCodes mean?

Each code corresponds to a Finnish registry classification (e.g. `1` = trade register, `80` = VAT). The Actor exposes these raw codes so downstream systems can join them with the PRH code list. The `isVatLiable` boolean is derived from code `80` for convenience.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

Finland YTJ Companies Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe company data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh Finnish company data into your KYC system, or alert your sales team in Slack when target firms appear in the registry.

***

### 🔗 Recommended Actors

- [**📜 UK Contracts Finder Scraper**](https://apify.com/parseforge/uk-contracts-finder-scraper) - UK public sector procurement notices
- [**🇪🇺 CORDIS EU Research Projects Scraper**](https://apify.com/parseforge/cordis-eu-research-scraper) - Horizon Europe and Framework Programme grants
- [**🔬 UKRI Gateway to Research Scraper**](https://apify.com/parseforge/ukri-gateway-to-research-scraper) - UK research council grants and projects
- [**⚖️ eCFR US Federal Regulations Scraper**](https://apify.com/parseforge/ecfr-code-federal-regulations-scraper) - US Code of Federal Regulations full text
- [**📄 SEC EDGAR Full-Text Search Scraper**](https://apify.com/parseforge/sec-edgar-full-text-search-scraper) - US securities filings full text

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by YTJ, PRH (Patentti- ja rekisterihallitus), the Finnish Tax Administration, or any Finnish government body. All trademarks mentioned are the property of their respective owners. Only publicly available open data published under CC BY 4.0 is collected.

# Actor input Schema

## `name` (type: `string`):

Search by company name (partial match). Leave empty to browse all companies (paginated).

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

Finnish business ID e.g. 0112038-9. Overrides name search if provided.

## `companyForm` (type: `string`):

Filter by legal form (e.g. OY, OYJ, AY, KY)

## `tradeRegisterStatus` (type: `string`):

Filter by trade register status

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "name": "nokia",
  "tradeRegisterStatus": "",
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

# 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 = {
    "name": "nokia",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/finland-ytj-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 = {
    "name": "nokia",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/finland-ytj-companies-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "name": "nokia",
  "maxItems": 10
}' |
apify call parseforge/finland-ytj-companies-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/finland-ytj-companies-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Finland YTJ Companies Scraper",
        "description": "Scrape Finnish company registry from the YTJ/PRH open data API. Get business ID, name, addresses, industry codes, registration history, and 1M+ active companies. No API key required.",
        "version": "0.0",
        "x-build-id": "JPLz8ZTjVqbJgfrxd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~finland-ytj-companies-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-finland-ytj-companies-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~finland-ytj-companies-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-finland-ytj-companies-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~finland-ytj-companies-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-finland-ytj-companies-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "name": {
                        "title": "Company name (optional)",
                        "type": "string",
                        "description": "Search by company name (partial match). Leave empty to browse all companies (paginated)."
                    },
                    "businessId": {
                        "title": "Business ID (optional)",
                        "type": "string",
                        "description": "Finnish business ID e.g. 0112038-9. Overrides name search if provided."
                    },
                    "companyForm": {
                        "title": "Company form (optional)",
                        "type": "string",
                        "description": "Filter by legal form (e.g. OY, OYJ, AY, KY)"
                    },
                    "tradeRegisterStatus": {
                        "title": "Trade register status",
                        "enum": [
                            "",
                            "1",
                            "2",
                            "3"
                        ],
                        "type": "string",
                        "description": "Filter by trade register status",
                        "default": ""
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
