# TruckWorld Scraper — Used Trucks Australia (`crawloop/truckworld-scraper`) Actor

Scrape TruckWorld used trucks in Australia: prime movers, tippers, and trailers. Extract AUD prices with GST split, odometer, make/model/year, dealer phones, and images.

- **URL**: https://apify.com/crawloop/truckworld-scraper.md
- **Developed by:** [Andrej Kiva](https://apify.com/crawloop) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 scraped truckworld listings

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

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

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

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

# README

../README.md

# Actor input Schema

## `startUrls` (type: `array`):

Search results, category SEO pages, dealer inventory URLs (AccountCRMID), or listing detail pages (e.g. /listings/for-sale/prime-movers/15158, /listing/for-sale/{id}/…).

## `searchQuery` (type: `string`):

Optional keyword search for a built /listings/search URL (e.g. Kenworth, Prime Mover, tautliner).

## `categories` (type: `array`):

Built-in TruckWorld body-type roots when you do not paste URLs. Each shortcut becomes /listings/for-sale/{slug}/{id}.

## `listingType` (type: `string`):

Used when building a search URL from filters (or when startUrls is empty). Auction Results metadata is public; sold prices are often login-gated.

## `manufacturer` (type: `string`):

Filter by brand when building a search URL (e.g. KENWORTH, ISUZU, HINO, VOLVO, MACK, IVECO).

## `category` (type: `string`):

Sandhills category id if you prefer a raw id (e.g. 15158 prime movers, 15136 tippers, 881 trailers).

## `accountCrmId` (type: `string`):

Watch a single dealer inventory by AccountCRMID (from listing cards). Builds /listings/search?...\&AccountCRMID=...

## `state` (type: `string`):

Optional Australian state filter when building a search URL (e.g. Victoria, NSW, Queensland).

## `sort` (type: `string`):

Optional sort key for built search URLs (9 = Recently Added, 2 = Price Low→High, 3 = Price High→Low, 5 = Year High→Low).

## `baseUrl` (type: `string`):

Site origin for built search URLs. Default TruckWorld Australia. Optional Asia hub: https://www.truckworld.asia (different inventory mix).

## `runMode` (type: `string`):

listings = fast card fields (AUD price, GST, odometer, dealer phone, images). details = also visit each PDP for Vehicle ld+json address enrichment.

## `pricedOnly` (type: `boolean`):

Skip Call-for-price / Auction / zero-price rows.

## `retailOnly` (type: `boolean`):

Skip AuctionTime / EquipmentFacts cross-lists and auction-result rows (recommended for asking-price comps).

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

Maximum dataset rows to emit (in monitor seed runs: max listings to fingerprint).

## `maxPagesPerUrl` (type: `integer`):

Maximum pagination pages per search / dealer inventory URL (28 listings per page). Unfiltered search caps around 357 pages (~10k) — shard by category for full coverage.

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

Apify Residential AU is required on platform runs — Cloudflare blocks datacenter IPs.

## `concurrencyLimit` (type: `integer`):

Parallel PDP fetches in details mode.

## `monitorMode` (type: `boolean`):

Delta tracking for category, search, or dealer inventory URLs. First run seeds a named Key-Value store (no dataset rows / alerts). Later runs output only new listings and price changes. Pair with an Apify Schedule.

## `monitorStoreName` (type: `string`):

Named Key-Value store for fingerprints across scheduled runs. Use a distinct name per watch target (dealer or category).

## `telegramToken` (type: `string`):

Bot token for real-time alerts on new listings and price changes (monitorMode only).

## `telegramChatId` (type: `string`):

Telegram user or group chat ID that receives monitor alerts.

## `resetMonitorState` (type: `boolean`):

Clear stored listing fingerprints before this run (forces a fresh seed run).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.truckworld.com.au/listings/for-sale/prime-movers/15158"
    }
  ],
  "searchQuery": "KENWORTH",
  "categories": [],
  "listingType": "For Retail",
  "manufacturer": "KENWORTH",
  "category": "15158",
  "accountCrmId": "35091979",
  "state": "Victoria",
  "sort": "9",
  "baseUrl": "https://www.truckworld.com.au",
  "runMode": "listings",
  "pricedOnly": false,
  "retailOnly": true,
  "maxItems": 100,
  "maxPagesPerUrl": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AU"
  },
  "concurrencyLimit": 5,
  "monitorMode": false,
  "monitorStoreName": "truckworld-monitor-state",
  "resetMonitorState": false
}
```

# Actor output Schema

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

Default dataset items.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.truckworld.com.au/listings/for-sale/prime-movers/15158"
        }
    ],
    "baseUrl": "https://www.truckworld.com.au",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "AU"
    },
    "monitorStoreName": "truckworld-monitor-state"
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawloop/truckworld-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 = {
    "startUrls": [{ "url": "https://www.truckworld.com.au/listings/for-sale/prime-movers/15158" }],
    "baseUrl": "https://www.truckworld.com.au",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "AU",
    },
    "monitorStoreName": "truckworld-monitor-state",
}

# Run the Actor and wait for it to finish
run = client.actor("crawloop/truckworld-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 '{
  "startUrls": [
    {
      "url": "https://www.truckworld.com.au/listings/for-sale/prime-movers/15158"
    }
  ],
  "baseUrl": "https://www.truckworld.com.au",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AU"
  },
  "monitorStoreName": "truckworld-monitor-state"
}' |
apify call crawloop/truckworld-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawloop/truckworld-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/whBj72gtuNSgrZzNc/builds/6WLuXbAPOntX7f3Uf/openapi.json
