Use Washington Trails Association Hike & Trip Report Finder with Python
Find Washington State hikes by region or keyword with length, elevation, rating and feature data, pull full trail stats and coordinates by hike URL, or check recent trip report activity.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"dogPolicy": "any",
"features": [],
"fetchDetails": false,
"fetchReportDetails": false,
"hikeTypes": [],
"includeReportText": false,
"kidFriendly": false,
"maxItems": 3,
"mode": "searchTrails",
"passes": [],
"region": "Snoqualmie Region",
"reportFeatures": [],
"reportHighlights": [],
"reportRecency": "anytime",
"roadConditions": [],
"sortBy": "recently-updated",
"subregion": "all",
"trailConditions": [],
"trailUrls": [],
"tripMonth": "all",
"tripReportsPerTrail": 3,
"wheelchairFriendly": false
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | required | What to fetch from wta.org. |
searchQuery | string | optional | Free-text search of WTA hike descriptions (modes searchTrails, searchTripReports). |
nameQuery | string | optional | Match the hike name only (modes searchTrails, getTripReports, searchTripReports). |
region | string | optional | Washington region. Choose All Washington to search statewide (modes searchTrails, getTripReports, searchTripReports). |
subregion | string | optional | Optional sub-region. Selecting one also selects its parent region. |
features | array | optional | Require all selected features (mode searchTrails). Empty = no feature filter. |
dogPolicy | string | optional | Filter by dog access (mode searchTrails). |
kidFriendly | boolean | optional | Only kid-friendly trails (mode searchTrails). |
wheelchairFriendly | boolean | optional | Only wheelchair-friendly trails (mode searchTrails). |
minRating | number | optional | Minimum average community rating, 0–5 (mode searchTrails). |
minVoteCount | integer | optional | Minimum number of rating votes (mode searchTrails; applied after the listing fetch). |
minLengthMiles | number | optional | Only trails at least this long (mode searchTrails). Trails with unknown length are excluded. |
maxLengthMiles | number | optional | Only trails at most this long (mode searchTrails). Trails with unknown length are excluded. |
minElevationGainFeet | integer | optional | Only trails with at least this gain (mode searchTrails). Unknown gain is excluded. |
maxElevationGainFeet | integer | optional | Only trails with at most this gain (mode searchTrails). Unknown gain is excluded. |
maxHighPointFeet | integer | optional | Only trails whose highest point is at most this elevation (mode searchTrails). |
passes | array | optional | Keep trails that require at least one selected pass (mode searchTrails). Empty = no pass filter. |
reportRecency | string | optional | Filter by how recently a trail received a trip report (mode searchTrails). |
sortBy | string | optional | Result order (mode searchTrails). |
latitude | number | optional | Center latitude for a radius search (mode searchTrails). Requires longitude and radiusMiles. |
longitude | number | optional | Center longitude for a radius search (mode searchTrails). Requires latitude and radiusMiles. |
radiusMiles | number | optional | Search radius in miles (mode searchTrails). |
boundingBox | string | optional | Map area as `south,west,north,east` (mode searchTrails). Takes priority over latitude/longitude/radius. |
trailUrls | array | optional | WTA hike URLs, /go-hiking/hikes/<slug> paths, or bare slugs (modes getTrailDetails, getTripReports). |
fetchDetails | boolean | optional | Add difficulty, description, parking pass, land manager, directions, alerts and trip-report count with one detail page per trail (modes searchTrails, getTripReports). |
author | string | optional | Exact WTA author username (mode searchTripReports). |
tripDateFrom | string | optional | Earliest trip date, YYYY-MM-DD (mode searchTripReports). |
tripDateTo | string | optional | Latest trip date, YYYY-MM-DD (mode searchTripReports). |
tripMonth | string | optional | Trip month across any year (mode searchTripReports). |
hikeTypes | array | optional | Keep reports matching any selected hike type (mode searchTripReports). |
reportFeatures | array | optional | Keep reports matching any selected feature (mode searchTripReports). |
reportHighlights | array | optional | Keep reports mentioning any selected highlight (mode searchTripReports). |
trailConditions | array | optional | Keep reports matching any selected trail condition (mode searchTripReports). |
roadConditions | array | optional | Keep reports matching any selected road condition (mode searchTripReports). |
fetchReportDetails | boolean | optional | Open each report page for trail URL, hike type, trail/road/bug/snow conditions and full photo URLs (mode searchTripReports). |
tripReportsPerTrail | integer | optional | Recent reports to include per trail (mode getTripReports). |
includeReportText | boolean | optional | Attach full text and tags to the recent reports (mode getTripReports; up to 5 per trail). |
maxItems | integer | optional | Hard cap on emitted records. |
proxyConfiguration | object | optional | Optional override. The actor works without any proxy. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/RjY0EHrnYV6l84yAf/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
Washington Trails Association hikes and trip reports with distance, elevation, difficulty, coordinates, access details and conditions.
Questions before you run
Which inputs are required?
The published required fields are mode
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build Mnfe02NPtoG0Bk2Br and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.