{
  "openapi": "3.0.1",
  "info": {
    "title": "TruckWorld Scraper — Used Trucks Australia",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "6WLuXbAPOntX7f3Uf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~truckworld-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-truckworld-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/crawloop~truckworld-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-truckworld-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/crawloop~truckworld-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-truckworld-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": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "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}/…).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQuery": {
            "title": "Search keywords",
            "type": "string",
            "description": "Optional keyword search for a built /listings/search URL (e.g. Kenworth, Prime Mover, tautliner)."
          },
          "categories": {
            "title": "Category shortcuts",
            "type": "array",
            "description": "Built-in TruckWorld body-type roots when you do not paste URLs. Each shortcut becomes /listings/for-sale/{slug}/{id}.",
            "items": {
              "type": "string",
              "enum": [
                "prime-movers",
                "tipper-trucks",
                "tray-trucks",
                "cab-and-chassis-trucks",
                "pantech-trucks",
                "refrigerated-trucks",
                "service-trucks",
                "tow-trucks",
                "utes",
                "trailers",
                "semi-trailers",
                "passenger-buses",
                "commercial-vans",
                "water-trucks",
                "crane-trucks",
                "curtainsider-trucks",
                "hooklift-trucks",
                "beavertail-trucks"
              ],
              "enumTitles": [
                "Prime movers",
                "Tipper trucks",
                "Tray trucks",
                "Cab & chassis",
                "Pantech trucks",
                "Refrigerated trucks",
                "Service trucks",
                "Tow trucks",
                "Utes",
                "Trailers",
                "Semi-trailers",
                "Passenger buses",
                "Commercial vans",
                "Water trucks",
                "Crane trucks",
                "Curtainsiders",
                "Hooklift trucks",
                "Beavertail trucks"
              ]
            },
            "default": []
          },
          "listingType": {
            "title": "Listing type",
            "enum": [
              "For Retail",
              "For Rent",
              "Auction Results"
            ],
            "type": "string",
            "description": "Used when building a search URL from filters (or when startUrls is empty). Auction Results metadata is public; sold prices are often login-gated.",
            "default": "For Retail"
          },
          "manufacturer": {
            "title": "Manufacturer",
            "type": "string",
            "description": "Filter by brand when building a search URL (e.g. KENWORTH, ISUZU, HINO, VOLVO, MACK, IVECO)."
          },
          "category": {
            "title": "Category ID",
            "type": "string",
            "description": "Sandhills category id if you prefer a raw id (e.g. 15158 prime movers, 15136 tippers, 881 trailers)."
          },
          "accountCrmId": {
            "title": "Dealer AccountCRMID",
            "type": "string",
            "description": "Watch a single dealer inventory by AccountCRMID (from listing cards). Builds /listings/search?...&AccountCRMID=..."
          },
          "state": {
            "title": "State / territory",
            "type": "string",
            "description": "Optional Australian state filter when building a search URL (e.g. Victoria, NSW, Queensland)."
          },
          "sort": {
            "title": "Sort",
            "type": "string",
            "description": "Optional sort key for built search URLs (9 = Recently Added, 2 = Price Low→High, 3 = Price High→Low, 5 = Year High→Low)."
          },
          "baseUrl": {
            "title": "Base URL",
            "type": "string",
            "description": "Site origin for built search URLs. Default TruckWorld Australia. Optional Asia hub: https://www.truckworld.asia (different inventory mix).",
            "default": "https://www.truckworld.com.au"
          },
          "runMode": {
            "title": "Run Mode",
            "enum": [
              "listings",
              "details"
            ],
            "type": "string",
            "description": "listings = fast card fields (AUD price, GST, odometer, dealer phone, images). details = also visit each PDP for Vehicle ld+json address enrichment.",
            "default": "listings"
          },
          "pricedOnly": {
            "title": "Only listings with price",
            "type": "boolean",
            "description": "Skip Call-for-price / Auction / zero-price rows.",
            "default": false
          },
          "retailOnly": {
            "title": "Retail TruckWorld only",
            "type": "boolean",
            "description": "Skip AuctionTime / EquipmentFacts cross-lists and auction-result rows (recommended for asking-price comps).",
            "default": true
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum dataset rows to emit (in monitor seed runs: max listings to fingerprint).",
            "default": 100
          },
          "maxPagesPerUrl": {
            "title": "Max Pages per Start URL",
            "minimum": 1,
            "type": "integer",
            "description": "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.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Residential AU is required on platform runs — Cloudflare blocks datacenter IPs."
          },
          "concurrencyLimit": {
            "title": "Max Concurrency Limit",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel PDP fetches in details mode.",
            "default": 5
          },
          "monitorMode": {
            "title": "Monitoring Mode",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor Store Name",
            "type": "string",
            "description": "Named Key-Value store for fingerprints across scheduled runs. Use a distinct name per watch target (dealer or category).",
            "default": "truckworld-monitor-state"
          },
          "telegramToken": {
            "title": "Telegram Bot Token",
            "type": "string",
            "description": "Bot token for real-time alerts on new listings and price changes (monitorMode only)."
          },
          "telegramChatId": {
            "title": "Telegram Chat ID",
            "type": "string",
            "description": "Telegram user or group chat ID that receives monitor alerts."
          },
          "resetMonitorState": {
            "title": "Reset Monitor State",
            "type": "boolean",
            "description": "Clear stored listing fingerprints before this run (forces a fresh seed run).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}