{
  "openapi": "3.0.1",
  "info": {
    "title": "Washington DNR Timber Sales Scraper",
    "description": "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.",
    "version": "1.0",
    "x-build-id": "isfXFT13Sui9egZkS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mdcurt~wa-dnr-timber-sales/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mdcurt-wa-dnr-timber-sales",
        "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/mdcurt~wa-dnr-timber-sales/runs": {
      "post": {
        "operationId": "runs-sync-mdcurt-wa-dnr-timber-sales",
        "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/mdcurt~wa-dnr-timber-sales/run-sync": {
      "post": {
        "operationId": "run-sync-mdcurt-wa-dnr-timber-sales",
        "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",
        "required": [
          "listings"
        ],
        "properties": {
          "listings": {
            "title": "Listings to scrape",
            "uniqueItems": true,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "enum": [
                "upcoming",
                "previous",
                "unsold",
                "gna-results"
              ],
              "enumTitles": [
                "Upcoming timber auctions",
                "Previous timber auctions (last 12 months)",
                "Unsold sales at minimum value",
                "Good Neighbor Authority auction results"
              ]
            },
            "default": [
              "upcoming"
            ]
          },
          "saleTypes": {
            "title": "Sale types",
            "uniqueItems": true,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "enum": [
                "board",
                "region",
                "federal",
                "other"
              ],
              "enumTitles": [
                "Board sales",
                "Region sales",
                "Federal (GNA) sales",
                "Other sales"
              ]
            },
            "default": []
          },
          "regions": {
            "title": "DNR regions",
            "type": "array",
            "description": "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.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Keep only sales in these Washington counties (case-insensitive, e.g. `Clallam`, `Lewis`). Leave empty to keep all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "auctionDateFrom": {
            "title": "Auction date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep only sales with an auction date on or after this day (YYYY-MM-DD)."
          },
          "auctionDateTo": {
            "title": "Auction date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep only sales with an auction date on or before this day (YYYY-MM-DD)."
          },
          "minVolumeMbf": {
            "title": "Minimum volume (MBF)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only sales with at least this many thousand board feet. Leave empty for no floor."
          },
          "minValueUsd": {
            "title": "Minimum value (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only sales whose minimum (appraised) value is at least this many US dollars. Leave empty for no floor."
          },
          "certifiedOnly": {
            "title": "Certified sales only",
            "type": "boolean",
            "description": "Keep only sales marked FSC or SFI certified.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many records have been saved (across all listings). Protects your pay-per-event budget.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "dnr.wa.gov is a public government site and normally needs no proxy. Enable Apify Proxy only if your runs get blocked.",
            "default": {
              "useApifyProxy": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}