# AU Road Trip Planner: Rest Areas, Toilets, Fuel & EV by Route (`davidar/au-route-corridor`) Actor

Road trip planner for Australia: rest areas and toilets, fuel stops and gaps, EV charging, food, attractions and Big Things, camping, dump points, water, shops, hospitals and vets on any route, plus low bridges, level crossings, speed cameras, floodways and crash hotspots. By route km, all states.

- **URL**: https://apify.com/davidar/au-route-corridor.md
- **Developed by:** [David Roberts](https://apify.com/davidar) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 rest area or toilets

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

## AU Route Corridor — road trip planner: rest stops, toilets, fuel, EV charging and low bridges along any Australian route

Plan the stops on an Australian road trip, or check a caravan or truck route before you drive it: toilets and rest
stops for driver fatigue breaks, fuel stops and fuel gaps, EV charging for an EV road trip, caravan and camping stops,
dump points and drinking water, lunch stops (cafes, fast food, bakeries), attractions and Big Things worth a detour,
supermarkets, pharmacies, hospitals and vets on the way, plus the road itself — height
and weight limits (low bridges, overbridge clearances), level crossings, speed cameras, floodways and fords, and crash
hotspots (Queensland). Australia-wide, every state.

Give it a route across Australia and a list of **layers**, and get back every matching feature within reach of the
road, in order along the route, with the distance along the route, which side of the road it sits on, and the
attributes its source publishes:

| Layer                              | What                                                                                                                                               | Sources                                                                                                     |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `rest_areas`                       | Rest areas, service centres, truck bays, parks, public toilets — toilet type, water, shelter, tables, lighting, heavy-vehicle bays, Driver Reviver | QLD TMR, Transport for NSW, Vicmap (locations), Main Roads WA, TAS State Growth, ACT toilets, OpenStreetMap |
| `fuel`                             | Service stations: brand, fuels sold, 24 h, heavy-vehicle access                                                                                    | OpenStreetMap                                                                                               |
| `ev_charging`                      | EV chargers: network, sockets, capacity, fee                                                                                                       | OpenStreetMap                                                                                               |
| `camping`                          | Campsites and caravan parks: toilets, showers, water, power, dogs, fee                                                                             | OpenStreetMap                                                                                               |
| `water`, `dump_points`             | Drinking-water taps and water points; caravan dump points                                                                                          | OpenStreetMap, agency rest-area layers                                                                      |
| `supermarkets`, `pharmacies`       | Shops you will actually need                                                                                                                       | OpenStreetMap                                                                                               |
| `hospitals`, `vets`                | With emergency department / after-hours where tagged                                                                                               | OpenStreetMap                                                                                               |
| `food`                             | Restaurants, cafes, fast food, food courts, bakeries: brand, cuisine, opening hours, takeaway, drive-through, diets                                | OpenStreetMap                                                                                               |
| `attractions`                      | Named attractions, museums, lookouts, galleries, zoos, monuments, telescopes, Big Things; notable ones up to 10 km off the road                    | OpenStreetMap                                                                                               |
| `rail_crossings`                   | Level crossings: barriers, lights, bells                                                                                                           | Main Roads WA, OpenStreetMap                                                                                |
| `speed_cameras`, `traffic_cameras` | Fixed speed cameras; road-authority live traffic cameras                                                                                           | OpenStreetMap; QLD TMR                                                                                      |
| `clearances`                       | Structure height limits and weight limits — for caravans and trucks                                                                                | QLD TMR structure clearance, Main Roads WA structures, OpenStreetMap maxheight/maxweight                    |
| `floodways`                        | Floodways, fords and flood-prone sections                                                                                                          | Main Roads WA, OpenStreetMap                                                                                |
| `crashes`                          | Crash density: counts by severity per 10 km bin                                                                                                    | QLD TMR crash layers                                                                                        |

Plus, for the layers where it matters, **the gaps**: every stretch of the route with no toilet, no fuel or no charger
for `gapKm` (default 100 km). It started as a toilet-stop planner for a Brisbane → Melbourne move with dogs and a
caravan, whose hand-made version found a 128 km run on Goldfields Way with no toilet at all. Now the same corridor
matching serves every layer above.

### What you get

One dataset row per **feature** (not per kilometre), ordered by layer then `routeKm`:

```json
{
    "layer": "rest_areas",
    "kind": "rest_area",
    "routeKm": 532.117,
    "side": "left",
    "distanceFromRouteM": 38,
    "name": "Tookey Creek Rest Area",
    "named": true,
    "state": "NSW",
    "lat": -29.9,
    "lng": 149.75,
    "attributes": {
        "toilet": { "present": true, "type": null, "accessible": false },
        "shelter": true,
        "table": true,
        "lighting": true,
        "water": null,
        "bbq": false,
        "bins": true,
        "dumpPoint": null,
        "driverReviver": false,
        "fuel": false,
        "food": false,
        "spaces": { "light": 6, "heavy": 5 },
        "heavyVehicles": true,
        "access": "Both",
        "where": "Newell Highway — 48.2km South of Moree"
    },
    "source": "nsw_tfnsw_rest_areas",
    "alsoIn": [{ "sourceId": "osm", "ref": "node/1234567", "name": "Tookey Creek Rest Area" }]
}
```

`source` is the source's id; its name, URL, licence, attribution and vintage are in `OUTPUT.bySource[<id>].source`,
once per run rather than on every row. `alsoIn` (other sources that reported the same place) is present only when
there are any.

`attributes` is a typed block per layer (the full list is in the dataset schema's field description and in
`src/types.ts`): `fuel` has `brand`, `fuels`, `open24h`, `heavyVehicles`; `ev_charging` has `network`, `sockets`,
`capacity`, `maxKw`, `fee`; `camping` has `toilets`, `showers`, `drinkingWater`, `power`, `dogs`, `fee`; `clearances`
has `maxHeightM`, `maxWeightT`, `clearanceClass`, `structure`, `road`; `crashes` rows are **segments** with `fromKm`,
`toKm` and `counts` by severity (`fatal`, `hospitalisation`, `medicalTreatment`, `minorInjury`, `propertyDamage`),
`years` and `perKmPerYear`.

**Tri-state attributes.** `true` and `false` are what the source says; `null` means the source does not say. Never read
`null` as "no": OpenStreetMap rarely tags `toilets=no`, and Vicmap's layer has no amenity fields at all. With the default
`requireToilet: true`, only rest-area sites whose source says there **is** a toilet are emitted (service centres are
assumed to have one, flagged `extra.toiletAssumed`).

The `OUTPUT` record holds the summary — counts by layer, state and source, per-source status (`ok` / `unknown` /
`skipped`) with each source's licence and attribution, **`gaps`** per layer, `droppedByLimit` (rows left out by the
row limits), `retrievedAt`, the computed route when you gave place names, and warnings. The `GEOJSON` record is
a FeatureCollection (the route line, a Point per feature, a LineString per crash bin and per gap) for drawing your
own map.

