# VesselFinder Vessel Scraper - Positions, Voyages, Tracks (`rl1987/vesselfinder-api-scraper`) Actor

Live AIS positions in 18 sea areas from Dover to Singapore; search by name, MMSI or IMO; vessel detail, port calls, registry fields and 24-hour tracks. Six row kinds (position, vessel, voyage, registry, livePosition, trackPoint) with scrapedAt and provenance on every row. No account or API key.

- **URL**: https://apify.com/rl1987/vesselfinder-api-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.03 / 1,000 vessel position

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/actors/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

## VesselFinder Live Vessel Positions & Voyages Scraper

Live AIS positions, vessel search, per-vessel details, voyage, registry and 24-hour track
history from VesselFinder, read from the same mobile endpoints the official app uses
(`https://www.vesselfinder.com/api/pub/*` and `/api/mv4/*`). No account, no API key and no
login: the endpoints this Actor calls are the public ones the app calls before sign-in.

This is an independent, unofficial reader. It is not affiliated with VesselFinder, and it
returns what that service publishes — nothing more, and it does not add, correct or
interpolate positions.

### Modes

| `mode` | What it returns | Upstream operation |
| --- | --- | --- |
| `area` | One row per vessel currently inside each selected sea area — MMSI, name, position, age, heading (only above zoom 13), and flags for SAR/satellite/fantom marks | `GET /api/pub/mp2` (binary map tile) |
| `search` | Vessels matching a name, MMSI or IMO: MMSI, IMO, flag, vessel type. Up to 20 per term, alphabetical | `GET /api/pub/ms` (binary search) |
| `vessels` | Full detail for named vessels, plus one row per enrichment switched on | `GET /api/pub/ms` → `GET /api/pub/click/<mmsi>` → `GET /api/pub/vi2/<mmsi>`, `GET /api/mv4/shipmd/<mmsi>/<imo>`, `GET /api/mv4/ml/<mmsi>`, `GET /api/pub/track/<mmsi>` |

### What you get

Six row kinds, distinguished by `recordType`: `vessel`, `position`, `livePosition`, `voyage`,
`registry`, `trackPoint`. Each has its own dataset view and its own charge event, so a run
that wants positions is not billed for registry columns.

Every row carries `scrapedAt` (UTC, when it was delivered) and `provenance` (Actor build and
row kind). Columns that only some modes fill are null elsewhere rather than absent, so a
single dataset stays rectangular:

- `position` rows (area mode) carry `latitude`/`longitude`, `lastReportAgeMinutes` (0 = reported just now), `isSar`/`isSat`,
  and `headingDeg` — which is null below zoom 14 because the target does not send it there.
  Speed and course are **not** on a tile at any zoom; use `livePosition` or `vessels` for those.
- `vessel` rows carry dimensions, tonnage, flag, destination, ETA and the last reported
  position. In `search` mode they carry identity only.
- `voyage` rows carry the last port call (port, event, time) and the next port with its ETA.
- `registry` rows carry the static register — tonnages, dimensions, capacities, year built,
  hull material — and, where the target withholds a field, the field's name in `lockedFields`
  or `satelliteFields` instead of a silent null, with `registryComplete` summarising it.
- `trackPoint` rows are one point per report over the previous 24 hours (typically 200–300
  per vessel), with course and speed.

A run also writes `BILLING_AUDIT` to the key-value store: events charged, rows delivered,
rows dropped as unresolved or duplicated, and why the run stopped. Failed requests land in a
`failed-requests` dataset with their error type instead of vanishing into the log, and the run's
status message names any area or identifier that matched nothing — an MMSI with a typo and a
vessel with no data look identical from the outside otherwise.

### Limitations

Measured, not assumed:

- **The registry is mostly withheld.** For an anonymous client the target answers 28 of its 48
  registry fields with the literal string `locked` or `lockedSat` (measured on IMO 9811000:
  10 `locked`, 18 `lockedSat`, 20 real values). Those columns are null and their names are
  reported in `lockedFields`/`satelliteFields`; `registryComplete` is `false`. A `lockedSat`
  field is the one the target's own paid tiers unlock.
- **Map coverage is not monotonic in zoom.** The tile endpoint samples per map tile, so a wide
  box at a high zoom can come back nearly empty: over all 18 areas the total climbs from zoom 8
  to a peak around zoom 11 and then falls again toward zoom 14. The absolute counts move run to
  run with live traffic, so size a run by trying your own areas rather than by a fixed figure.
  Zoom 14 is the only setting that carries a heading. The default is 11.
- **Area mode is a sample of an area, not a census of it.** Rows move with the hour and the
  tide; a run is a snapshot, not a capacity guarantee.
