# Washington DNR Timber Sales Scraper (`mdcurt/wa-dnr-timber-sales`) Actor

Structured feed of Washington State DNR timber sale auctions: upcoming sales, previous auctions, unsold sales at minimum value, and Good Neighbor Authority results, with volume (MBF), minimum value, certification flags, region, county and packet PDF links.

- **URL**: https://apify.com/mdcurt/wa-dnr-timber-sales.md
- **Developed by:** [Matthew Curtis](https://apify.com/mdcurt) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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

## Washington DNR Timber Sales Scraper

Turns the Washington State Department of Natural Resources (DNR) timber-auction pages into clean, structured JSON you can filter, export, or poll on a schedule. One run gives you every sale currently listed as **upcoming**, every sale offered in the **previous** twelve months, every **unsold** sale available at minimum value, and the **Good Neighbor Authority** results table, each with auction date, county, DNR region, agreement number, FSC/SFI certification flags, volume (MBF), minimum appraised value, computed USD per MBF, and a direct link to the sale packet PDF.

DNR auctions state trust-land timber roughly once a month, by region. Loggers, sawmills, log exporters, timber brokers, forestry consultants and lenders watch these pages to plan bids and track stumpage prices. This Actor replaces re-reading the pages by hand (or copying tables into a spreadsheet) with a dataset you can pull into Sheets, a database, Slack alerts or an LLM pipeline.

All data comes from public pages on `dnr.wa.gov`. No login, no CAPTCHA, no proxy needed, no personal data collected.

### What you get

One record per sale row. Example (from the Upcoming Timber Auctions page):

```json
{
    "id": "upcoming:109824:q-flowery-trail:2026-10-27",
    "listing": "upcoming",
    "saleType": "board",
    "auctionDate": "2026-10-27",
    "auctionDateRaw": "10/27/2026",
    "county": "Stevens",
    "region": "NE",
    "regionName": "Northeast",
    "agreementNumber": "109824",
    "fscCertified": false,
    "sfiCertified": true,
    "saleName": "Q FLOWERY TRAIL",
    "packetUrl": "https://dnr.wa.gov/sites/default/files/2026-08/psl_ts_2610_qflowerytrail.pdf",
    "packetUpdated": null,
    "volumeMbf": 6576,
    "minimumValueUsd": 1306000,
    "valuePerMbfUsd": 198.6,
    "notes": null,
    "sourceUrl": "https://dnr.wa.gov/product-sales-and-leasing/timber-sales/timber-auction-packets/upcoming-timber-auctions",
    "scrapedAt": "2026-10-24T16:18:13.138Z"
}
```

Field notes:

| Field | Meaning |
|---|---|
| `id` | Stable key: `listing:agreementNumber:sale-name-slug:auctionDate`. Use it to diff runs. |
| `listing` | Which page the row came from: `upcoming`, `previous`, `unsold`, `gna-results`. |
| `saleType` | `board` (Board of Natural Resources approved, larger sales), `region` (region-manager approved), `federal` (Good Neighbor Authority sales on federal land), `other` (e.g. WDFW projects), or `unknown` if the page label could not be found. |
| `auctionDate` | ISO `YYYY-MM-DD`. `auctionDateRaw` keeps the original text. |
| `region` / `regionName` | DNR region code and name: NE Northeast, NW Northwest, OLY Olympic, PC Pacific Cascade, SE Southeast, SPS South Puget Sound. |
| `agreementNumber` | DNR agreement number as printed (may be a range like `109652-109661` for sort sales). |
| `fscCertified` / `sfiCertified` | `true` when the FSC / SFI column is marked. |
| `packetUrl` | Direct link to the sale packet PDF (maps, cruise data, contract terms). |
| `packetUpdated` | Date DNR flagged an update to the packet, if shown. |
| `volumeMbf` | Estimated volume in thousand board feet. `null` on the GNA results table, which has no volume column. |
| `minimumValueUsd` | Minimum (appraised) bid value in US dollars. |
| `valuePerMbfUsd` | `minimumValueUsd / volumeMbf`, rounded to cents — a quick stumpage comparison. |
| `notes` | DNR notes column, e.g. `Reoffer`. |

### Input

| Input | Type | Default | What it does |
|---|---|---|---|
| `listings` | array | `["upcoming"]` | Pages to scrape: `upcoming`, `previous`, `unsold`, `gna-results`. |
| `saleTypes` | array | all | Keep only `board`, `region`, `federal`, `other`. |
| `regions` | array | all | Keep only these DNR region codes (NE, NW, OLY, PC, SE, SPS). |
| `counties` | array | all | Keep only these counties (case-insensitive; multi-county sales such as `Grays Harbor, Thurston` match on either). |
| `auctionDateFrom` | date | – | Keep only auctions on/after this day. |
| `auctionDateTo` | date | – | Keep only auctions on/before this day. |
| `minVolumeMbf` | integer | – | Keep only sales with at least this volume. |
| `minValueUsd` | integer | – | Keep only sales with at least this minimum value. |
| `certifiedOnly` | boolean | `false` | Keep only FSC- or SFI-certified sales. |
| `maxItems` | integer | `500` | Stop after this many saved records (caps your spend). |
| `proxyConfiguration` | object | no proxy | Apify Proxy settings; not normally needed for a government site. |

Example — all Board sales in the Olympic and Pacific Cascade regions coming up, plus last year's history:

```json
{
    "listings": ["upcoming", "previous"],
    "saleTypes": ["board"],
    "regions": ["OLY", "PC"]
}
```

Example — large certified sales from 2026 only:

```json
{
    "listings": ["previous"],
    "certifiedOnly": true,
    "minVolumeMbf": 5000,
    "minValueUsd": 1000000,
    "auctionDateFrom": "2026-01-01",
    "auctionDateTo": "2026-12-31"
}
```

### Pricing

This Actor uses pay-per-event pricing. You pay a small flat fee when a run starts (`actor-start`) and a per-record fee for every sale row saved to the dataset (`timber-sale`). Rows removed by your filters or by `maxItems` are never charged. A typical "upcoming" run returns a few dozen rows; pulling all four listings returns roughly 100–250 rows, i.e. a couple of dollars at most, with no platform usage charges on top. Use `maxItems` as a hard budget cap.

### How it works

The Actor fetches up to four static HTML pages on `dnr.wa.gov` with Crawlee's `CheerioCrawler` (one page at a time, 3 retries, descriptive user agent). On each page it finds every table that has a `Sale Name` column, reads the `BOARD SALES` / `REGION SALES` / `FEDERAL SALES` / `OTHER SALES` label above the table, parses each row, deduplicates by `id`, applies your filters, and pushes the rows to the default dataset. A `SUMMARY` record in the key-value store reports counts.

### Limitations

- The page tables carry the summary data only. Acreage, species mix, haul distances and contract terms live inside the sale packet PDFs, which this Actor links to but does not parse.
- Monthly auction *results* (winning bidder and bid amounts for regular DNR sales) are published as PDFs on the results page and are not parsed in this version; the HTML Good Neighbor Authority results table is included.
- If DNR renames the table labels, rows are still returned with `saleType: "unknown"` rather than dropped. If DNR renames the `Sale Name` or `Auction Date` columns, a release of this Actor will be needed; open an issue and it will be fixed.
- The `unsold` page is often empty or has a single row; that is the real state of the page, not an error. One WDFW thinning sale lists its volume in tons rather than MBF (its `notes` say so).
- If none of the pages can be fetched at all, the run fails (non-zero exit) so schedules and monitors notice.

### Get alerted when records change

Pair this Actor with [Dataset Diff & Alert Monitor](https://apify.com/mdcurt/dataset-diff-monitor) to receive only the new, changed or removed records in Slack, Discord, Telegram or a webhook. Schedule the monitor, not this Actor: it runs this Actor for you, compares runs by `id`, and a run that finds nothing costs only the comparison. A weekly schedule tells you about every new sale and every change to a posted sale before the auction date. The sister Actor for Minnesota is [mn-dnr-timber-sales](https://apify.com/mdcurt/mn-dnr-timber-sales).

```json
{
  "sourceActorId": "mdcurt/wa-dnr-timber-sales",
  "sourceInput": {
    "listings": [
      "upcoming",
      "unsold"
    ]
  },
  "keyFields": [
    "id"
  ],
  "notifyOn": [
    "added",
    "changed"
  ],
  "labelField": "saleName",
  "urlField": "packetUrl",
  "slackWebhookUrl": "https://hooks.slack.com/services/…"
}
```

### Changelog

- **1.0.6** (2026-10-24) — README: alert recipe with Dataset Diff & Alert Monitor and link to the Minnesota sister Actor; publish.sh replaced by the generic listing-safe version (the old one is kept as publish.sh.v1).
- **1.0.5** (2026-10-24) — Added publish.sh / publish.json for one-command publishing from the owner's own CLI session.
- **1.0.4** (2026-10-24) — `ACTOR_TEST_PROXY_URL` env override for sandboxed test runs; pay_per_event.json now documents the built-in Apify events the Store listing actually uses.
- **1.0.3** (2026-10-24) — Added `.actor/output_schema.json` (required for Store publishing); Output tab now shows the dataset overview and the run SUMMARY.
- **1.0.2** (2026-10-24) — Charging now checks which pay-per-event events are configured in Console and only charges those, so the Actor works with either custom events (`actor-start`, `timber-sale`) or Apify's built-in `apify-actor-start` / `apify-default-dataset-item`.
- **1.0.1** (2026-10-24) — Live-tested against dnr.wa.gov (all five test inputs pass); county filter now matches multi-county sales; real upcoming page added as an offline regression fixture.
- **1.0.0** (2026-10-24) — Initial release: upcoming, previous, unsold and GNA-results listings; filters by sale type, region, county, date range, volume, value and certification; pay-per-event charging.

# Actor input Schema

## `listings` (type: `array`):

Which DNR pages to pull. `upcoming` = sales scheduled for the next auctions; `previous` = sales offered in the last ~12 months; `unsold` = sales that did not sell and are available at minimum value; `gna-results` = Good Neighbor Authority (federal land) auction results table.

## `saleTypes` (type: `array`):

Keep only these sale categories. Board sales are approved by the Board of Natural Resources (larger sales); Region sales are approved by region managers (smaller sales); Federal sales are Good Neighbor Authority sales on federal land; Other covers WDFW and similar projects. Leave empty to keep all.

## `regions` (type: `array`):

Keep only sales in these DNR region codes: NE (Northeast), NW (Northwest), OLY (Olympic), PC (Pacific Cascade), SE (Southeast), SPS (South Puget Sound). Leave empty to keep all.

## `counties` (type: `array`):

Keep only sales in these Washington counties (case-insensitive, e.g. `Clallam`, `Lewis`). Leave empty to keep all.

## `auctionDateFrom` (type: `string`):

Keep only sales with an auction date on or after this day (YYYY-MM-DD).

## `auctionDateTo` (type: `string`):

Keep only sales with an auction date on or before this day (YYYY-MM-DD).

## `minVolumeMbf` (type: `integer`):

Keep only sales with at least this many thousand board feet. Leave empty for no floor.

## `minValueUsd` (type: `integer`):

Keep only sales whose minimum (appraised) value is at least this many US dollars. Leave empty for no floor.

## `certifiedOnly` (type: `boolean`):

Keep only sales marked FSC or SFI certified.

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

Stop after this many records have been saved (across all listings). Protects your pay-per-event budget.

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

dnr.wa.gov is a public government site and normally needs no proxy. Enable Apify Proxy only if your runs get blocked.

## Actor input object example

```json
{
  "listings": [
    "upcoming"
  ],
  "saleTypes": [],
  "regions": [],
  "counties": [],
  "certifiedOnly": false,
  "maxItems": 500,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `timberSales` (type: `string`):

Dataset of sale records: listing, saleType, auctionDate, county, region, agreementNumber, FSC/SFI flags, saleName, packetUrl, volumeMbf, minimumValueUsd, valuePerMbfUsd, notes.

## `summary` (type: `string`):

JSON with savedCount, skippedByFilter, listings, maxItems, requestsFinished and requestsFailed for this run.

# 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 = {
    "listings": [
        "upcoming"
    ],
    "saleTypes": [],
    "regions": [],
    "counties": [],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mdcurt/wa-dnr-timber-sales").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 = {
    "listings": ["upcoming"],
    "saleTypes": [],
    "regions": [],
    "counties": [],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("mdcurt/wa-dnr-timber-sales").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 '{
  "listings": [
    "upcoming"
  ],
  "saleTypes": [],
  "regions": [],
  "counties": [],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call mdcurt/wa-dnr-timber-sales --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mdcurt/wa-dnr-timber-sales"
        }
    }
}
```

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/z4SOvMGbhE2fmVKIq/builds/isfXFT13Sui9egZkS/openapi.json
