canonical: https://jentic.com/apis/opendata.transport.nsw.gov.au/opendata-transport-nsw

# Opendata Transport Nsw Transport for NSW Open Data API

The Transport for NSW Open Data API provides real-time and scheduled public transport data for New South Wales, Australia. It plans trips between two locations, returns real-time departure information for a stop, searches for stops by name or coordinates, and serves GTFS static schedules and GTFS-realtime feeds for buses and Sydney Trains. Applications use it for journey planning and live departure boards.

## For AI agents

Plan trips, get real-time departures, and find stops across New South Wales public transport, plus GTFS static and realtime feeds for buses and Sydney Trains.

## Scope

Does not handle ticketing, fare payment, or vehicle booking. Use for New South Wales public transport trip planning and departure data only.

## Capabilities

- Plan a trip between two stops, points of interest, or coordinates
- Return real-time departure information for a stop or platform
- Search for stops by name or coordinates
- Download the GTFS static schedule for buses
- Stream GTFS-realtime feeds for buses and Sydney Trains

## Use cases

### AI Journey Planner Agent

An AI agent connected through Jentic answers travel questions by resolving place names to stops and planning a trip between them, so a user asking how to get from one suburb to another gets real journey options without the developer wiring the trip-planner parameters by hand. The agent runs the stop finder first, then the trip operation.

Example prompt: Find the stop ids for an origin and destination, then plan a trip between them and return the fastest option

### Live Departure Board

A display or assistant shows upcoming services by requesting real-time departure information for a chosen stop or platform. Combined with the stop finder, a user types a place name and the product returns the next buses, trains, or ferries leaving nearby.

Example prompt: Resolve a stop by name and return its next real-time departures with times and line names

### GTFS Data Pipeline

A transit-analytics tool ingests the GTFS static schedule for buses and the GTFS-realtime feeds for buses and Sydney Trains to track adherence and movement. The static schedule gives the planned timetable while the realtime feeds give live positions and updates for comparison.

Example prompt: Download the bus GTFS schedule and pull the Sydney Trains realtime feed to compare planned and actual service

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/tp/trip` | Plan a trip between two locations |
| GET | `/tp/departure_mon` | Get real-time departure information |
| GET | `/tp/stop_finder` | Search for stops by name or coordinates |
| GET | `/gtfs/schedule/buses` | Download the GTFS static schedule for buses |
| GET | `/gtfs/realtime/buses` | Get the GTFS-realtime feed for buses |
| GET | `/gtfs/realtime/sydneytrains` | Get the GTFS-realtime feed for Sydney Trains |

## Key resources

- **Trip Planner** — Journey options between an origin and destination
- **Departures** — Real-time departure information for a stop or platform
- **Stop Finder** — Resolve place names and coordinates to stops
- **GTFS Feeds** — GTFS static schedules and GTFS-realtime feeds for buses and Sydney Trains

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 66 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 93 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 50 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 75 / 100
- **View full report:** https://jentic.com/apis/opendata.transport.nsw.gov.au/opendata-transport-nsw/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the Transport for NSW API by hand means registering for a key, passing it in the Authorization header, and learning its trip, departure, and GTFS feed parameters yourself. Through Jentic you install once, import it from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The API is read-only, so a rule can keep your agent to just the trip-planning and departure operations and leave the bulk GTFS feeds out. You choose which operations it may call.
- **Credential handling:** Your Transport for NSW API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'plan a trip' or 'get the next departures', and Jentic returns the matching Transport for NSW operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Transit App API** — Multi-city public transport directions and real-time arrivals.
- **TomTom Routing API** — Road routing, travel times, and traffic-aware directions.
- **HERE Maps API** — Geocoding, maps, and places to resolve and display locations.

## FAQ

### What authentication does the Transport for NSW Open Data API use?

The Transport for NSW Open Data API authenticates with an API key passed in the Authorization header, per its OpenAPI spec; you register for the key on the Open Data developer portal. Through Jentic the key is held encrypted by your own Jentic One instance and injected at call time.

### Can I plan a trip with the Transport for NSW Open Data API?

Yes. The trip operation routes between an origin and destination given as a stop, point of interest, or coordinates and returns journey options. The stop finder resolves place names to stops first, and the departure operation gives real-time times for a chosen stop.

### What are the rate limits for the Transport for NSW Open Data API?

The OpenAPI spec does not define rate limits for the Transport for NSW Open Data API. Transport for NSW sets per-key limits on its Open Data portal, documented at https://opendata.transport.nsw.gov.au, so check there before polling feeds frequently.

### Can I limit what my agent is allowed to do with the Transport for NSW Open Data API?

Yes. Write a rule that allows only the trip-planning and departure operations, so the agent plans journeys and reads times while the bulk GTFS feed operations stay out unless you add them. The API is read-only, so there is no write path to expose, and every call is logged.

### How do I plan a trip with the Transport for NSW Open Data API through Jentic?

Search by intent in Jentic with a query like 'plan a public transport trip', add the Transport for NSW Open Data API from the Jentic API Directory, and your agent resolves the stops then plans the trip between them. To run it on your own infrastructure, install Jentic One from its GitHub repo.