- **There is no mainland-China coverage.** A 70 × 60 km box off Shanghai returned 0 rows at
  every zoom, so no Chinese area is offered. Gulf of Aden / Bab el Mandeb likewise returned 0
  rows for every box tried, which is why the area list stops at Suez.
- **Small sea areas return few vessels.** On a sample hour the Strait of Dover returned about 45
  rows at the default zoom against roughly 2,400 for the densest offered area (Singapore Strait);
  the exact counts move with traffic. That spread is real, not a bug, and it is why `maxItems`
  matters in the other direction.
- **Search is a prefix listing, not a ranking.** A term that matches nothing returns zero rows
  with HTTP 200; a bare MMSI or IMO resolves the vessel it belongs to. Multi-word phrases are
  matched as given, and there is no fuzzy match.
- **A vessel without a published MMSI** (some of the vessels returned for a term such as "MAERSK")
  comes back with `mmsi: null` and an IMO; those rows are keyed on the IMO.
- **Live position and detail can disagree by a minute.** They are separate endpoints sampled
  at slightly different moments; `reportedAt` on each row says which moment.
- **Detail and registry can report a vessel's beam differently.** `beamM` on a `vessel` row comes
  from the detail endpoint (`/api/pub/click`) and on a `registry` row from the register
  (`/api/mv4/shipmd`); the two use different conventions and can differ by a few metres (QUEEN
  MARY 2: 42 m on detail, 48.7 m on the register). Each row reports what its own endpoint gave.
- **Login-gated features are out of scope** (fleet, alerts, the paid track range beyond 24 h).
  The app's login is protected by Play Integrity attestation, which this Actor does not touch.
- **No positions are computed.** Distance, ETA and remaining voyage are not derived here; the
  target's own ETA is passed through as a timestamp.

### Pricing

Pay-per-event, one event per delivered row: `position-row`, `vessel-row`, `voyage-row`,
`registry-row`, `live-position-row`, `track-point-row`. A track point is one point, so a vessel
with track history enabled costs a few hundred rows — that enrichment is off by default and
its cost per row is the same as any other row.

Not billed: rows the target answered with nothing (an unknown MMSI, a portless voyage), rows
de-duplicated within the run, rows the dataset schema rejects, and rows cut by `maxItems` or by
the maximum total charge on the run. `maxItems` counts delivered rows, after those drops.

The current per-event price is on the Actor's Pricing tab — it comes from `.actor/pricing.json`
and is deliberately not repeated here.

### Proxy

Measured on 2026-11-22 from this Actor's own datacenter exit: a bare `urllib` GET with no
browser headers to the map endpoint answered **HTTP 403**, and the identical request with the
app's `User-Agent` and `Referer` answered **200** with a valid tile. Requests go out through
`ImpitHttpClient(browser="chrome")`, so the TLS/JA3 fingerprint and headers match a real Chrome
as well. Apify Proxy is on by default and works; residential proxies are worth switching on for
a long run over many areas, since the failure mode here is a status-code block rather than a
soft ban. `maxSessionRotations` is the budget that covers it — it is a separate counter from
`maxRequestRetries`.

### Upgrading

| date | change | affects |
| --- | --- | --- |
| 2026-11-22 | first beta build: 6 row kinds, 18 sea areas, default zoom 11 | output contract, charging |

### Development

```bash
pip install -r requirements.txt
python -m pytest tests -q
python -m src
apify validate-schema
```

`src/vesselfinder.py` is the only module that knows the target's wire format — the binary map
tile, the search records, the XOR-masked track points and the endpoint URLs. `src/routes.py`
turns requests into rows and `src/main.py` wires input to requests. `billing.py`, `errors.py`
and `crash_reporting.py` are portfolio infrastructure and are not target-specific.

# Actor input Schema

## `mode` (type: `string`):

Live positions: every vessel currently inside one named sea area (one row per vessel, cheapest per run). Search: vessels matching a name, MMSI or IMO, one row each. Vessels: full detail for specific vessels, plus voyage, registry, live position and optional 24-hour track history as separate row kinds, billed separately.

## `areas` (type: `array`):

One row per vessel inside each selected area, at the moment of the run. The boxes are drawn around the world's busy straits, ports and approaches; they are fixed, so two runs over the same area are directly comparable. Measured in one hour at the default zoom: Singapore Strait 2,419 vessels, Taiwan Strait 1,716, Malacca Strait 1,445, Hong Kong 1,412, Rotterdam 1,329, Antwerp 729, Los Angeles 648, Dubai 568, Bosphorus 556, Busan 538, Gibraltar 464, Panama 431, Hamburg 358, New York 301, Santos 151, Suez 141, Western approaches 63, Dover 42. Counts move with the tide and the hour, so treat them as scale, not as a fixed capacity.

