canonical: https://jentic.com/apis/ptv.vic.gov.au/ptv-timetable-api---version-3

# Ptv Vic PTV Timetable API - Version 3

The PTV Timetable API provides direct access to Public Transport Victoria’s public transport timetable data. The API returns scheduled timetable, route and stop data for all metropolitan and regional train, tram and bus services in Victoria, including Night Network(Night Train and Night Tram data are included in metropolitan train and tram services data, respectively, whereas Night Bus is a separa. The API exposes 26 endpoints.

## For AI agents

Programmatically view departures for all routes from a stop, view departures for a specific route from a stop. Covers 26 operations.

## Scope

Does not handle payments, communications, or crm - use for maps and geolocation only.

## Capabilities

- View departures for all routes from a stop
- Get all disruption modes
- Access PTV Timetable API - Version 3 resources via REST API

## Use cases

### Maps and Geolocation Operations

Use the PTV Timetable API - Version 3 to perform maps geolocation operations programmatically. The API provides 26 endpoints covering core functionality including view departures for all routes from a stop, view departures for a specific route from a stop, view directions that a route travels in.

Example prompt: Call GET `/v3/departures/route_type/{route_type}/stop/{stop_id}` to view departures for all routes from a stop

### Automated Departures Management

Automate departures operations by combining multiple PTV Timetable API - Version 3 endpoints. Agents can view departures for a specific route from a stop and then view directions that a route travels in in a single workflow.

Example prompt: Call GET `/v3/departures/route_type/{route_type}/stop/{stop_id}/route/{route_id}` to view departures for a specific route from a stop, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call PTV Timetable API - Version 3 endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle none tokens manually.

Example prompt: Search Jentic for 'view departures for all routes from a stop', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v3/departures/route_type/{route_type}/stop/{stop_id}` | View departures for all routes from a stop |
| GET | `/v3/departures/route_type/{route_type}/stop/{stop_id}/route/{route_id}` | View departures for a specific route from a stop |
| GET | `/v3/directions/route/{route_id}` | View directions that a route travels in |
| GET | `/v3/directions/{direction_id}` | View all routes for a direction of travel |
| GET | `/v3/directions/{direction_id}/route_type/{route_type}` | View all routes of a particular type for a direction of travel |
| GET | `/v3/disruptions` | View all disruptions for all route types |
| GET | `/v3/disruptions/modes` | Get all disruption modes |
| GET | `/v3/disruptions/route/{route_id}` | View all disruptions for a particular route |

## Key resources

- **Departures** — Operations related to Departures
- **Directions** — Operations related to Directions
- **Disruptions** — Operations related to Disruptions
- **FareEstimate** — Operations related to FareEstimate
- **Outlets** — Operations related to Outlets

## Why Jentic

- **Setup:** Wiring the PTV Timetable API by hand means building the request signature the endpoints expect and threading route_type and stop_id through each call yourself. Through Jentic you install once, import the PTV Timetable API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** The PTV Timetable API is read-only, with the stop and route ids in the URL path (`/departures/route_type/{route_type}/stop/{stop_id}`), so you limit the agent to the operations it needs, such as reading departures or disruptions. Every operation in this spec is a lookup, and you decide which ones the agent may call.
- **Credential handling:** Your PTV Timetable API credential 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 'view departures from a stop' or 'list current disruptions', and Jentic returns the matching PTV operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Here** — Alternative maps geolocation API
- **Tomtom** — Alternative maps geolocation API
- **Googleapis** — Complementary maps geolocation API

## FAQ

### What authentication does the PTV Timetable API - Version 3 use?

The PTV Timetable API - Version 3 uses no authentication. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I view departures for all routes from a stop with the PTV Timetable API - Version 3?

Yes. Use the GET `/v3/departures/route_type/{route_type}/stop/{stop_id}` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the PTV Timetable API - Version 3?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I view departures for all routes from a stop through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'view departures for all routes from a stop'. Jentic returns the matching PTV Timetable API - Version 3 operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the PTV Timetable API - Version 3 have?

The PTV Timetable API - Version 3 exposes 26 endpoints covering departures, directions, disruptions operations.

### Can I limit what my agent is allowed to do with the PTV Timetable API?

Yes. Because you run Jentic One yourself, your own rules decide which PTV Timetable operations and credentials the agent may use. Every endpoint in this API is a read-only lookup with the route type and stop or route id in the URL path, so you can grant the agent only the calls it needs, such as reading departures from a stop or listing current disruptions, and withhold the rest. Any operation you do not allow stays off limits to the agent.
