# Rock and Dirt Scraper — US Construction Equipment (`rastriq/rockanddirt-scraper`) Actor

Scrape heavy construction equipment listings from RockAndDirt.com. Extract price, make, model, year, hours, dealer info, and specs for excavators, loaders, dozers, and cranes.

- **URL**: https://apify.com/rastriq/rockanddirt-scraper.md
- **Developed by:** [Rastriq — Structured data from the world](https://apify.com/rastriq) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 6 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.90 / 1,000 results

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

### What data can you scrape from Rock and Dirt - US Construction Equipment?

- Track asking prices for construction equipment, trucks, and attachments across the US
- Monitor parts availability and pricing for specific makes and models
- Identify active dealers and sellers in a given equipment segment
- Build a pricing benchmark for resale or auction valuation
- Research the used equipment market for a category before making a purchase or investment

***

### Output: Rock and Dirt - US Construction Equipment data structure

The Actor returns structured records with all available fields from Rock and Dirt - US Construction Equipment listings.

***

### How to scrape Rock and Dirt listings: quick start

1. Click **Start** with the default input to test with a small sample.
2. Open the **Output** tab to preview results.
3. Export as CSV / Excel / JSON, or connect via API.

***

### How to scrape Rock and Dirt - US Construction Equipment - input options

| Field | Description | Default |
|-------|-------------|---------|
| **Listing Type** | Type of listings to collect: heavy equipment, trucks, attachments, trailers, etc. | `Equipment` |
| **Make** | **Filter by brand - e.g.** Caterpillar, John Deere, Komatsu. Leave blank for all brands. | - |
| **Category** | **Filter by equipment category - e.g.** Excavators, Dozers, Loaders. Leave blank for all categories. | - |
| **?? Sort Order** | How to sort the results. | `relevance` |
| **Max Items** | Maximum number of listings to collect. | `10` |
| **Proxy configuration** | Optional. Residential proxies recommended for best results. | Apify auto |

#### Example input and additional Rock and Dirt Scraper options

**Example input:**

```json
{
  "listingType": "Equipment",
  "make": "",
  "category": "",
  "sort": "relevance",
  "maxItems": 10
}
```

`listingType` accepts `Equipment`, `Trucks`, `Attachments`, `Trailers`, `Dismantled`, `Parts`, `Buildings` or `__ALL__` (full catalog). `sort` accepts `relevance`, `nearby`, `price_asc` or `price_desc`.

These options are in the input schema in addition to the table above:

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `data_freshness` | string | `preloaded` | `preloaded` reads the monthly snapshot (same price, faster); `live` scrapes RockAndDirt.com in real time. |
| `startUrls` | array | - | www.rockanddirt.com search URLs; make, category and type are read from the URL parameters (live mode only). |
| `usePartitioning` | boolean | `true` | When `maxItems` is above 900 on a single-type run, splits the query by manufacturer, because the search API returns at most 1,000 results per query. |
| `maxConcurrent` | integer | `10` | Cells scraped in parallel on full-catalog runs (1-20). |
| `outputSchema` | string | `ftp28` | `ftp28` (canonical Spanish field names) or `english` (descriptive English names). |
| `skipItems` | integer | `0` | Skips the first N snapshot records so you can resume a partial download; skipped records are not charged. |

Each Rock and Dirt Scraper record covers the listing details named in the Actor description: price, make, model, year, hours, dealer information and specifications. Fields a listing does not provide may be empty.

***

### How does Rock and Dirt Scraper work?

This Actor uses **Playwright (headless browser), HTTP requests** to extract data from Rock and Dirt - US Construction Equipment. It navigates search results or catalog pages, extracts structured data from each listing, and normalizes the output into a consistent schema.

***

### How much does it cost to scrape Rock and Dirt - US Construction Equipment?

This Actor uses **Pay-Per-Event** pricing - you pay only for results delivered, not for compute time.

| Plan | What you get |
|------|-------------|
| **Free tier** | $5/month of platform credits - enough for thousands of results |
| **Paid plans** | Scale to tens of thousands of results per run |

Rock and Dirt Scraper charges per event, using the prices in the Actor's pricing configuration:

| Event | Price (USD) | When it is charged |
|-------|-------------|--------------------|
| Actor Start | $0.005 | Once per run, one event per GB of memory (minimum one) |
| result | $0.0019 | Each listing saved to the dataset |

Both preloaded and live modes cost $1.90 per 1,000 results. **Worked example** with the default 256 MB run memory, which means 1 start event = $0.005:

| Listings | Result charges | Start charge | Total |
|----------|----------------|--------------|-------|
| 100 | 100 × $0.0019 = $0.19 | $0.005 | **$0.195** |
| 1,000 | 1,000 × $0.0019 = $1.90 | $0.005 | **$1.905** |
| 10,000 | 10,000 × $0.0019 = $19.00 | $0.005 | **$19.005** |

Set `maxItems` (0 means no limit) or use Apify's maximum-cost-per-run setting to cap spend.

***

### Rock and Dirt data integrations: API, Make, Zapier and scheduling

- **Schedule** daily/weekly runs from the Apify Console for automated data collection.
- Push results to **Google Sheets, Slack, Zapier, Make, webhooks** or any database.
- Fetch datasets via the **Apify REST API** or the official JavaScript/Python clients.

***

### Is it legal to scrape Rock and Dirt - US Construction Equipment?

This Actor collects only **publicly available** data. It does not log in, bypass paywalls, or access private information. You are responsible for using the extracted data in compliance with the site's Terms of Service and applicable data protection laws (including GDPR where relevant).

***

### ? FAQ

**Can I access the data via API?**
Yes. Every run stores its dataset on Apify. Fetch it via REST API or use the official JavaScript/Python clients.

**What export formats are supported?**
JSON, CSV, Excel (XLSX), XML, and HTML table. You can also push data directly to Google Sheets or any webhook endpoint.

**Do I need proxies?**
Residential proxies are recommended for best results. The default proxy configuration is pre-set.

**How much does Rock and Dirt Scraper cost?**
$0.0019 per listing plus a $0.005 start event. A 1,000-listing run is about $1.905 at the default memory. See the pricing section above.

**What is the difference between preloaded and live data in Rock and Dirt Scraper?**
`preloaded` returns the monthly snapshot instantly; `live` scrapes RockAndDirt.com in real time. Both cost the same per result.

**Can I download the whole catalog?**
Yes. Set `listingType` to `__ALL__` and `maxItems` to `0`. For runs above 900 items on a single type, `usePartitioning` splits the query by manufacturer to stay under the search API's 1,000-result limit per query.

**What if my run was cut short?**
Use `skipItems` with the number of records you already received; skipped records are not emitted or charged.

**Why are some fields empty?**
Not every seller fills in every attribute (hours, year, dealer details).

**Where do I report a problem?**
Open an issue in the **Issues** tab of this Actor with your input and the run ID.

### Related Actors from Rastriq

- [Mascus Scraper](https://apify.com/rastriq/mascus-scraper)
- [Machinerytrader Scraper](https://apify.com/rastriq/machinerytrader-discovery)
- [Machineryzone Scraper](https://apify.com/rastriq/machineryzone-scraper)
- [Machineseeker Scraper](https://apify.com/rastriq/machineseeker-scraper)

### Related Scrapers by Rastriq

- [Cyclica Scraper](https://apify.com/rastriq/cyclica-scraper)
- [Dozr Scraper](https://apify.com/rastriq/dozr-scraper)
- [Euroauctions Scraper](https://apify.com/rastriq/euroauctions-scraper)
- [Ironplanet Eu Scraper](https://apify.com/rastriq/ironplanet-eu-scraper)
- [Machineryzone Scraper](https://apify.com/rastriq/machineryzone-scraper)
- [Machineseeker Scraper](https://apify.com/rastriq/machineseeker-scraper)
- [Mascus Scraper](https://apify.com/rastriq/mascus-scraper)
- [Rbauction Scraper](https://apify.com/rastriq/rbauction-scraper)
- [Ritchiespecs Scraper](https://apify.com/rastriq/ritchiespecs-catalog-scraper)
- [Supralift Scraper](https://apify.com/rastriq/supralift-scraper)
- [Surplex Auction Scraper](https://apify.com/rastriq/surplex-auction-scraper)
- [Truck1 Scraper](https://apify.com/rastriq/truck1-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/rastriq/rockanddirt-scraper/changelog.md

# Actor input Schema

## `data_freshness` (type: `string`):

Choose <b>Preloaded</b> for instant access to our monthly snapshot (same price, much faster). Choose <b>Live</b> for fresh, just-scraped data. Both modes cost $1.90 per 1,000 results.

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

List of portal URLs to scrape directly. The actor extracts make/category/type from URL params and queries the Algolia API. Only works in Live mode. Valid domains: www.rockanddirt.com.

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

Type of listings to collect. Select <b>All types</b> to scrape the full catalog across every section.

## `make` (type: `string`):

<b>Filter by brand — e.g.</b> Caterpillar, John Deere, Komatsu. Leave blank for all brands.

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

<b>Filter by equipment category — e.g.</b> Excavators, Dozers, Loaders. Leave blank for all categories.

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

How to sort the results.

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

Maximum number of listings to collect. 0 = unlimited.

## `usePartitioning` (type: `boolean`):

When enabled and maxItems > 900, automatically splits the query by manufacturer to bypass Algolia's 1,000-result ceiling. Only applies to single-type filtered runs (not **ALL**).

## `maxConcurrent` (type: `integer`):

Number of cells to scrape in parallel during full-catalog runs.

## `outputSchema` (type: `string`):

Select <b>ftp28</b> to output canonical Spanish field names required for FTP-28 pipeline integration.

## `_admin_snapshot` (type: `boolean`):

Internal: write to Named Dataset instead of default. Requires IS_AUTHOR_RUN=1 env var.

## `skipItems` (type: `integer`):

Resume a partial download: skip the first N records of the snapshot and return only what follows. Skipped records are never emitted, so they are not charged. Use it when a previous run was cut short — set this to the number of records you already received.

## Actor input object example

```json
{
  "data_freshness": "live",
  "startUrls": [],
  "listingType": "Equipment",
  "make": "Caterpillar",
  "category": "Excavators",
  "sort": "relevance",
  "maxItems": 100,
  "usePartitioning": true,
  "maxConcurrent": 10,
  "outputSchema": "ftp28",
  "_admin_snapshot": false,
  "skipItems": 0
}
```

# Actor output Schema

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

No description

# 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 = {
    "data_freshness": "live",
    "startUrls": [],
    "listingType": "Equipment",
    "maxItems": 10,
    "outputSchema": "ftp28"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rastriq/rockanddirt-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 = {
    "data_freshness": "live",
    "startUrls": [],
    "listingType": "Equipment",
    "maxItems": 10,
    "outputSchema": "ftp28",
}

# Run the Actor and wait for it to finish
run = client.actor("rastriq/rockanddirt-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 '{
  "data_freshness": "live",
  "startUrls": [],
  "listingType": "Equipment",
  "maxItems": 10,
  "outputSchema": "ftp28"
}' |
apify call rastriq/rockanddirt-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rastriq/rockanddirt-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/H9GIGakx9HUKSYNko/builds/vHmrrhwTyKLScXud5/openapi.json
