# PTV Timetable API - Version 3 API

> PTV Timetable API - Version 3 API on Apizie: 26 endpoints (View departures for all routes from a stop, View departures for a specific route from a stop, View directions that a route travels in, View all routes for a direction of travel, …) returned as clean JSON through one API key. 26 endpoints are live now. Call it over REST at https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `transport:ptv-vic-gov-au`
- Category: Transport
- Status: live
- Source: http://ptv.vic.gov.au/digital
- Page: https://zieapi.vercel.app/api/transport/ptv-vic-gov-au
- OpenAPI: https://zieapi.vercel.app/api/transport/ptv-vic-gov-au/openapi.json

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…

## Endpoints

### View departures for all routes from a stop
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/departures-get-for-stop`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| stop_id | integer | yes | Identifier of stop; values returned by Stops API |
| platform_numbers | array | no | Filter by platform number at stop |
| direction_id | integer | no | Filter by identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id} |
| gtfs | boolean | no | Indicates that stop_id parameter will accept "GTFS stop_id" data |
| date_utc | string | no | Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time) |
| max_results | integer | no | Maximum number of results returned |
| include_cancelled | boolean | no | Indicates if cancelled services (if they exist) are returned (default = false) - metropolitan train only |
| look_backwards | boolean | no | Indicates if filtering runs (and their departures) to those that arrive at destination before date_utc (default = false). Requires… |
| expand | array | no | List of objects to be returned in full (i.e. expanded) - options include: All, Stop, Route, Run, Direction, Disruption, VehiclePosition,… |
| include_geopath | boolean | no | Indicates if the route geopath should be returned |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View departures for a specific route from a stop
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/departures-get-for-stop-and-route`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| stop_id | integer | yes | Identifier of stop; values returned by Stops API |
| route_id | string | yes | Identifier of route; values returned by Routes API - v3/routes |
| direction_id | integer | no | Filter by identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id} |
| gtfs | boolean | no | Indicates that stop_id parameter will accept "GTFS stop_id" data |
| date_utc | string | no | Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time) |
| max_results | integer | no | Maximum number of results returned |
| include_cancelled | boolean | no | Indicates if cancelled services (if they exist) are returned (default = false) - metropolitan train only |
| look_backwards | boolean | no | Indicates if filtering runs (and their departures) to those that arrive at destination before date_utc (default = false). Requires… |
| expand | array | no | List of objects to be returned in full (i.e. expanded) - options include: All, Stop, Route, Run, Direction, Disruption, VehiclePosition,… |
| include_geopath | boolean | no | Indicates if the route geopath should be returned |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View directions that a route travels in
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/directions-for-route`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Routes API - v3/routes |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all routes for a direction of travel
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/directions-for-direction`

| Parameter | Type | Required | Description |
|---|---|---|---|
| direction_id | integer | yes | Identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id} |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all routes of a particular type for a direction of travel
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/directions-for-direction-and-type`

| Parameter | Type | Required | Description |
|---|---|---|---|
| direction_id | integer | yes | Identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id} |
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all disruptions for all route types
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/disruptions-get-all-disruptions`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_types | array | no | Filter by route_type; values returned via RouteTypes API |
| disruption_modes | array | no | Filter by disruption_mode; values returned via v3/disruptions/modes API |
| disruption_status | string | no | Filter by status of disruption |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### Get all disruption modes
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/disruptions-get-disruption-modes`

| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all disruptions for a particular route
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/disruptions-get-disruptions-by-route`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Routes API - v3/routes |
| disruption_status | string | no | Filter by status of disruption |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all disruptions for a particular route and stop
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/disruptions-get-disruptions-by-route-and-stop`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Routes API - v3/routes |
| stop_id | integer | yes | Identifier of stop; values returned by Stops API - v3/stops |
| disruption_status | string | no | Filter by status of disruption |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all disruptions for a particular stop
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/disruptions-get-disruptions-by-stop`