### Use cases

- **Road trip stops.** Rest stops, toilets, fuel and food in route order with the km, so you can plan a break every two
  hours instead of guessing where the next one is.
- **Driver fatigue breaks.** `gaps` lists every stretch with no toilet stop longer than `gapKm` — set it to the
  distance you want between rest stops and read off the stretches that break the rule.
- **Fuel stops and fuel gaps.** Service stations, roadhouses and truck stops, and every stretch longer than `gapKm` with
  none — the runs where you fill up before you leave town.
- **EV road trip.** EV charging along the route, with network, sockets and kW where tagged, and the charger gaps.
- **Caravan and camping stops.** Campsites and caravan parks, free camps (`fee: false` where tagged), dump points and
  drinking water.
- **Truck route and caravan height check.** Height and weight limits on the road driven — low bridges, overbridge
  clearances, tunnels — with the maximum height in metres to compare against your own. Route with `profile: "truck"`.
- **Level crossings, speed cameras, floodways and fords** on the road itself, not the streets beside it.
- **Road safety.** Crash data binned per 10 km with counts by severity, to find crash hotspots (Queensland only).
- **Lunch stops.** `food` lists cafes, fast food, restaurants and bakeries in route order with brand, cuisine and
  opening hours where tagged — pick lunch in a town at the right time of day instead of at a toilet-only rest area.
  Service centres also say whether they sell food (see Reading the output). `OUTPUT.gaps.food` shows the long
  stretches with nothing.
- **Sightseeing on the way.** `attractions` lists museums, lookouts, galleries, monuments, telescopes and Australia's
  Big Things along the route. Notable ones (the Parkes Dish, the Big Merino, a museum with a Wikipedia article) count
  up to 10 km off the road; the rest within `bufferKm`.
- **Errands on the way.** Supermarkets, pharmacies, hospitals (emergency department where tagged), and vets for a trip with
  pets.
- **Maps and agents.** A GeoJSON record of the route, every stop and every gap for your own map, and a flat dataset an
  AI agent can read.

### Input

