Dataspryva

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.

FieldTypeRequiredDescription
modestringrequiredWhat to fetch from wta.org.
searchQuerystringoptionalFree-text search of WTA hike descriptions (modes searchTrails, searchTripReports).
nameQuerystringoptionalMatch the hike name only (modes searchTrails, getTripReports, searchTripReports).
regionstringoptionalWashington region. Choose All Washington to search statewide (modes searchTrails, getTripReports, searchTripReports).
subregionstringoptionalOptional sub-region. Selecting one also selects its parent region.
featuresarrayoptionalRequire all selected features (mode searchTrails). Empty = no feature filter.
dogPolicystringoptionalFilter by dog access (mode searchTrails).
kidFriendlybooleanoptionalOnly kid-friendly trails (mode searchTrails).
wheelchairFriendlybooleanoptionalOnly wheelchair-friendly trails (mode searchTrails).
minRatingnumberoptionalMinimum average community rating, 0–5 (mode searchTrails).
minVoteCountintegeroptionalMinimum number of rating votes (mode searchTrails; applied after the listing fetch).
minLengthMilesnumberoptionalOnly trails at least this long (mode searchTrails). Trails with unknown length are excluded.
maxLengthMilesnumberoptionalOnly trails at most this long (mode searchTrails). Trails with unknown length are excluded.
minElevationGainFeetintegeroptionalOnly trails with at least this gain (mode searchTrails). Unknown gain is excluded.
maxElevationGainFeetintegeroptionalOnly trails with at most this gain (mode searchTrails). Unknown gain is excluded.
maxHighPointFeetintegeroptionalOnly trails whose highest point is at most this elevation (mode searchTrails).
passesarrayoptionalKeep trails that require at least one selected pass (mode searchTrails). Empty = no pass filter.
reportRecencystringoptionalFilter by how recently a trail received a trip report (mode searchTrails).
sortBystringoptionalResult order (mode searchTrails).
latitudenumberoptionalCenter latitude for a radius search (mode searchTrails). Requires longitude and radiusMiles.
longitudenumberoptionalCenter longitude for a radius search (mode searchTrails). Requires latitude and radiusMiles.
radiusMilesnumberoptionalSearch radius in miles (mode searchTrails).
boundingBoxstringoptionalMap area as `south,west,north,east` (mode searchTrails). Takes priority over latitude/longitude/radius.
trailUrlsarrayoptionalWTA hike URLs, /go-hiking/hikes/<slug> paths, or bare slugs (modes getTrailDetails, getTripReports).
fetchDetailsbooleanoptionalAdd difficulty, description, parking pass, land manager, directions, alerts and trip-report count with one detail page per trail (modes searchTrails, getTripReports).
authorstringoptionalExact WTA author username (mode searchTripReports).
tripDateFromstringoptionalEarliest trip date, YYYY-MM-DD (mode searchTripReports).
tripDateTostringoptionalLatest trip date, YYYY-MM-DD (mode searchTripReports).
tripMonthstringoptionalTrip month across any year (mode searchTripReports).
hikeTypesarrayoptionalKeep reports matching any selected hike type (mode searchTripReports).
reportFeaturesarrayoptionalKeep reports matching any selected feature (mode searchTripReports).
reportHighlightsarrayoptionalKeep reports mentioning any selected highlight (mode searchTripReports).
trailConditionsarrayoptionalKeep reports matching any selected trail condition (mode searchTripReports).
roadConditionsarrayoptionalKeep reports matching any selected road condition (mode searchTripReports).
fetchReportDetailsbooleanoptionalOpen each report page for trail URL, hike type, trail/road/bug/snow conditions and full photo URLs (mode searchTripReports).
tripReportsPerTrailintegeroptionalRecent reports to include per trail (mode getTripReports).
includeReportTextbooleanoptionalAttach full text and tags to the recent reports (mode getTripReports; up to 5 per trail).
maxItemsintegeroptionalHard cap on emitted records.
proxyConfigurationobjectoptionalOptional 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.