| Parameter | Type | Required | Description |
|---|---|---|---|
| stop_id | integer | yes | Identifier of stop; values returned by Stops API - v3/stops |
| disruption_status | string | no | Filter by status of disruption |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View a specific disruption
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/disruptions-get-disruption-by-id`

| Parameter | Type | Required | Description |
|---|---|---|---|
| disruption_id | integer | yes | Identifier of disruption; values returned by Disruptions API - /v3/disruptions OR /v3/disruptions/route/{route_id} |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### Estimate a fare by zone
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/fare-estimate-get-fare-estimate-by-zone`

| Parameter | Type | Required | Description |
|---|---|---|---|
| minZone | integer | yes | Minimum Zone travelled through ie. 1 |
| maxZone | integer | yes | Maximum Zone travelled through id. 6 |
| journey_touch_on_utc | string | no | JourneyTouchOnUtc in format yyyy-M-d h:m (e.g 2016-5-31 16:53). |
| journey_touch_off_utc | string | no | JourneyTouchOffUtc in format yyyy-M-d h:m (e.g 2016-5-31 16:53). |
| is_journey_in_free_tram_zone | boolean | no |  |
| travelled_route_types | array | no |  |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### List all ticket outlets
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/outlets-get-all-outlets`

| Parameter | Type | Required | Description |
|---|---|---|---|
| max_results | integer | no | Maximum number of results returned (default = 30) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### List ticket outlets near a specific location
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/outlets-get-outlets-by-geolocation`

| Parameter | Type | Required | Description |
|---|---|---|---|
| latitude | number | yes | Geographic coordinate of latitude |
| longitude | number | yes | Geographic coordinate of longitude |
| max_distance | number | no | Filter by maximum distance (in metres) from location specified via latitude and longitude parameters (default = 300) |
| max_results | integer | no | Maximum number of results returned (default = 30) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View the stopping pattern for a specific trip/service run
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/patterns-get-pattern-by-run`

| Parameter | Type | Required | Description |
|---|---|---|---|
| run_ref | string | yes | The run_ref is the identifier of a run as returned by the departures/* and runs/* endpoints. WARNING, run_id is deprecated. Use run_ref… |
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| expand | array | yes | List of objects to be returned in full (i.e. expanded) - options include: All, Stop, Route, Run, Direction, Disruption, VehiclePosition,… |
| stop_id | integer | no | Filter by stop_id; values returned by Stops API |
| date_utc | string | no | Filter by the date and time of the request (ISO 8601 UTC format) |
| include_skipped_stops | boolean | no | Include any skipped stops in a stopping pattern. Defaults to false. |
| include_geopath | boolean | no | Indicates if geopath data will be returned (default = false) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all route types and their names
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/route-types-get-route-types`

| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View route names and numbers for all routes
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/routes-one-or-more-routes`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_types | array | no | Filter by route_type; values returned via RouteTypes API |
| route_name | string | no | Filter by name of route (accepts partial route name matches) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View route name and number for specific route ID
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/routes-route-from-id`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Departures, Directions and Disruptions APIs |
| include_geopath | boolean | no | Indicates kif geopath data will be returned (default = false) |
| geopath_utc | string | no | Filter geopaths by date (ISO 8601 UTC format) (default = current date) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all trip/service runs for a specific route ID
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/runs-for-route`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Routes API - v3/routes. |
| expand | array | no | List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None. |
| date_utc | string | no | Date of the request. (optional - defaults to now) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all trip/service runs for a specific route ID and route type
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/runs-for-route-and-route-type`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Routes API - v3/routes. |
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| expand | array | yes | List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is All. |
| date_utc | string | no | Date of the request. (optional - defaults to now) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all trip/service runs for a specific run_ref
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/runs-for-run`

| Parameter | Type | Required | Description |
|---|---|---|---|
| run_ref | string | yes | The run_ref is the identifier of a run as returned by the departures/* and runs/* endpoints. WARNING, run_id is deprecated. Use run_ref… |
| expand | array | yes | List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None. |
| date_utc | string | no | Date of the request. (optional - defaults to now) |
| include_geopath | boolean | no | Indicates if geopath data will be returned (default = false) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View the trip/service run for a specific run_ref and route type
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/runs-for-run-and-route-type`