## `mapZoom` (type: `integer`):

How finely the target samples the area. Coverage is NOT monotonic in zoom - the target answers per map tile, so a wide box at a high zoom can come back almost empty. Measured over all 18 areas in one hour: 2,636 rows in total at zoom 8, 5,419 at 10, 8,951 at 11, 5,801 at 12, and 75 at 14 (Singapore Strait: 154 / 865 / 2,419 / 3 at zooms 8 / 10 / 11 / 14). Zoom 14 is the only setting that also carries a heading in whole degrees, so raise it to 14 only for a small box where you want headings more than coverage.

## `searchQueries` (type: `array`):

Each term is matched against vessel names, and a bare MMSI or IMO also resolves the vessel it belongs to. The target filters rather than ranks: a term that matches nothing returns zero rows, not a page of near matches. Up to 20 vessels come back per term.

## `vesselIds` (type: `array`):

One vessel per line: a 9-digit MMSI or a 7-digit IMO, both of which appear on the vessel's VesselFinder page. Each vessel costs one request to identify it, one for its detail, and then one per enrichment enabled below.

## `includeVoyage` (type: `boolean`):

One extra request per vessel, delivered as a separate voyage row: departure port, port event and time, next port and its ETA. Billed per row, so a run that does not want port calls saves the charge by unticking it.

## `includeRegistry` (type: `boolean`):

One extra request per vessel for the static registry record. Expect most of it to come back withheld: the target answers about 28 of its 48 fields with a literal 'locked' or 'lockedSat' for an anonymous client, and this Actor reports which ones by name rather than dropping them.

## `includeLivePosition` (type: `boolean`):

One extra request per vessel for its position with a speed and a timestamp - the detail row already carries a position, but not a per-vessel timestamp of its own. Billed as its own row kind.

## `includeTrack` (type: `boolean`):

One extra request per vessel for its track, delivered as 200-300 rows (one per five-minute report over the last 24 hours). Off by default because it is the only option here that costs hundreds of rows per vessel instead of one; a 20-vessel run with this on delivers about 5,000 rows.

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

Stop after this many rows have been DELIVERED (0 = no limit). Counted by the billing ledger after de-duplication and after rows the target answered with nothing were dropped, so it limits what you receive and pay for, not what the target returned. In vessels mode with track history on, this is the setting that stops the run.

## `maxConcurrency` (type: `integer`):

Max number of requests processed in parallel.

## `maxRequestsPerCrawl` (type: `integer`):

Hard cap on total requests, including the ones the enrichments queue. 0 = unlimited. One vessel costs 2 requests plus one per enrichment; a 14-area run costs 14.

## `maxRequestRetries` (type: `integer`):

Retries per request before it is marked failed. Does NOT bound retries caused by a blocked or rate-limited status code (401/403/429) - see maxSessionRotations for that.

## `maxSessionRotations` (type: `integer`):

Retries for a blocked or rate-limited status code, each with a fresh session/proxy. The target answers a plain request with HTTP 403, so this budget is the one that matters when it starts refusing.

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

Apify Proxy or your own proxies. The target refuses this datacenter IP with a bare request but serves a browser-like one; use residential proxies if a run starts seeing 403s.

## Actor input object example

```json
{
  "mode": "area",
  "areas": [
    "dover-strait"
  ],
  "mapZoom": 11,
  "searchQueries": [],
  "vesselIds": [],
  "includeVoyage": true,
  "includeRegistry": true,
  "includeLivePosition": true,
  "includeTrack": false,
  "maxItems": 0,
  "maxConcurrency": 5,
  "maxRequestsPerCrawl": 0,
  "maxRequestRetries": 5,
  "maxSessionRotations": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Every delivered row: vessels, live positions, voyages, registry records and track points, one row kind per view in the dataset schema.

## `runSummary` (type: `string`):

The ledger's own record of the run: events charged, rows delivered, rows dropped as unresolved or duplicates, and the stop reason. Written on every run, including an empty one.

## `failedRequests` (type: `string`):

Requests that failed after every retry, with the error type and message. Empty when the run had no failures.

# 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 = {
    "areas": [
        "dover-strait"
    ],
    "searchQueries": [],
    "vesselIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/vesselfinder-api-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 = {
    "areas": ["dover-strait"],
    "searchQueries": [],
    "vesselIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/vesselfinder-api-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 '{
  "areas": [
    "dover-strait"
  ],
  "searchQueries": [],
  "vesselIds": []
}' |
apify call rl1987/vesselfinder-api-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/vesselfinder-api-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/YdeUJYxIaIxne233z/builds/EnRPhCj3bobzY6CeN/openapi.json
