# Finland Traffic Data: Train Delays, Road Weather, AIS Vessels (`nightwave-owner/digitraffic-finland`) Actor

Returns open traffic data for Finland from Fintraffic Digitraffic in one schema: road works and traffic announcements, road weather readings, train departures and delays, and AIS vessel positions. Filter by region, area, station, train or MMSI. onlyNew for monitoring.

- **URL**: https://apify.com/nightwave-owner/digitraffic-finland.md
- **Developed by:** [Viktor Wiberg](https://apify.com/nightwave-owner) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 records

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?

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

## Finland Traffic Data: Train Delays, Road Weather, AIS Vessels

This actor returns open traffic data for Finland from Fintraffic's Digitraffic service (including VR train data), in one row format with a `dataset` field per run:

- **roadDisruptions**: traffic announcements (accidents, closures, ferry stops) and road works on the Finnish road network, with road number, municipality, region, start and end time, speed limits and other restrictions.
- **roadWeather**: the latest readings from about 500 road weather stations: air and road surface temperature, road condition (dry, moist, wet, icy and so on), precipitation, wind, visibility and friction.
- **trains**: departures from a station, or the latest stop of a train by number, with scheduled time, actual or estimated time, delay in minutes and cancellations.
- **vessels**: AIS positions of ships in Finnish and nearby Baltic waters with name, MMSI, IMO, ship type, speed, course, navigation status, destination and ETA.

The data comes from Digitraffic's open APIs, which need no key. With `onlyNew` a scheduled run returns only records that earlier runs have not delivered, so the actor works as a monitor for road works on your route, delays on your trains or ships arriving in a port.

### Example from a real run

Input (run `CPXytqKotlF2zkDc3`, 5 October 2026): road disruptions in Tampere in the last 24 hours.

```json
{
  "region": ["Tampere"]
}
```

The run returned 10 records (6 road works, 4 traffic announcements). One of them:

```json
{
  "dataset": "roadDisruptions",
  "id": "GUID50471239:1",
  "time": "2026-09-23T11:53:55.489Z",
  "latitude": 61.462814,
  "longitude": 23.765749,
  "source": "Fintraffic / digitraffic.fi",
  "sourceUrl": "https://tie.digitraffic.fi/api/traffic-message/v2/roadworks?from=2026-10-04T05%3A45%3A48.060Z",
  "license": "CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Fields renamed and converted by Nightwave.",
  "retrievedAt": "2026-10-05T05:45:48.060Z",
  "situationId": "GUID50471239",
  "version": 1,
  "type": "roadWork",
  "announcementType": null,
  "title": "Tie 3, Tampere. Tietyö.",
  "description": "Tie 3 välillä Hämeenlinna - Vaasa, Tampere.\nTarkempi paikka: Paikasta Tampereen eteläinen liittymä 200 m, vaikutusalue 500 m, suuntaan Sarankulman liittymä.",
  "details": ["Nopeusrajoitus 50 km/h"],
  "roadNumber": 3,
  "roadName": null,
  "municipality": "Tampere",
  "province": "Pirkanmaa",
  "direction": "pos",
  "startTime": "2026-09-23T21:00:00.000Z",
  "endTime": "2026-10-31T21:59:59.999Z",
  "severity": "high",
  "workTypes": ["Liittymä- ja kaistajärjestely", "Kaidetyö", "Rakenteen parannus"],
  "restrictions": ["Työkoneita liikenteen seassa", "Nopeusrajoitus 50 km/h", "Matka, jolla nopeusrajoitus voimassa 300 m"],
  "language": "fi",
  "releaseTime": "2026-09-23T11:53:55.490Z"
}
```

Input (run `dujir1ZTx3KYymc3s`, 5 October 2026): departures from Tampere in the last 6 hours and the next 30 minutes.

```json
{
  "dataset": "trains",
  "stations": ["Tampere"],
  "since": "6h"
}
```

The run returned 35 departures; 30 had already left. One row, an intercity train that was about to leave a minute late:

```json
{
  "dataset": "trains",
  "id": "2026-10-05:155:TPE:departure",
  "time": "2026-10-05T06:06:00.000Z",
  "latitude": 61.498236,
  "longitude": 23.773454,
  "trainNumber": 155,
  "departureDate": "2026-10-05",
  "trainType": "IC",
  "trainCategory": "Long-distance",
  "commuterLine": null,
  "operator": "VR-Yhtymä Oyj",
  "departureStation": "HKI",
  "departureStationName": "Helsinki",
  "arrivalStation": "PM",
  "arrivalStationName": "Pieksämäki",
  "station": "TPE",
  "stationName": "Tampere",
  "event": "departure",
  "track": "3",
  "scheduledTime": "2026-10-05T06:06:00.000Z",
  "actualTime": null,
  "estimatedTime": "2026-10-05T06:06:59.000Z",
  "delayMinutes": 1,
  "cancelled": false,
  "causeCodes": [],
  "runningCurrently": true
}
```

(`source`, `sourceUrl`, `license` and `retrievedAt` are left out above to keep it short. Every row has them.)

A road weather row from run `UyMiQszNqBjqHgj5F` (empty input apart from `"dataset": "roadWeather"`):

```json
{
  "dataset": "roadWeather",
  "id": "1022:2026-10-05T05:42:24.000Z",
  "time": "2026-10-05T05:42:24.000Z",
  "latitude": 60.459557,
  "longitude": 26.18522,
  "stationId": 1022,
  "stationCode": "vt7_Loviisa",
  "stationName": "Road 7 Loviisa",
  "municipality": "Loviisa",
  "province": "Uusimaa",
  "roadNumber": 7,
  "airTemperature": 10.3,
  "roadSurfaceTemperature": 9.4,
  "dewPoint": 9.1,
  "humidity": 93,
  "precipitation": "Dry weather",
  "precipitationType": "Dry weather",
  "precipitationIntensity": 0,
  "precipitation24h": 0.5,
  "windSpeed": 0.4,
  "windGust": 1.2,
  "windDirection": 180,
  "visibility": 20,
  "roadCondition": "Dry",
  "friction": 0.82
}
```

A vessel row from run `QZWkMoNGjOv5XfIHF` (`"dataset": "vessels", "bbox": "24.5,60.0,25.5,60.4"`, 46 ships off Helsinki):

```json
{
  "dataset": "vessels",
  "id": "230685000:2026-10-05T05:43:19.483Z",
  "time": "2026-10-05T05:43:19.483Z",
  "latitude": 60.02408,
  "longitude": 25.126965,
  "mmsi": 230685000,
  "name": "FINBO CARGO",
  "callSign": "OJST",
  "imo": 9181106,
  "shipType": 60,
  "shipTypeName": "passenger",
  "speed": 17.4,
  "course": 15.1,
  "heading": 14,
  "navigationStatus": "under way using engine",
  "destination": "FIVSS<>EEMUG",
  "eta": "10-05 06:45",
  "draught": 6.4
}
```

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `dataset` | string | `roadDisruptions` | `roadDisruptions`, `roadWeather`, `trains` or `vessels`. One dataset per run. |
| `region` | array | all of Finland | Municipality or region (maakunta) names, for example `Helsinki` or `Uusimaa`. Accents are optional. roadDisruptions matches municipality or region; roadWeather matches the municipality in the station code, so use a municipality there. Not used for trains and vessels. |
| `bbox` | string | none | Area as `west,south,east,north` in decimal degrees, for example `24.5,60.0,25.5,60.4`. Works for roadDisruptions, roadWeather and vessels. |
| `stations` | array | `["HKI"]` for trains | trains: station short codes or names (`HKI`, `TPE`, `Tampere`, `Oulu`). roadWeather: station ids (`1001`) or part of the station code (`Nupuri`). |
| `trainNumbers` | array | none | trains only. Train numbers to follow, for example `["9", "27"]`. |
| `mmsis` | array | all ships | vessels only. 9 digit MMSI numbers. |
| `disruptionTypes` | array | both | roadDisruptions only. `trafficAnnouncement`, `roadWork`. |
| `since` | string | `24h` | A duration (`90m`, `6h`, `2d`) or an ISO date (`2026-10-04`). At most 7 days back. |
| `maxResults` | integer | `50` | Most records to return, newest first. Each record is one billable result. Highest value 1 000. |
| `onlyNew` | boolean | `false` | Return only records that earlier runs with the same input did not deliver. See "Monitoring and scheduling". |

What `since` means per dataset: roadDisruptions returns messages that are active at some point after `since`; roadWeather returns stations with a reading after `since` (stations that have been silent longer are left out); trains returns departures scheduled after `since` and up to 30 minutes ahead; vessels returns ships with a position after `since`, one latest position per ship.

A run with empty input returns the 50 most recently updated traffic announcements and road works in all of Finland.

Example input: road weather on the Oulu municipality stations.

```json
{
  "dataset": "roadWeather",
  "region": ["Oulu"]
}
```

Example input: follow two long distance trains every day.

```json
{
  "dataset": "trains",
  "trainNumbers": ["9", "27"],
  "onlyNew": true
}
```

Example input: one ship by MMSI.

```json
{
  "dataset": "vessels",
  "mmsis": ["230668000"]
}
```

### Output

Every row has these fields:

| Field | Type | Description |
|---|---|---|
| `dataset` | string | `roadDisruptions`, `roadWeather`, `trains` or `vessels`. |
| `id` | string | Stable id of the record (see "Monitoring and scheduling"). |
| `time` | string or null | The main time of the record in UTC: message version time, station reading time, scheduled train time or AIS position time. Rows are sorted by it, newest first. |
| `latitude`, `longitude` | number or null | WGS84. For a road message the first point of its geometry, for a train the station. |
| `source` | string | `Fintraffic / digitraffic.fi`. |
| `sourceUrl` | string | The Digitraffic API address the row was read from. |
| `license` | string | `CC BY 4.0` with a link to the license and a note that the fields were converted. |
| `retrievedAt` | string | When the actor read the data (UTC). |

roadDisruptions:

| Field | Type | Description |
|---|---|---|
| `situationId`, `version` | string, number | Digitraffic's message id and version. A new version is a new record. |
| `type` | string | `trafficAnnouncement` or `roadWork`. |
| `announcementType` | string or null | For announcements, for example `general`, `preliminary accident report`, `ended`. |
| `title`, `description` | string or null | Title and location text as published. Most messages are only in Finnish. |
| `details` | array | Short facts, for example `Nopeusrajoitus 50 km/h` (speed limit 50 km/h). |
| `roadNumber`, `roadName` | number, string | Road of the first location point. |
| `municipality`, `province` | string or null | Municipality and region (maakunta) of the first location point. |
| `direction` | string or null | `both`, `pos`, `neg` or `unknown`, as Digitraffic gives it. |
| `startTime`, `endTime` | string or null | When the situation or road work is in force (UTC). |
| `severity` | string or null | Road works: `low`, `high` or `highest` (the highest of all phases). |
| `workTypes`, `restrictions` | array | Road works: kind of work and traffic restrictions. |
| `language`, `releaseTime` | string | Language of the text and first release time. |

roadWeather (units: °C, %, m/s, degrees, km, mm, mm/h):

| Field | Type | Description |
|---|---|---|
| `stationId`, `stationCode`, `stationName` | number, string, string | Station id, internal code and English name. |
| `municipality`, `province`, `roadNumber` | string, string, number | Where the station stands. |
| `airTemperature`, `roadSurfaceTemperature`, `dewPoint` | number or null | °C. |
| `humidity` | number or null | Relative humidity, %. |
| `roadCondition` | string or null | Road surface state from the first road sensor, for example `Dry`, `Moist`, `Wet`, `Wet and salty`, `Frost`, `Snow`, `Ice`, `Slushy`. |
| `precipitation`, `precipitationType` | string or null | Intensity class (`Dry weather`, `Weak`, `Moderate`, `Abundant`, `Light snow/sleet` and so on) and kind (`Rain`, `Drizzle`, `Snowfall`, `Sleet`, `Freezing rain` and so on). |
| `precipitationIntensity`, `precipitation24h` | number or null | mm/h now and mm over the last 24 hours. |
| `windSpeed`, `windGust`, `windDirection` | number or null | m/s and degrees. |
| `visibility` | number or null | km. |
| `friction` | number or null | Measured friction coefficient (0-1) where the station has an optical sensor. |

Fields are null when a station has no such sensor or the sensor reports a fault.

trains:

| Field | Type | Description |
|---|---|---|
| `trainNumber`, `departureDate` | number, string | Together they identify one train run. `departureDate` is the Finnish date the run starts. |
| `trainType`, `trainCategory`, `commuterLine` | string or null | For example `IC`, `Long-distance`, and the commuter line letter. |
| `operator` | string or null | Operator name, for example `VR-Yhtymä Oyj`. |
| `departureStation(Name)`, `arrivalStation(Name)` | string | First and last station of the run. |
| `station`, `stationName`, `event` | string | The stop this row describes and whether it is a `departure` or `arrival`. With `stations`, the departure from that station. With `trainNumbers`, the latest stop the train has passed. |
| `track` | string or null | Platform track. |
| `scheduledTime`, `actualTime`, `estimatedTime` | string or null | UTC. `estimatedTime` is Digitraffic's live estimate while `actualTime` is not yet known. |
| `delayMinutes` | number or null | Minutes late (negative when early), as Digitraffic computes it. |
| `cancelled` | boolean | The stop or the whole train is cancelled. |
| `causeCodes` | array | Delay cause codes from Digitraffic, when given. |
| `runningCurrently` | boolean or null | The train is on its way. |

Shunting moves are left out: they are yard work, not trains that travellers or freight buyers follow.

vessels:

| Field | Type | Description |
|---|---|---|
| `mmsi`, `imo`, `callSign`, `name` | number, number, string, string | Ship identifiers from AIS. `imo` is null when the ship sends none. |
| `shipType` | number or null | AIS ship type code, for example `70`. |
| `shipTypeName` | string or null | Meaning of the ship type code, for example `cargo`. |
| `speed` | number or null | Speed over ground in knots. Null when AIS reports "not available". |
| `course` | number or null | Course over ground in degrees. Null when AIS reports "not available". |
| `heading` | number or null | True heading in degrees. Null when AIS reports "not available". |
| `navigationStatus` | string or null | For example `under way using engine`, `at anchor`, `moored`. |
| `destination` | string or null | Destination as entered by the crew. |
| `eta` | string or null | Estimated time of arrival as entered by the crew, `MM-DD hh:mm` in UTC, because AIS sends no year. |
| `draught` | number or null | Metres. |

### Monitoring and scheduling

Set `onlyNew` to `true` to use the actor for recurring monitoring. The actor then remembers which records it has delivered for the same input, in a named key-value store in your Apify account (`nightwave-state-digitraffic-finland`, one record per input). Each run returns and charges only records that earlier runs did not deliver. The first run returns everything in the selection, up to `maxResults`. A run without news finishes successfully with 0 rows.

What counts as new:

- roadDisruptions: a new message or a new version of a message (`situationId` plus `version`). When Fintraffic updates a road work or marks an accident as ended, you get the new version.
- roadWeather: a new reading from a station (`stationId` plus reading time).
- trains: a train passing the stop (`departureDate`, `trainNumber`, station and event). With `onlyNew` a stop is delivered only once it has an actual time or is cancelled, so the delay you get is final and each stop is charged once.
- vessels: a new AIS position (`mmsi` plus position time).

Example: road works and accidents in Uusimaa every morning at 6.

1. Open the actor in Apify Console and save a task with this input:

```json
{
  "dataset": "roadDisruptions",
  "region": ["Uusimaa"],
  "onlyNew": true,
  "maxResults": 300
}
```

2. In Schedules, create a schedule with the cron expression `0 6 * * *`, timezone Europe/Helsinki, and add the task.
3. Read the new rows from each run's dataset, or add an integration (webhook, Slack, email) that fires when a run succeeds.

Keep `since` empty in scheduled runs: the default window of 24 hours moves with the clock. `onlyNew` and `maxResults` are not part of the remembered input, so you can change them without starting over. Changing any other field starts a fresh state. To start over with the same input, delete the record in the key-value store.

A second run straight after the first, with `onlyNew` and the same input, returns 0 rows and is not charged, unless Digitraffic published new records in between (vessel positions and road weather readings change within minutes).

### Use cases

- Logistics and transport buyers: road works and closures on the routes you drive, and delays on the trains that carry your freight or staff.
- Winter maintenance, construction and events: road surface temperature, road condition and friction near your sites.
- Ports, shipping agents and suppliers: which ships are near a port, their destination and ETA.
- Developers: one stable schema for four Finnish traffic APIs, ready for dashboards, alerts or AI agents.

### Limitations

- Road messages are published mostly in Finnish. The actor passes the text through unchanged; it does not translate.
- roadWeather gives the latest reading per station, not a history.
- `region` for roadWeather matches municipality names in station codes. A region name such as `Uusimaa` does not match road weather stations; use a `bbox` or municipality names there.
- trains covers trains in the Digitraffic rail API (VR and other operators on the Finnish network). Shunting moves are left out.
- vessels: pleasure craft and sailing vessels (AIS types 36 and 37) are always left out, because they are often privately owned. Ships without AIS ship data in the last 30 days are left out too, because their type is unknown. One latest position per ship is returned, not a track.
- Data is as accurate and as current as Digitraffic publishes it; most APIs are cached for about a minute.

### Data source and license

All data comes from [Digitraffic](https://www.digitraffic.fi/en/), Fintraffic's open data service: the road traffic API (`tie.digitraffic.fi`), the rail traffic API (`rata.digitraffic.fi`) and the marine traffic API (`meri.digitraffic.fi`).

Fintraffic's open data is licensed under [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/). Under its [terms of service](https://www.digitraffic.fi/en/terms-of-service/) you may use the data commercially if you credit the source. Fintraffic asks for this attribution: **Source: Fintraffic / digitraffic.fi, license CC 4.0 BY**. If you publish the data, keep that line, link to the license and say that the data has been modified: this actor renames and converts fields and leaves out records as described above. Every row carries `source`, `sourceUrl` and `license` for this.

The actor identifies itself to Digitraffic with the `Digitraffic-User: Nightwave/digitraffic-finland` header, asks for compressed responses as Digitraffic requires, and makes only a few requests per run. The data contains no personal data: no names of people, and pleasure craft are left out.

This actor is not affiliated with or endorsed by Fintraffic.

### Pricing

Pay per result: 0.002 USD per record returned (event `record`), which is 2 USD per 1 000 records. A record is one road message, one road weather reading, one train stop or one vessel position. Platform usage is included, so you pay only per result. Records skipped by `onlyNew` are not charged, and `maxResults` caps how many records a run returns, so you always know the highest possible cost.

Rows are delivered only after they have been charged. If you set a maximum cost per run (maxTotalChargeUsd), the run stops there and its status message says how many rows were delivered.

### Contact

Built and maintained by Nightwave AB. Questions, bugs and feature requests: kontakt@nightwave.se

### På svenska

Actorn hämtar öppen trafikdata för Finland från Fintraffics tjänst Digitraffic: trafikmeddelanden och vägarbeten, vägväderstationer (luft- och vägytetemperatur, väglag, nederbörd, vind, sikt och friktion), tågavgångar och förseningar per station eller tågnummer, samt AIS-positioner för fartyg. Välj dataset med `dataset`, avgränsa med `region`, `bbox`, `stations`, `trainNumbers` eller `mmsis`, och använd `onlyNew` för schemalagd bevakning. Varje rad innehåller källa och licens (CC BY 4.0, "Source: Fintraffic / digitraffic.fi"). Fritidsbåtar och segelbåtar tas inte med.

# Actor input Schema

## `dataset` (type: `string`):

Which data to return, one per run. roadDisruptions: traffic announcements and road works on Finnish roads. roadWeather: latest readings from about 500 road weather stations. trains: departures and delays by station or train number. vessels: AIS positions of ships in Finnish and nearby Baltic waters. Defaults to roadDisruptions.

## `region` (type: `array`):

Optional. Finnish municipality or region names, for example \["Helsinki"] or \["Uusimaa"]. roadDisruptions matches municipality or region (maakunta); roadWeather matches the municipality in the station code, so use a municipality there. Not used for trains and vessels: use stations or bbox. Accents are optional ("Hameenlinna" works).

## `bbox` (type: `string`):

Optional. Area as "west,south,east,north" in decimal degrees, for example "24.5,60.0,25.5,60.4" for the Helsinki area. Works for roadDisruptions, roadWeather and vessels.

## `stations` (type: `array`):

Optional. For trains: station short codes or names, for example \["HKI"] or \["Tampere"]; without stations and train numbers Helsinki (HKI) is used. For roadWeather: station ids or part of the station code, for example \["1001"] or \["Nupuri"].

## `trainNumbers` (type: `array`):

Optional, trains only. Train numbers to follow, for example \["9", "27"]. Each train gives one row per departure date with its latest passed stop and delay.

## `mmsis` (type: `array`):

Optional, vessels only. 9 digit MMSI numbers of the ships to follow, for example \["230668000"]. Leave empty for all ships.

## `disruptionTypes` (type: `array`):

Optional, roadDisruptions only. trafficAnnouncement (accidents, closures, ferry stops and other announcements) and roadWork. Defaults to both.

## `since` (type: `string`):

How far back to look: a duration such as "6h" or "2d", or an ISO date such as "2026-10-04". Defaults to the last 24 hours, at most 7 days. roadDisruptions: messages active since then. roadWeather: stations with a reading since then. trains: departures since then plus the next 30 minutes. vessels: ships with a position since then.

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

Maximum number of records to return, newest first, for example 50. Each record is one billable result. Defaults to 50, at most 1000.

## `onlyNew` (type: `boolean`):

For scheduled runs. When true, records that an earlier run with the same input already delivered are skipped and not charged: new message versions, new station readings, trains that have passed the stop since the last run, new ship positions. The first run returns everything. Defaults to false.

## Actor input object example

```json
{
  "dataset": "roadWeather",
  "region": [
    "Tampere",
    "Pirkanmaa"
  ],
  "bbox": "24.5,60.0,25.5,60.4",
  "stations": [
    "HKI",
    "TPE"
  ],
  "trainNumbers": [
    "9",
    "27"
  ],
  "mmsis": [
    "230668000"
  ],
  "disruptionTypes": [
    "trafficAnnouncement"
  ],
  "since": "6h",
  "maxResults": 50,
  "onlyNew": true
}
```

# Actor output Schema

## `results` (type: `string`):

Every record of the run with the main fields of each dataset. Open in Apify Console or download via the dataset API; the full rows are in the dataset without a view.

## `roadDisruptions` (type: `string`):

The main road disruptions fields. Empty unless the run used dataset roadDisruptions.

## `roadWeather` (type: `string`):

The main road weather fields. Empty unless the run used dataset roadWeather.

## `trains` (type: `string`):

The main trains fields. Empty unless the run used dataset trains.

## `vessels` (type: `string`):

The main vessels fields. Empty unless the run used dataset vessels.

# 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 = {
    "dataset": "roadDisruptions",
    "maxResults": 50,
    "onlyNew": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("nightwave-owner/digitraffic-finland").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 = {
    "dataset": "roadDisruptions",
    "maxResults": 50,
    "onlyNew": False,
}

# Run the Actor and wait for it to finish
run = client.actor("nightwave-owner/digitraffic-finland").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 '{
  "dataset": "roadDisruptions",
  "maxResults": 50,
  "onlyNew": false
}' |
apify call nightwave-owner/digitraffic-finland --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nightwave-owner/digitraffic-finland"
        }
    }
}
```

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/IcyZE7pyrMGadzucS/builds/98gwyUHSgVT89tkO1/openapi.json