| Parameter | Type | Required | Description |
|---|---|---|---|
| run_ref | string | yes | The run_ref is the identifier of a run as returned by the departures/* and runs/* endpoints. WARNING, run_id is deprecated. Use run_ref… |
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| expand | array | yes | List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None. |
| date_utc | string | no | Date of the request. (optional - defaults to now) |
| include_geopath | boolean | no | Indicates if geopath data will be returned (default = false) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View stops, routes and myki ticket outlets that match the search term
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/search-search`

| Parameter | Type | Required | Description |
|---|---|---|---|
| search_term | string | yes | Search text (note: if search text is numeric and/or less than 3 characters, the API will only return routes) |
| route_types | array | no | Filter by route_type; values returned via RouteTypes API (note: stops and routes are ordered by route_types specified) |
| latitude | number | no | Filter by geographic coordinate of latitude |
| longitude | number | no | Filter by geographic coordinate of longitude |
| max_distance | number | no | Filter by maximum distance (in metres) from location specified via latitude and longitude parameters |
| include_addresses | boolean | no | Placeholder for future development; currently unavailable |
| include_outlets | boolean | no | Indicates if outlets will be returned in response (default = true) |
| match_stop_by_suburb | boolean | no | Indicates whether to find stops by suburbs in the search term (default = true) |
| match_route_by_suburb | boolean | no | Indicates whether to find routes by suburbs in the search term (default = true) |
| match_stop_by_gtfs_stop_id | boolean | no | Indicates whether to search for stops according to a metlink stop ID (default = false) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all stops near a specific location
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/stops-stops-by-geolocation`

| Parameter | Type | Required | Description |
|---|---|---|---|
| latitude | number | yes | Geographic coordinate of latitude |
| longitude | number | yes | Geographic coordinate of longitude |
| route_types | array | no | Filter by route_type; values returned via RouteTypes API |
| max_results | integer | no | Maximum number of results returned (default = 30) |
| max_distance | number | no | Filter by maximum distance (in metres) from location specified via latitude and longitude parameters (default = 300) |
| stop_disruptions | boolean | no | Indicates if stop disruption information will be returned (default = false) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View all stops on a specific route
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/stops-stops-for-route`

| Parameter | Type | Required | Description |
|---|---|---|---|
| route_id | integer | yes | Identifier of route; values returned by Routes API - v3/routes |
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| direction_id | integer | no | An optional direction; values returned by Directions API. When this is set, stop sequence information is returned in the response. |
| stop_disruptions | boolean | no | Indicates if stop disruption information will be returned (default = false) |
| include_geopath | boolean | no | Indicates if geopath data will be returned (default = false) |
| geopath_utc | string | no | Filter geopaths by date (ISO 8601 UTC format) (default = current date) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

### View facilities at a specific stop (Metro and V/Line stations only)
`GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/stops-stop-details`

| Parameter | Type | Required | Description |
|---|---|---|---|
| stop_id | integer | yes | Identifier of stop; values returned by Stops API |
| route_type | integer | yes | Number identifying transport mode; values returned via RouteTypes API |
| stop_location | boolean | no | Indicates if stop location information will be returned (default = false) |
| stop_amenities | boolean | no | Indicates if stop amenity information will be returned (default = false) |
| stop_accessibility | boolean | no | Indicates if stop accessibility information will be returned (default = false) |
| stop_contact | boolean | no | Indicates if stop contact information will be returned (default = false) |
| stop_ticket | boolean | no | Indicates if stop ticket information will be returned (default = false) |
| gtfs | boolean | no | Incdicates whether the stop_id is a GTFS ID or not |
| stop_staffing | boolean | no | Indicates if stop staffing information will be returned (default = false) |
| stop_disruptions | boolean | no | Indicates if stop disruption information will be returned (default = false) |
| token | string | no | Please ignore |
| devid | string | no | Your developer id |
| signature | string | no | Authentication signature for request |

## Example
```
curl "https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/departures-get-for-stop" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the PTV Timetable API - Version 3 API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/transport:ptv-vic-gov-au/departures-get-for-stop with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the PTV Timetable API - Version 3 API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the PTV Timetable API - Version 3 API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key transport:ptv-vic-gov-au.

### What is the status of the PTV Timetable API - Version 3 API?
Live: works with just an Apizie key