| Field               | Type    | Notes                                                                                                                                                                                                                                                                                                                                         |
| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `origin`            | string  | Start of a route to be computed for you: a place name or address (`"Goondiwindi QLD"`) or `"lat,lng"`. Needs `destination`.                                                                                                                                                                                                                   |
| `destination`       | string  | End of that route, same forms.                                                                                                                                                                                                                                                                                                                |
| `waypoints`         | array   | Optional stops in between, in order: place names or `"lat,lng"` strings. Up to 18. See Why waypoints.                                                                                                                                                                                                                                         |
| `profile`           | string  | Travel mode for origin/destination: `car` (default), `bike`, `foot`, `truck`, `motorcycle`, `scooter`, `bus`, `taxi`.                                                                                                                                                                                                                         |
| `polyline`          | string  | Encoded polyline of a route — Google Directions, OSRM, Mapbox, Valhalla, or davidar/openstreetmap-directions-api's `polyline6`. Wins over the rest.                                                                                                                                                                                           |
| `polylinePrecision` | 5 | 6  | 5 for Google and OSRM's default, 6 for Mapbox / Valhalla / OSRM `polyline6` / openstreetmap-directions-api. Default 5.                                                                                                                                                                                                                        |
| `coordinates`       | array   | Alternative to `polyline`: `[lat, lng]` pairs, latitude first like everywhere else. Wins over `origin`.                                                                                                                                                                                                                                       |
| `layers`            | array   | Which layers to report (table above). Default `["rest_areas"]`.                                                                                                                                                                                                                                                                               |
| `bufferKm`          | number  | Corridor half-width for site layers. Default 1.5 (highway rest areas and town services just off the road). Max 10. Road-feature layers are capped regardless: clearances and rail crossings 40 m, floodways and speed cameras 60 m, crashes 100 m, traffic cameras 300 m. Attractions with a Wikidata/Wikipedia entry reach 10 km regardless. |
| `requireToilet`     | boolean | Rest areas only. Default `true`: emit only sites whose source says there is a toilet. `false` = every rest area and truck bay.                                                                                                                                                                                                                |
| `gapKm`             | number  | Flag stretches of at least this many route-km with no toilet stop / fuel / charger. Default 100.                                                                                                                                                                                                                                              |
| `binKm`             | number  | Crash density only: bin length in route-km. Default 10.                                                                                                                                                                                                                                                                                       |
| `maxRowsPer10Km`    | integer | Thins towns: each place layer keeps its best rows (named, notable, nearest) up to this many per 10 km of route. Road features are never thinned; gaps use every row found; rows left out are not charged. Default 5; 0 = every row.                                                                                                           |
| `notableOnly`       | boolean | Attractions only: keep just the notable ones (a Wikipedia article, a Big Thing…). Default false.                                                                                                                                                                                                                                              |
| `maxRowsPerLayer`   | integer | Optional cap: at most this many rows per layer, spread along the route (each equal stretch keeps its best row: named, then notable, then nearest). Gaps still come from every row found. Rows left out are not charged; `OUTPUT.droppedByLimit` counts them.                                                                                  |
| `states`            | array   | Keep only features in these states (`QLD`, `NSW`, `VIC`, `SA`, `WA`, `TAS`, `NT`, `ACT`). Default: every state the route crosses.                                                                                                                                                                                                             |
| `sources`           | array   | `agency` (state road authorities), `osm` (bundled OpenStreetMap). Default both; matches are merged, agency first.                                                                                                                                                                                                                             |
| `concurrency`       | integer | Agency sources queried in parallel (1–8). Per-host request caps apply regardless (2 per agency server).                                                                                                                                                                                                                                       |

#### Route by name

```json
{
    "origin": "Goondiwindi QLD",
    "destination": "Dubbo NSW",
    "waypoints": ["Gilgandra NSW"],
    "layers": ["rest_areas", "fuel", "clearances"]
}
```

