Query live Auckland Transport (AT) public transport data — stops, departures, service alerts, vehicle positions, routes, and network status. Use when the task involves Auckland buses, trains, ferries, or real-time transit information.
Query live Auckland public transport data from the AT API through a CLI that is easy for agents to script and easy for humans to scan. Covers real-time departures, service alerts, stop search, nearby stops, vehicle tracking, and network status.
scripts/cli.ts with the narrowest subcommand that answers the task--json when another tool or agent needs machine-readable outputscripts/client.ts only when you need the raw typed fetch functionsRun with:
npx tsx skills/at-transport/scripts/cli.ts <command> [flags]
alerts [--limit N] [--json]Active service alerts and disruptions across the Auckland network.
JSON shape:
timestamptotal_activereturnedalerts[] with id, severity_level, cause, effect, header_text, description_text, active_period, informed_entityExamples:
npx tsx skills/at-transport/scripts/cli.ts alerts
npx tsx skills/at-transport/scripts/cli.ts alerts --limit 5
npx tsx skills/at-transport/scripts/cli.ts alerts --json
departures <stop_id> [--limit N] [--json]Real-time departures from a stop. Uses stop code (e.g. 11814) or full stop ID. Shows route, expected time, and delay. For parent stations, includes all child platform stops.
JSON shape:
stop with stop detailstotal_departuresreturneddepartures[] with route_id, route_short_name, route_type, trip_id, stop_id, stop_name, direction_id, scheduled_time, expected_time, delay_seconds, vehicle_id, vehicle_labelKey stop codes:
11814 — Britomart (bus terminal)11815 — Customs St/Britomart11895 — Britomart Queens Arcade31986 — Britomart Lower AlbertExamples:
npx tsx skills/at-transport/scripts/cli.ts departures 11814
npx tsx skills/at-transport/scripts/cli.ts departures 7155 --limit 5
npx tsx skills/at-transport/scripts/cli.ts departures 11814 --json
stops <query> [--limit N] [--json]Search stops by name, code, or ID. Returns matching stops with location and type info.
JSON shape:
querytotal_matchesreturnedstops[] with stop_id, stop_code, stop_name, stop_lat, stop_lon, location_type, parent_station, platform_codeExamples:
npx tsx skills/at-transport/scripts/cli.ts stops Britomart
npx tsx skills/at-transport/scripts/cli.ts stops Newmarket
npx tsx skills/at-transport/scripts/cli.ts stops 7155 --json
nearby <lat,lon> [--radius N] [--limit N] [--json]Find stops near a geographic location. Radius in meters, defaults to 500m.
JSON shape:
location with lat, lonradius_mtotal_nearbyreturnedstops[] with stop details plus distance_mExamples:
npx tsx skills/at-transport/scripts/cli.ts nearby --location=-36.844,174.768
npx tsx skills/at-transport/scripts/cli.ts nearby --location=-36.844,174.768 --radius 1000
npx tsx skills/at-transport/scripts/cli.ts nearby --location=-36.844,174.768 --json
route <route_id> [--json]Show details for a specific route. Use full route ID (e.g. STH-201).
JSON shape:
route_id, route_short_name, route_long_name, route_type, agency_id, route_colorExamples:
npx tsx skills/at-transport/scripts/cli.ts route STH-201
npx tsx skills/at-transport/scripts/cli.ts route 70-221 --json
vehicles [--route <route_id>] [--limit N] [--json]Live vehicle positions across the network, optionally filtered by route.
JSON shape:
timestampfilter_routetotal_vehiclesreturnedvehicles[] with vehicle_id, label, lat, lon, speed, bearing, route_id, trip_id, last_updateExamples:
npx tsx skills/at-transport/scripts/cli.ts vehicles
npx tsx skills/at-transport/scripts/cli.ts vehicles --route STH-201
npx tsx skills/at-transport/scripts/cli.ts vehicles --limit 10 --json
status [--json]Overall network status summary — active trips, vehicles, on-time %, delays, and alert counts.
JSON shape:
timestampalerts_countalerts_by_severityactive_tripsactive_vehiclesdelayed_tripsavg_delay_secondson_time_percentageExamples:
npx tsx skills/at-transport/scripts/cli.ts status
npx tsx skills/at-transport/scripts/cli.ts status --json
scripts/cli.tsscripts/client.tsscripts/smoke-test.tsAT_API_KEY, falls back to bundled key--json is intended for chaining into other tools or agent steps