
Tori.fi Scraper for JavaScript and Node.js: Finnish classifieds as JSON for your app
This repository shows how to drive the Tori.fi Marketplace Scraper from Node.js with one ES module and the official apify-client package. Hand it a keyword, a Tori category code or a filtered search link, and it resolves to plain objects describing live Finnish for-sale ads: heading, euro price as a number, place name and coordinates, private or dealer seller, photo links and, optionally, the seller's full text. The crawl runs on Apify's infrastructure, so an Express route, a queue worker or a serverless function only starts a run and reads rows back. A small warning before you wire it in: despite the cars in its slug, it reads the main marketplace and the vehicle-parts category, not Tori's dedicated car site.
Actor: Tori.fi Marketplace Scraper (Finland) · Publisher: Devil Scrapes · Also in Python: tori-fi-scraper-python
🔥 What you get
- Three ways to aim a run: a free-text
query, a Tori category code such as 0.93, or a searchUrl copied from a search you already filtered on the site. When the URL is set, it takes priority over the other two.
- Prices you can do maths on:
price is a whole number of euros and currency is EUR, so there is no string parsing before you sort or average.
- Coordinates as well as place names: each ad can carry
latitude and longitude next to the free-text location and its region, which makes radius filters and maps a few lines of code.
- Private or dealer, flagged per row:
seller_type reads private or dealer, inferred from the ad's own flags.
- Optional second pass per ad: with
enrichDetails on, the Actor also opens each listing page to add description, item_condition and category_path; switch it off for a quicker, lighter run.
- Every photo link:
photo_urls is a list holding all of the ad's images, not only the thumbnail.
- Retries are its problem, not yours: when Tori answers with a timeout or a server error, the Actor backs off and tries again rather than handing you a hole in the data.
🎯 Use cases
Serve a Finnish listings feed from your API
Call the Actor from a backend job, store rows keyed by listing_id and expose them through your own endpoint. Front-end code then filters by region or seller_type without ever talking to Tori.
Send a webhook when a matching ad appears
Schedule a run on Apify or from a cron container, compare the new listing_id set with the previous one and POST the fresh ads to Slack, Discord or any webhook URL. A reseller watching one product type gets a ping instead of refreshing a tab.
Add a near-me search to a reseller tool
With latitude and longitude on the rows, a distance filter is pure arithmetic in JavaScript. Show buyers only the ads within a drive of their pickup point, sorted by price.
Enrich a marketplace dashboard with images
photo_urls holds every image of an ad, so a React or Vue card can show a gallery rather than a single thumbnail. Pair it with listing_url to send users to the original ad on Tori.
⚡ Quick start
You need an Apify account and an API token from Console → Settings → Integrations. Apify's free plan includes monthly usage credit; this Actor's event prices are listed under Pricing below.
git clone https://github.com/devilscrapes/tori-fi-scraper-javascript.git
cd tori-fi-scraper-javascript
npm install
export APIFY_TOKEN=your_token_here
node index.js # uses input.json
node index.js my-input.json --out data --max-charge 2
The script starts the Tori.fi Marketplace Scraper (Finland), waits for it to finish, prints a link to the run in Apify Console and saves every result to results.json and results.csv. It exits with code 1 and the run's status message if the run fails.
🧩 The core call
If you are embedding this in a service, the lines below are the whole contract. The run promise settles when the Actor stops, and listItems() returns that run's dataset as an array.
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('DevilScrapes/tori-finland-cars').call({"query": "polkupyörä", "maxResults": 10, "enrichDetails": true, "proxyConfiguration": {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
📥 Input
index.js reads input.json and forwards it untouched. The sample looks for bicycles with the Finnish word polkupyörä, caps the pull at 10 ads and leaves enrichment on, so you see complete objects for roughly 22 cents. No field is mandatory: send a category or a searchUrl instead of query from your own request handler, and lift maxResults toward its 1,000 limit in production.
{
"query": "polkupyörä",
"maxResults": 10,
"enrichDetails": true,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
]
}
}
| Field |
Type |
Required |
Default |
Allowed values |
searchUrl |
string |
no |
— |
— |
query |
string |
no |
— |
— |
category |
string |
no |
— |
— |
maxResults |
integer |
no |
50 |
— |
enrichDetails |
boolean |
no |
true |
— |
proxyConfiguration |
object |
no |
{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]} |
— |
📤 Output
Each array element is one ad. Your code can count on listing_id, listing_url, title and scraped_at; treat the rest as nullable. price is an integer or null, never a formatted string, and the three enrichment fields arrive only when enrichDetails is true.
| Field |
Type |
Always present |
listing_id |
string |
yes |
listing_url |
string |
yes |
title |
string |
yes |
price |
integer or null |
no |
currency |
string or null |
no |
brand |
string or null |
no |
trade_type |
string or null |
no |
item_condition |
string or null |
no |
category_path |
string or null |
no |
location |
string or null |
no |
region |
string or null |
no |
latitude |
number or null |
no |
longitude |
number or null |
no |
seller_type |
string or null |
no |
photo_urls |
array |
no |
description |
string or null |
no |
posted_date |
string or null |
no |
scraped_at |
string |
yes |
💰 Pricing
| Event |
Price (USD) |
| Actor start |
$0.2 |
| result-row |
$0.002 |
Prices as configured on 2026-10-16. The Actor page always shows the current price. Runs are billed to the Apify account that owns the token. Use --max-charge to cap what a single run can cost.
🛠️ Working with the data in JavaScript
This script filters the saved ads to those within 25 km of central Helsinki, using the haversine formula on latitude and longitude, then prints them cheapest first. Only Node.js built-ins are involved, so it runs anywhere Node 20 does.