Public Transport Victoria Runs API
The Runs API from Public Transport Victoria — 4 operation(s) for runs.
The Runs API from Public Transport Victoria — 4 operation(s) for runs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/public-transport-victoria:public-transport-victoria-runs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Public Transport Victoria Runs API
version: v3
contact:
name: Public Transport Victoria
url: http://ptv.vic.gov.au/digital
license:
name: Creative Commons Attribution 4.0 International
url: https://creativecommons.org/licenses/by/4.0/
termsOfService: See http://ptv.vic.gov.au/ptv-timetable-api/
description: 'Operations tagged Runs across 2 of this provider''s published API definitions: public-transport-victoria-timetable-swagger-v3.json, public-transport-victoria-timetable-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://timetableapi.ptv.vic.gov.au
- url: http://timetableapi.ptv.vic.gov.au
tags:
- name: Runs
paths:
/v3/runs/route/{route_id}:
get:
tags:
- Runs
summary: View all trip/service runs for a specific route ID
operationId: Runs_ForRoute
parameters:
- name: route_id
in: path
description: Identifier of route; values returned by Routes API - v3/routes.
required: true
schema:
type: integer
format: int32
- name: expand
in: query
description: 'List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None.'
required: false
style: form
explode: true
schema:
type: array
items:
type: integer
format: int32
enum:
- 0
- 1
- 2
- 2147483647
- name: date_utc
in: query
description: Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time)
required: false
schema:
type: string
format: date-time
- name: include_advertised_interchange
in: query
description: 'Indicates whether data related to interchanges should be included in the response (default = false).
When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests'
required: false
schema:
type: boolean
- name: token
in: query
description: Please ignore
required: false
schema:
type: string
- name: devid
in: query
description: Your developer id
required: false
schema:
type: string
- name: signature
in: query
description: Authentication signature for request
required: false
schema:
type: string
responses:
'200':
description: All trip/service run details for the specified route ID.
content:
application/json:
schema:
$ref: '#/components/schemas/V3.RunsResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.RunsResponse'
'400':
description: Invalid Request
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
'403':
description: Access Denied
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
servers:
- url: https://timetableapi.ptv.vic.gov.au
- url: http://timetableapi.ptv.vic.gov.au
/v3/runs/route/{route_id}/route_type/{route_type}:
get:
tags:
- Runs
summary: View all trip/service runs for a specific route ID and route type
operationId: Runs_ForRouteAndRouteType
parameters:
- name: route_id
in: path
description: Identifier of route; values returned by Routes API - v3/routes.
required: true
schema:
type: integer
format: int32
- name: route_type
in: path
description: Number identifying transport mode; values returned via RouteTypes API
required: true
schema:
type: integer
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- name: expand
in: query
description: 'List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None.'
required: false
style: form
explode: true
schema:
type: array
items:
type: integer
format: int32
enum:
- 0
- 1
- 2
- 2147483647
- name: date_utc
in: query
description: Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time)
required: false
schema:
type: string
format: date-time
- name: include_advertised_interchange
in: query
description: 'Indicates whether data related to interchanges should be included in the response (default = false).
When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests'
required: false
schema:
type: boolean
- name: token
in: query
description: Please ignore
required: false
schema:
type: string
- name: devid
in: query
description: Your developer id
required: false
schema:
type: string
- name: signature
in: query
description: Authentication signature for request
required: false
schema:
type: string
responses:
'200':
description: All trip/service run details for the specified route ID and route type.
content:
application/json:
schema:
$ref: '#/components/schemas/V3.RunsResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.RunsResponse'
'400':
description: Invalid Request
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
'403':
description: Access Denied
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
servers:
- url: https://timetableapi.ptv.vic.gov.au
- url: http://timetableapi.ptv.vic.gov.au
/v3/runs/{run_ref}:
get:
tags:
- Runs
summary: View all trip/service runs for a specific run_ref
operationId: Runs_ForRun
parameters:
- name: run_ref
in: path
description: 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 instead.
required: true
schema:
type: string
- name: include_geopath
in: query
description: Indicates if geopath data will be returned (default = false)
required: false
schema:
type: boolean
- name: expand
in: query
description: 'List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None.'
required: false
style: form
explode: true
schema:
type: array
items:
type: integer
format: int32
enum:
- 0
- 1
- 2
- 2147483647
- name: date_utc
in: query
description: Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time)
required: false
schema:
type: string
format: date-time
- name: include_advertised_interchange
in: query
description: 'Indicates whether data related to interchanges should be included in the response (default = false).
When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests'
required: false
schema:
type: boolean
- name: token
in: query
description: Please ignore
required: false
schema:
type: string
- name: devid
in: query
description: Your developer id
required: false
schema:
type: string
- name: signature
in: query
description: Authentication signature for request
required: false
schema:
type: string
responses:
'200':
description: All trip/service run details for the specified run_ref.
content:
application/json:
schema:
$ref: '#/components/schemas/V3.RunsResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.RunsResponse'
'400':
description: Invalid Request
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
'403':
description: Access Denied
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
servers:
- url: https://timetableapi.ptv.vic.gov.au
- url: http://timetableapi.ptv.vic.gov.au
/v3/runs/{run_ref}/route_type/{route_type}:
get:
tags:
- Runs
summary: View the trip/service run for a specific run_ref and route type
operationId: Runs_ForRunAndRouteType
parameters:
- name: run_ref
in: path
description: 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 instead.
required: true
schema:
type: string
- name: route_type
in: path
description: Number identifying transport mode; values returned via RouteTypes API
required: true
schema:
type: integer
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- name: expand
in: query
description: 'List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None.'
required: false
style: form
explode: true
schema:
type: array
items:
type: integer
format: int32
enum:
- 0
- 1
- 2
- 2147483647
- name: date_utc
in: query
description: Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time)
required: false
schema:
type: string
format: date-time
- name: include_geopath
in: query
description: Indicates if geopath data will be returned (default = false)
required: false
schema:
type: boolean
- name: token
in: query
description: Please ignore
required: false
schema:
type: string
- name: devid
in: query
description: Your developer id
required: false
schema:
type: string
- name: signature
in: query
description: Authentication signature for request
required: false
schema:
type: string
responses:
'200':
description: The trip/service run details for the run_ref and route type specified.
content:
application/json:
schema:
$ref: '#/components/schemas/V3.RunResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.RunResponse'
'400':
description: Invalid Request
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
'403':
description: Access Denied
content:
application/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
text/json:
schema:
$ref: '#/components/schemas/V3.ErrorResponse'
servers:
- url: https://timetableapi.ptv.vic.gov.au
- url: http://timetableapi.ptv.vic.gov.au
components:
schemas:
V3.Status:
type: object
properties:
version:
description: API Version number
type: string
health:
format: int32
description: API system health status (0=offline, 1=online)
enum:
- 0
- 1
type: integer
V3.RunsResponse:
type: object
properties:
runs:
description: Individual trips/services of a route
type: array
items:
$ref: '#/components/schemas/V3.Run'
status:
$ref: '#/components/schemas/V3.Status'
description: API Status / Metadata
V3.RunResponse:
type: object
properties:
run:
$ref: '#/components/schemas/V3.Run'
description: Individual trip/service of a route
status:
$ref: '#/components/schemas/V3.Status'
description: API Status / Metadata
V3.Run:
type: object
properties:
run_id:
format: int32
description: Numeric trip/service run identifier. Defaults to -1 when run identifier is Alphanumeric
type: integer
readOnly: true
run_ref:
description: Alphanumeric trip/service run identifier
type: string
route_id:
format: int32
description: Route identifier
type: integer
route_type:
format: int32
description: Transport mode identifier
type: integer
final_stop_id:
format: int32
description: stop_id of final stop of run
type: integer
destination_name:
description: Name of destination of run
type: string
status:
description: Status of metropolitan train run; returns "scheduled" for other modes
type: string
direction_id:
format: int32
description: Direction of travel identifier
type: integer
run_sequence:
format: int32
description: Chronological sequence of the trip/service run on the route in direction. Order ascendingly by this field to get chronological order (earliest first) of runs with the same route_id and direction_id.
type: integer
express_stop_count:
format: int32
description: The number of remaining skipped/express stations for the run/service from a stop
type: integer
vehicle_position:
$ref: '#/components/schemas/V3.VehiclePosition'
description: Position of the trip/service run. Available for some Bus, Nightrider and Train runs. May be null.
vehicle_descriptor:
$ref: '#/components/schemas/V3.VehicleDescriptor'
description: Descriptor of the trip/service run. Only available for some runs. May be null.
geopath:
description: Geopath of the route
type: array
items:
type: object
interchange:
$ref: '#/components/schemas/V3.Interchange'
description: Connection link between two runs
run_note:
description: Additional descriptive text associated with the run
type: string
externalService:
format: int32
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
type: integer
V3.VehicleDescriptor:
type: object
properties:
operator:
description: 'Operator name of the vehicle such as "Metro Trains Melbourne", "Yarra Trams", "Ventura Bus Line", "CDC" or "Sita Bus Lines" . May be null/empty.
Only available for train, tram, v/line and some bus runs.'
type: string
id:
description: Operator identifier of the vehicle such as "26094". May be null/empty. Only available for some tram and bus runs.
type: string
low_floor:
description: Indicator if vehicle has a low floor. May be null. Only available for some tram runs.
type: boolean
air_conditioned:
description: Indicator if vehicle is air conditioned. May be null. Only available for some tram runs.
type: boolean
description:
description: 'Vehicle description such as "6 Car Comeng", "6 Car Xtrapolis", "3 Car Comeng", "6 Car Siemens", "3 Car Siemens". May be null/empty.
Only available for some metropolitan train runs.'
type: string
supplier:
description: Supplier of vehicle descriptor data.
type: string
length:
description: The length of the vehicle. Applies to CIS - Metro Trains
type: string
V3.ErrorResponse:
description: An error response
type: object
properties:
message:
description: Error message
type: string
status:
$ref: '#/components/schemas/V3.Status'
description: API Status / Metadata
V3.InterchangeRun:
description: Feeder / Distributor details
type: object
properties:
run_ref:
description: Run Identifier
type: string
route_id:
format: int32
description: Route identifier
type: integer
stop_id:
format: int32
description: Stop identifier
type: integer
advertised:
description: Indicates whether the interchange information is shown to end users
type: boolean
direction_id:
format: int32
description: Indicates whether the direction for this run
type: integer
destination_name:
description: Indicates the destination name
type: string
V3.Interchange:
description: When two runs connect
type: object
properties:
feeder:
$ref: '#/components/schemas/V3.InterchangeRun'
description: The run that a vehicle was previously on
distributor:
$ref: '#/components/schemas/V3.InterchangeRun'
description: The run that a vehicle will become
V3.VehiclePosition:
type: object
properties:
latitude:
format: double
description: 'Geographic coordinate of latitude of the vehicle when known. May be null.
Only available for some bus runs.'
type: number
longitude:
format: double
description: "Geographic coordinate of longitude of the vehicle when known. \nOnly available for some bus runs."
type: number
easting:
format: double
description: CIS - Metro Train Vehicle Location Easting coordinate
type: number
northing:
format: double
description: CIS - Metro Train Vehicle Location Northing coordinate
type: number
direction:
description: CIS - Metro Train Vehicle Location Direction
type: string
bearing:
format: double
description: 'Compass bearing of the vehicle when known, clockwise from True North, i.e., 0 is North and 90 is East. May be null.
Only available for some bus runs.'
type: number
supplier:
description: Supplier of vehicle position data.
type: string
datetime_utc:
format: date-time
description: Date and time that the vehicle position data was supplied.
type: string
expiry_time:
format: date-time
description: CIS - Metro Train Vehicle Location data expiry time
type: string
x-refined-from:
- public-transport-victoria-timetable-swagger-v3.json
- public-transport-victoria-timetable-openapi.yml