With `origin` and `destination` (and optional `waypoints` and `profile`), the Actor asks the **Routing & Directions API
actor ([davidar/openstreetmap-directions-api](https://apify.com/davidar/openstreetmap-directions-api))** for the route, run under your account, then
matches features to that line. Place names are geocoded within Australia; a town name resolves to the town centre. Use
`"lat,lng"` when the exact start matters.

**Why waypoints.** The router takes the shortest road, not the one you will drive. Goondiwindi → Dubbo unrouted leaves
the Newell Highway at Coonabarabran for the Mendooran back road; if you are driving the Newell via Gilgandra, say so
with `"waypoints": ["Gilgandra NSW"]` and the stops are the ones you will actually pass.

**What routing costs.** The routing actor's charges appear on *that* actor in your Apify billing, not on this one: one
`route_computed` ($0.003), one `geocoded_location` ($0.001) per place name (coordinates are free) and Apify's standard
actor-start event for a 512 MB run. **Free Apify plans** get its community-router tier: coordinates only, car only —
pass `"lat,lng"` origins and destinations, or a polyline. If the route can't be found, this run stops before querying
any source, charges nothing here, and the status message says why; `OUTPUT.route` holds the routing run id.

#### Bring your own route

```json
{
    "polyline": "<Google Directions overview_polyline.points>",
    "polylinePrecision": 5,
    "bufferKm": 2,
    "layers": ["camping", "water"]
}
```

Pass the directions polyline, not your own coarse samples: features are matched to the line, so a straight segment
between two towns misses everything the road bends past. A coarse line needs a bigger `bufferKm`.

### Sources and coverage

Only the states a route actually crosses are queried (the line is checked against ABS state boundaries).

| State | Agency layers (attributes are authoritative)                                                                                                                                              | Licence      | OpenStreetMap                        |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------ |
| QLD   | TMR "Roadside amenities" (toilet type, water, shelter, table, lighting, dump point, HV bays, Driver Reviver); TMR structure clearance, traffic cameras, crash layers                      | CC BY 3.0    | fills gaps                           |
| NSW   | Transport for NSW "Rest Areas" (869 sites: toilets, accessible toilet, shelter, tables, lighting, spaces, Driver Reviver, food/fuel)                                                      | CC BY 4.0    | fills gaps                           |
| VIC   | Vicmap Features of Interest "rest area" (location only — no amenity fields; the state publishes no amenity layer)                                                                         | CC BY 4.0    | **primary** for amenities            |
| WA    | Main Roads WA "Road Stopping Places" (1,672 state-road sites: toilet count, accessible toilet, shelter, shade, lighting, tables, bins, dump point); floodways; rail crossings; structures | CC BY 4.0    | fills gaps                           |
| TAS   | Department of State Growth "Roadside Stops" (81 state-owned sites, 2018 survey: toilet, shelter, BBQ, bins, tables)                                                                       | CC BY 3.0 AU | fills gaps; carries most TAS toilets |
| ACT   | ACT Government "Public Toilet Assets" (urban toilet blocks, active and public only)                                                                                                       | CC BY 4.0    | fills gaps                           |
| SA    | — (the Department for Infrastructure and Transport publishes only a 2018 download of 391 polygons, 7 with toilets)                                                                        |              | **only source**                      |
| NT    | — (nothing published as data)                                                                                                                                                             |              | **only source**                      |

OpenStreetMap covers every state and every layer from a **bundled extract** (the Geofabrik Australia file filtered at
build time; the source's `vintage` is the extract date, and the Actor makes no OSM requests at run time — the public
Overpass servers were too unreliable to build on). Agency and OSM features of the same layer within 150 m are merged:
the agency row is primary, OSM fills what it leaves `null`, and `alsoIn` keeps the OSM id. OSM is community-reported:
`toilets` is usually untagged (→ `null`), and a mapped rest area may be a truck parking bay. Rows say so through
`source` and `kind`.

Attribution: rows from Queensland TMR (CC BY 3.0), Transport for NSW and Vicmap (CC BY 4.0), Main Roads WA (CC BY 4.0),
the Tasmanian Department of State Growth (CC BY 3.0 AU) and the ACT Government (CC BY 4.0) carry each agency's credit in
`OUTPUT.bySource[<row source>].source.attribution`; OpenStreetMap data is © OpenStreetMap contributors, ODbL 1.0 — reproduce these when you publish
derived work.

### Pricing

Pay per row, three tiers, plus Apify's standard actor-start event:

| Event                | Rows                                                                                                                            | Price   |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `corridor_rest_area` | `rest_areas` — rest areas, service centres, parks, public toilets (agency layers merged with OSM)                               | $0.0005 |
| `corridor_site`      | every other place: fuel, EV charging, camping, water, dump points, supermarkets, pharmacies, hospitals, vets, food, attractions | $0.0002 |
| `corridor_feature`   | rail crossings, cameras, height/weight limits, floodways, one crash-density bin                                                 | $0.0002 |

Brisbane → Melbourne (1,700 km) with the default rest-areas layer is about 250 rows ≈ $0.12; with all 18 layers on,
about 1,500 rows ≈ $0.37 (measured 29 Sep 2026 with the default `maxRowsPer10Km: 5`; every row, `maxRowsPer10Km: 0`,
is about 5,800 — mostly Brisbane's and Melbourne's cafes and park toilets). Rest areas dropped by `requireToilet`, rows
left out by the row limits and rows outside `states` are not emitted and not charged;
a source that is unavailable charges nothing and the run still succeeds on the others (`OUTPUT.bySource[id].status =
"unknown"`, named in the status message). Routing by name adds the routing actor's own charges under its line (above).

### Reading the output

- **`routeKm`** is where the feature projects onto the route, so a park 800 m down a side street still has a km.
  **`distanceFromRouteM`** is how far off the line it is; `side` (`left`/`right` in the direction of travel, `on`
  within 25 m) tells you whether you cross the road.
- **`kind`** is per layer: rest areas are `rest_area` (signed stopping place), `service_centre` (fuel/food), `truck_bay`
  (heavy-vehicle only, incl. Queensland's "HV" sites which have facilities), `park`, `toilets` (a public toilet block on
  its own), `unknown`; clearances are `bridge`, `tunnel`, `sign`, `structure`; floodways are `floodway`, `ford`,
  `flood_prone`.
- **`attributes.toilet.type`**: `flush` (TMR "Water"), `composting` (TMR "Enviro", OSM pit/composting), `unknown` when a
  toilet is present but its type is not published, `null` when the source doesn't say.
- **`named: false`** rows are synthesised labels like "unnamed rest area (Goondiwindi Regional)" — TMR leaves many
  sites unnamed. **`near`** names the nearest named row of any layer within 150 m, so an unnamed tap reads as "in
  Cameron Park" and a strip can fold water and toilet rows into their host site.
- **Road features that cross the route are dropped**: a side street's height sign or a side-track ford 30 m from the
  highway is not on the road driven. OpenStreetMap ways carry a bearing; where it differs from the route's by more
  than 30° the feature is left out. Agency clearance points have no bearing and are kept as published.
- **`requireToilet` and camping.** A rest area without a toilet is dropped from `rest_areas` under the default, but
  OpenStreetMap often maps the same spot as a campsite, so it reappears in `camping` with `kind: rest_area` — a
  leg-stretch stop, not a caravan park. Set `requireToilet: false` to keep them in `rest_areas` instead.
- **Sparse OSM attributes.** `camping.dogs` is almost never tagged (null on most rows); fuel `open24h`/`openingHours`
  are tagged on roughly one station in ten. Null means untagged, not no.
- **`gaps`** include the run from the start to the first stop and from the last stop to the end. Rest-area gaps count
  only rows with a toilet.
- **OpenStreetMap toilet folding.** OSM often maps a rest area's toilet block as its own node or way. A standalone
  `amenity=toilets` within 150 m of an OSM rest area or service centre is folded into it (`toilet.present: true`,
  `extra.toiletsFrom` names the element) rather than emitted as a nameless `toilets` row beside it. A rest area tagged
  `toilets=no` never absorbs one; the disagreement stays visible as two rows.
- **Service centres' food and fuel.** OpenStreetMap maps a highway service centre as one area and its McDonald's and
  bowsers as separate points, and only Transport for NSW publishes food/fuel flags, so most service centres would say
  `food: null`. Where the source leaves `food` or `fuel` null and an OpenStreetMap food outlet or fuel station lies
  within 200 m, the row says `true` and names them in `extra.foodNearby` / `extra.fuelNearby` (e.g. Euroa Service
  Centre: "McDonald's; Oliver's; Evoke Coffee; Mustafa's Kebabs; KFC"). This works whether or not you asked for the `food` and
  `fuel` layers, and never overrides a source's own answer.
- **Attractions** are curated from OpenStreetMap so a town doesn't drown in plaques: every named tourist attraction,
  museum, lookout, gallery, zoo, aquarium, theme park and telescope; monuments, forts, castles, ruins and battlefields;
  other artworks, memorials and heritage items only when notable. `attributes.notable` = a Wikipedia article, a
  Wikidata entry on a museum / attraction / zoo / lookout or telescope, or a Big Thing's name (a bare Wikidata entry on
  a memorial is not enough — a town's war-memorial garden would otherwise be ten notable rows). Notable ones are listed
  up to 10 km off the road where they stand out (not in a city), so expect a few more rows than `bufferKm` suggests.
  The enclosures and rides inside a zoo or theme park are not listed; the park is one row. `category` carries the
  source's own value (`big_toy`, `monument`, `sculpture`…). A town's cluster of small sights (Glenrowan's Ned Kelly
  sites) is not notable unless one of them is — look for several rows at the same `routeKm`.
- **Food opening hours** are tagged on about one outlet in four and brands on about one in six (chains are well
  tagged, small-town cafes not). Null means untagged, not closed. `OUTPUT.openingHoursKnown` counts, per layer, the
  rows that have hours (e.g. `food: 85` of 478 on the Hume), so a planner knows how far "open at lunch" can be
  trusted. An outlet with no name says its cuisine where tagged (`unnamed fast food (fish and chips)`).
- Dataset `itemCount` in a run summary can lag by a second after the run finishes; read `totalItemCount` from the
  dataset endpoint. Fetch full items rather than projected `fields=` if you need `attributes`, `alsoIn` or `osm.tags`.

### Limits and honesty

- Corridor matching is geometric: a site 1.4 km away across a river with no bridge is still "within 1.5 km".
- Road features are matched to the road itself (40–100 m), so a bridge over a street the route doesn't use, or a
  crash on a side street, is not listed. A clearance on the route's own road is; whether you pass under or over it
  the data doesn't say.
- Agency layers are edited on their own schedules (each source's `vintage` in `OUTPUT.bySource` where published); the OSM bundle is a snapshot and
  the run warns when it is older than 90 days.
- Nothing here is inspected: a toilet that is present may be locked, a fuel station may have closed. Driver Reviver
  sites operate on holiday weekends only.
- Crash density is only as good as the state's published crash layer (QLD today) and says nothing about cause.
- The crash layer is the slow one: Queensland publishes every crash as a point (about 19,000 within 1.5 km of the
  360 km Queensland leg of Brisbane → Melbourne), fetched in ~100 paged requests over ~40 s before binning. The other
  layers answer in seconds; a 1,700 km run with six layers takes about two minutes.
- Height and weight limits list every structure with a published clearance, not only low ones — filter on
  `attributes.maxHeightM` against your own height. `clearanceClass` carries Queensland's own banding.
  What the layer is for: on the Newell through Dubbo the route runs along Bligh Street under the 4.9 m rail
  overbridge — two `clearances` rows, on the road driven, 4.9 m. A caravan over that height needs to know.
- Height and weight limits come from the structure layers where they exist; an unposted low bridge is not in any
  dataset. Check signs.

### FAQ

**Where are the toilets and rest stops along my route?** Run the default `rest_areas` layer. Each row is a rest area,
service centre or public toilet with a toilet, in route order with its km and side of the road.

**How far is it between fuel stops?** Add `fuel` to `layers`. `OUTPUT.gaps.fuel` lists every stretch of at least
`gapKm` with no service station.

**Where can we stop for lunch?** Add `food`. Rows carry brand, cuisine and opening hours where tagged; service
centres in `rest_areas` also say `food: true` with the outlets in `extra.foodNearby`.

**What's worth seeing on the way?** Add `attractions`. `attributes.notable` rows (a Wikipedia article, a Big Thing…)
are the well-known ones and are listed up to 10 km off the road.

**Are there low bridges on my caravan or truck route?** Add `clearances`. Filter `attributes.maxHeightM` against your
height, and read the limits in the section above.

**How do I use it from an AI agent (MCP), n8n, Make or my own code?** Through the Apify MCP server (`mcp.apify.com`) an
agent can find this Actor with `search-actors`, read this README and call it with the fields in the Input section.
n8n, Make and your own code call it through the Apify API or its integrations. Join rows to your trip on `layer` and
`routeKm`; read counts from the dataset (or `OUTPUT`), not the run summary.

**The results are too long for my agent to read.** Towns are already thinned by default (`maxRowsPer10Km: 5` — each
place layer keeps its best five rows per 10 km of route; the country and road features are untouched). For fewer:
`layers` only what the trip needs, `notableOnly: true` for sights, `maxRowsPerLayer` (e.g. 20) for a spread-out
shortlist — the gaps in `OUTPUT` are still computed from everything found. When reading the dataset, `omit=osm` drops
the raw OpenStreetMap tags (the Apify MCP `get-dataset-items` takes it too); `OUTPUT` alone (counts, gaps,
`openingHoursKnown`) answers "is there anywhere to stop" without any rows. Set `maxRowsPer10Km: 0` for every row.

**Can I use my own route from Google Maps?** Yes — the Directions API `overview_polyline.points` with `polylinePrecision: 5`.
The consumer Google Maps share link does not contain the geometry.

**Why does a site appear twice?** Two different sources more than 150 m apart (a large service centre mapped at the
fuel pumps by one and the toilet block by another), or two layers (a roadhouse is both a `rest_areas` service centre
and a `fuel` station; layers never merge with each other). Use `alsoIn`, `layer` and `distanceFromRouteM` to decide.

**Why is `toilet.present` null for a Victorian rest area?** Vicmap's layer records the location only. If OSM has
tagged the same site the merge fills it; otherwise the row is dropped under `requireToilet: true` and counted in
`OUTPUT.droppedNoToilet`. Set `requireToilet: false` to see them.

**Why no crash rows outside Queensland?** Other states publish crash data as bulk downloads or dashboards, not as a
queryable layer. They will be added as they become queryable.

# Actor input Schema

## `origin` (type: `string`):

Where the drive starts, when you want the route computed for you: a place name or address (`"Goondiwindi QLD"`) or `"lat,lng"` (`"-28.5332,150.3115"`). Needs `destination`. The route is computed by the Directions, Routing & Distance Matrix API actor (davidar/openstreetmap-directions-api), run under your account: its per-route ($0.003) and per-place-name ($0.001) charges appear on that actor in your billing, not on this one. Free Apify plans get its community-router tier: coordinates only, car only. `polyline` and `coordinates` take precedence when given.

## `destination` (type: `string`):

Where the drive ends: a place name or address, or `"lat,lng"`. Needs `origin`. Routed by the Directions, Routing & Distance Matrix API actor under your account — see Origin for what that costs.

## `waypoints` (type: `array`):

Towns or points the drive must pass through, in order, between origin and destination: place names (`"Gilgandra NSW"`) or `"lat,lng"` strings, one per entry. Up to 18. The router takes the shortest road, not necessarily the highway — add a waypoint to keep it on the road you will drive (e.g. the Newell Highway via Gilgandra).

## `profile` (type: `string`):

Vehicle the route is computed for, when you give origin/destination: `car` (default), `truck`, `bike`, `foot`, `motorcycle`, `scooter`, `bus` or `taxi`. The free-plan community router serves `car` only. Ignored for a polyline or coordinates.

## `polyline` (type: `string`):

Your own route, when you already have one: an encoded polyline string (Google Directions `overview_polyline.points`, OSRM, Mapbox, Valhalla, or the Directions, Routing & Distance Matrix API actor's `polyline6`). Set `polylinePrecision` to match. Takes precedence over `coordinates` and origin/destination.

## `polylinePrecision` (type: `integer`):

How `polyline` was encoded: 5 for Google Directions and OSRM's default; 6 for Mapbox Directions, Valhalla, OSRM `polyline6` and openstreetmap-directions-api. Default 5.

## `coordinates` (type: `array`):

Your own route as a list of points, when you have points instead of a polyline: `[lat, lng]` pairs, latitude first (the same order as origin/destination), e.g. `[[-28.5332, 150.3115], [-29.4651, 149.8275]]`. Use the full road geometry, not a few towns — features are matched to the line. A pair in GeoJSON `[lng, lat]` order is refused with a hint, never swapped for you. Ignored when `polyline` is set; takes precedence over origin/destination.

## `layers` (type: `array`):

What to find along the route, one or more of: `rest_areas` (rest stops, service centres and public toilets), `fuel` (service stations, roadhouses, truck stops), `ev_charging` (EV chargers), `camping` (campsites and caravan parks), `water` (drinking-water taps), `dump_points` (caravan dump points), `supermarkets`, `pharmacies`, `hospitals`, `vets`, `food` (restaurants, cafes, fast food, bakeries: brand, cuisine, opening hours), `attractions` (museums, lookouts, monuments, telescopes, Big Things; ones with a Wikidata/Wikipedia entry up to 10 km off the road), `rail_crossings` (level crossings), `speed_cameras`, `traffic_cameras` (QLD), `clearances` (height and weight limits: low bridges, overbridges, tunnels), `floodways` (floodways and fords), `crashes` (crash density per `binKm` bin, QLD). Default `["rest_areas"]`. Pricing: rest areas `corridor_rest_area` $0.0005/row; other places (incl. food and attractions) `corridor_site` $0.0002; road features and crash bins `corridor_feature` $0.0002.

## `bufferKm` (type: `number`):

How far off the road a place may be and still count: sites (rest areas, fuel, camping, shops, hospitals…) within this many km of the route line are reported. Default 1.5 km catches highway rest areas and town services just off the road; a straight-line or coarse route needs more. Max 10. Road features are capped regardless (clearances and rail crossings 40 m, floodways and speed cameras 60 m, crashes 100 m, traffic cameras 300 m).

## `requireToilet` (type: `boolean`):

Rest-areas layer only: whether to keep only stops with a toilet. When on (default), rest-area sites whose source says no toilet or doesn't say are not emitted and not charged (service centres are assumed to have one); OUTPUT.droppedNoToilet counts them. Turn off to see every rest area and truck bay.

## `gapKm` (type: `number`):

Longest acceptable stretch without a stop, for spacing driver-fatigue breaks and fuel stops: OUTPUT.gaps lists, per layer that supports it (rest areas with a toilet, fuel, EV charging), every stretch of at least this many route-km with no emitted row, including start → first stop and last stop → end. Default 100.

## `binKm` (type: `number`):

Crash-density layer only: length of each road segment crashes are counted over, in route-km. One row per bin with reported crashes counted by severity (fatal, hospitalisation, medical treatment, minor injury, property damage). Default 10.

## `notableOnly` (type: `boolean`):

Attractions layer only: keep just the well-known sights (attributes.notable: a Wikipedia article, a Wikidata entry on a museum or attraction, or a Big Thing) and leave out the small local ones. Fewer rows to pay for and to read. OUTPUT.droppedByLimit counts what was left out.

## `maxRowsPer10Km` (type: `integer`):

Thins towns and cities, where rows pile up and matter least: each place layer (rest areas, fuel, food, attractions, shops…) keeps at most this many rows in every 10 km of route — the best ones: named, then notable, then nearest the road. Country stretches are rarely touched, road features (low bridges, level crossings, floodways, cameras) never are, and gaps are computed from every row found. Rows left out are not charged; OUTPUT.droppedByLimit counts them. Default 5; 0 = every row.

## `maxRowsPerLayer` (type: `integer`):

Optional cap for a short answer (e.g. an AI agent reading the results): at most this many rows per layer, spread along the route — the route is split into that many equal stretches and each keeps its best row (named, then notable, then nearest the road). Gaps (OUTPUT.gaps) are still computed from every row found, so a cap never hides or invents a gap. Rows left out are not charged; OUTPUT.droppedByLimit counts them. Default: no cap.

## `states` (type: `array`):

Keep only features in these Australian states and territories. Default: every state the route crosses. Agency layers exist for QLD, NSW, VIC, WA, TAS and ACT; SA and NT come from OpenStreetMap only (see README).

## `sources` (type: `array`):

Which data to use. `agency` = the state road authorities' and agencies' own layers (attributes are authoritative; QLD, NSW, VIC, WA, TAS, ACT). `osm` = OpenStreetMap from a bundled Australia extract (national, community-reported; the only source in SA and NT and for most non-rest-area layers; `source.vintage` is the extract date). Features found in both within 150 m are merged, agency values first. Default both.

## `concurrency` (type: `integer`):

How many agency sources to query at once (1–8, default 4). Requests per host are capped regardless of this value (2 in flight per agency server). OpenStreetMap is bundled and makes no requests.

## Actor input object example

```json
{
  "origin": "-28.5332,150.3115",
  "destination": "-29.4651,149.8275",
  "profile": "car",
  "polylinePrecision": 5,
  "layers": [
    "rest_areas",
    "fuel",
    "camping",
    "clearances"
  ],
  "bufferKm": 1.5,
  "requireToilet": true,
  "gapKm": 100,
  "binKm": 10,
  "notableOnly": false,
  "maxRowsPer10Km": 5,
  "sources": [
    "agency",
    "osm"
  ],
  "concurrency": 4
}
```

# Actor output Schema

## `sites` (type: `string`):

One row per feature: layer, kind, routeKm (fromKm/toKm for crash bins), side, distanceFromRouteM, name/named, state, lat/lng, attributes (per-layer block), source, alsoIn, osm.

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

rows, charged {corridor\_site, corridor\_feature}, routeKm, bufferKm, gapKm, layers, byLayer, byState, bySource {status ok|unknown|skipped, layers, features, requests, error}, gaps {layer: \[{fromKm,toKm,km,from,to,before,after}]}, droppedNoToilet, openingHoursKnown {layer: rows with openingHours}, droppedByLimit {layer: rows left out by maxRowsPer10Km / notableOnly / maxRowsPerLayer}, retrievedAt, route (from the routing actor when origin/destination were given), geojson {record, features}, warnings.

## `geojson` (type: `string`):

FeatureCollection: the route LineString (kind 'route'), a Point per point row (kind 'site' or 'feature' with layer, name, routeKm, side, source and key attributes), a LineString per crash bin and per gap (kind 'gap' with layer).

# 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 = {
    "origin": "-28.5332,150.3115",
    "destination": "-29.4651,149.8275",
    "layers": [
        "rest_areas",
        "fuel",
        "camping",
        "clearances"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("davidar/au-route-corridor").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 = {
    "origin": "-28.5332,150.3115",
    "destination": "-29.4651,149.8275",
    "layers": [
        "rest_areas",
        "fuel",
        "camping",
        "clearances",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("davidar/au-route-corridor").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 '{
  "origin": "-28.5332,150.3115",
  "destination": "-29.4651,149.8275",
  "layers": [
    "rest_areas",
    "fuel",
    "camping",
    "clearances"
  ]
}' |
apify call davidar/au-route-corridor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,davidar/au-route-corridor"
        }
    }
}
```

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/OyNR8ezuRrEeD5zBV/builds/mFldlQm1DHTma0Lbn/openapi.json
