Moovit Public Transit APIs

Download OpenAPI specification:

Overview

Moovit exposes a set of APIs tuned to support efficient and easy integration with any customer and to provide the best experience for users. We would welcome the opportunity to refine the specifications better to match your use case. These APIs have a thin nature in order to answer focused questions with very short response times. Some of these APIs also assume a user context, which will allow rolling various ID’s (such as itinerary ID) between requests.

General Settings

Metro Area

Since Moovit’s data is split into supported metro areas, the various API methods return data either from the metro that was explicitly specified, or from the metro deduced from the user’s location. The complete and updated list of supported countries can be found here. From within this page it is possible to drill-down into a specific metro area. In order to receive a metro ID from this list, which can be used within the MOOVIT_METRO_ID request header (described below), please contact your Moovit account manager.

Authentication

The HMAC Authorization methodology requires an Authorization header to be sent, and the signature will be generated and validated using the license key, acting as a shared secret between Moovit and 3rd party API user.

A request that passes such validation will be processed, and a request that fails such validation will be rejected and will potentially trigger a security alert.

The digital signature is based on the following data elements:

  • Request payload - the precise and entire JSON sent in the request body
  • Nonce - a random 255 characters string
  • API secret key - the license key shared from Moovit
  • Timestamp - current UTC time in Java format (milliseconds since 1/1/1970)

The flow for generating the signature is as follows:
1. Generate the Nonce
2. Concatenate [Timestamp]:[Request payload]:[Nonce]
3. Generate a HMAC signature (use SHA256 algorithm).
Specify the concatenated string as the HMAC payload and the API secret key as the HMAC key.

The following headers should be sent as part of each request:

Authorization: hmacauth [signature]:[Nonce]:[Timestamp]
API_KEY: public api key provided by Moovit

Example:

Assume that an API call is made where the request payload is {“x”:1,”y”:2}
The API secret key for this example is ABCDEF123456, and the current timestamp is 1234567890.
The flow for generating the signature will be as follows:

  • Generate Nonce: “qwerty” (assume this is 256 characters long)
  • Generate concatenated value: 1234567890:{“x”:1,”y”:2}:qwerty
  • Generate the hash:
  • Hash = hmac(alg: SHA256, value: 1234567890:{“x”:1,”y”:2}:qwerty, key: ABCDEF123456) For the sake of this example, let’s assume the result of the signature is “XYZ”.
  • The following HTTP header is sent as part of the request (along with the API_KEY header): Authorization: hmacauth XYZ:qwerty:1234567890

Request Headers

All of the APIs receive a set of HTTP headers:

  • MOOVIT_METRO_ID An optional header specifying the required metro to search in, overriding the user’s location. This allows, for instance, for a user from LA to search data in NYC.
  • USER_LOC The user location in the format of “(lat, lon)”, in degrees.
  • MOOVIT_PROTOCOL_VERSION The version of the protocol of the current request (for backwards compatibility purposes). If not specified, the latest version will be used. Current protocol version is 5.1.0.0
  • API_KEY: Public api key provided by Moovit
  • Authorization: hmacauth [signature]:[Nonce]:[Timestamp]

One of MOOVIT_METRO_ID / USER_LOC is required.

Caching

In general, and unless otherwise stated, it is not allowed to cache any results from the APIs described in this document. All APIs return a standard cache-control directive (via response HTTP headers). This is done either via a cache-control header with one of no-cache or max-age directives, or an ETag header. By using Moovit’s APIs, callers agree to adhere to these cache control headers.

Nearby API

Get Nearby Objects

Server Type: core-app

Get Nearby Objects accepts a location and returns all stops within a radius of this location. Will search until the specified number of maximum stops is found, or until the specified maximum radius is reached. Maximum radius size is blocked by an initial soft limit of 5km. Maximum stops is blocked by a soft limit of 100. It is possible to search for additional object types by specifying "objectTypeFilter".

Request Body schema: application/json
required
object

A latitude/longitude pair describing a GPS location (in degrees)

objectTypeFilter
string
Enum: "stop" "dockedBike" "docklessBike" "docklessScooter" "docklessElectricBike" "docklessElectricScooter" "docklessMoped" "carShare"

Comma-separated string (Filters objects of the specified types)

radiusMeters
integer [ 1 .. 1000 ]
Default: 100

Search radius in meters

maxStops
integer [ 1 .. 100 ]
Default: 100

Maximum number of stops to return

Responses

Request samples

Content type
application/json
{
  • "location": {
    },
  • "objectTypeFilter": "stop"
}

Response samples

Content type
application/json
{
  • "nearbyobjects": [
    ]
}

Stops API

Get Stop Basic Info

Server Type: core-app

Returns basic information as to a stop, such as its location, name, type, etc.

Request Body schema: application/json
One of
stopId
required
integer

The Moovit stop ID

Responses

Request samples

Content type
application/json
{
  • "stopId": 6371901
}

Response samples

Content type
application/json
{
  • "stopId": 6371901,
  • "stopKey": "490000092W2",
  • "stopName": "Rockware Avenue Greenford Stn (JJ)",
  • "stopCode": "JJ",
  • "mainTransitType": "Bus",
  • "mainAgencyId": 775950,
  • "mainAgencyName": "London Buses",
  • "location": {
    }
}

Get Stop Lines

Server Type: core-app

Returns metadata for the list of lines passing through the specified stop.

Request Body schema: application/json
One of
stopId
required
integer

The Moovit stop ID

agencyId
number

The agency ID

Responses

Request samples

Content type
application/json
{
  • "stopId": 6371901
}

Response samples

Content type
application/json
{
  • "lines": [
    ]
}

Get Stop Reviews

Server Type: tp-app

Returns any active user reviews for the specified stop.

Request Body schema: application/json
One of
stopId
required
integer

The Moovit stop ID

Responses

Request samples

Content type
application/json
{
  • "stopId": 6371901
}

Response samples

Content type
application/json
{
  • "stopUserReviews": [
    ]
}

Get Stop Photos

Server Type: core-app

Returns URLs of all user-uploaded photos of the specified stop (if available).

Request Body schema: application/json
One of
stopId
required
integer

The Moovit stop ID

Responses

Request samples

Content type
application/json
{
  • "stopId": 6371901
}

Response samples

Content type
application/json
{}

Get Stop Details

Server Type: core-app

Aggregates together all data as to the specified stop. This is a combination of data returned in Get Stop Basic Info, Get Stop Lines, Get Stop Alerts, Get Stop User Reviews and Get Stop Photos.

Request Body schema: application/json
One of
stopId
required
integer

The Moovit stop ID

Responses

Request samples

Content type
application/json
{
  • "stopId": 6371901
}

Response samples

Content type
application/json
{
  • "stopInfo": {
    },
  • "lines": [
    ],
  • "stopUserReviews": [
    ],
  • "stopPhotos": {}
}

Lines API

Get Line Basic info

Server Type: core-app

Returns basic information as to the specified line, such as line number, long name, headsign, color, icon, etc.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

Responses

Request samples

Content type
application/json
{
  • "lineNumber": "A",
  • "agencyName": "ATAC"
}

Response samples

Content type
application/json
{
  • "lineGroupLines": [
    ]
}

Get Line Stops

Server Type: core-app

Returns all the stops which a line passes through.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

directionId
required
integer
Enum: 0 1 2

One of: 0-Forward, 1-Backward, 2-Unspecified

Responses

Request samples

Content type
application/json
{
  • "lineId": 2971872
}

Response samples

Content type
application/json
{}

Get Line Shape

Server Type: core-app

Returns the shape (in Google Encoded Polyline format) describing the actual line’s route. In case a line has several alternatives, this service will return all possible alternatives, sorted from the most frequent to least frequent.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

directionId
required
integer
Enum: 0 1 2

One of: 0-Forward, 1-Backward, 2-Unspecified

Responses

Request samples

Content type
application/json
{
  • "lineId": 2971872
}

Response samples

Content type
application/json
{
  • "shapes": [
    ]
}

Get Line Pattern Shape

Server Type: core-app

Per a given trip pattern ID, returns the stop-shape-segments of the pattern, which are an ordered list of the stops and the shapes connecting them.

Request Body schema: application/json
lineId
required
integer <i32>

The Moovit line ID

patternId
required
integer

The Moovit trip pattern ID

Responses

Request samples

Content type
application/json
{
  • "lineId": 3337187,
  • "patternId": 3267995
}

Response samples

Content type
application/json
{
  • "segments": [
    ]
}

Get Line Schedule

Server Type: core-app

Returns a 24h static schedule for the specified line group in the specified day.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

Responses

Request samples

Content type
application/json
{
  • "lineNumber": "A",
  • "agencyName": "ATAC"
}

Response samples

Content type
application/json
{
  • "lineSchedule": [
    ]
}

Get Line Alerts

Server Type: core-app

Returns a list of all active alerts for the specified line group. Each element in the list is an alert summary. For details of a specific alert, call Get Service Alert Details with the relevant alert ID.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

Responses

Request samples

Content type
application/json
{
  • "lineNumber": "A",
  • "agencyName": "ATAC"
}

Response samples

Content type
application/json
{
  • "alerts": [
    ]
}

Get Line Reviews

Server Type: core-app

Returns a list of all user reviews for the specified line group. Each element in the list is a user review.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

Responses

Request samples

Content type
application/json
{
  • "lineNumber": "A",
  • "agencyName": "ATAC"
}

Response samples

Content type
application/json
{
  • "userReviews": [
    ]
}

Get Line Full Info

Server Type: core-app

Aggregates together all data as to the specified line group. This is a combination of data returned in Get Line Basic info, Get Line Stops, Get Line Shape, Get Line Schedule, Get Line Alerts and Get Line User Reviews. Additionally, it connects specific trip patterns (stop sequences) with shapes.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

Responses

Request samples

Content type
application/json
{
  • "lineNumber": "A",
  • "agencyName": "ATAC"
}

Response samples

Content type
application/json
{
  • "linesFullInfo": [
    ]
}

Trip Plan API

Get Suggested Routes

Server Type: tp-app

This is Moovit’s primary trip plan API. It performs a multi-modal search in order to return the best possible options for a user to get from point A to point B, according to actual availability and the specified constraints.

In addition to the basic search query, containing location and times, this service also allows more advanced tuning, including:

  • Search Type - Fastest, least walking, least transfers
  • Agency filter - allow only a specific set of agencies to be returned
  • Transit type filter - allow only a specific set of public transit types to be returned
  • Transit mode filters - allow only a specific set of modes (PT, bikes, walk, etc.) to be used
  • Bike filter - allow private bikes, docked bikes, dockless bikes, docked scooters, dockless scooters
Request Body schema: application/json
required
object

A latitude, longitude pair, describing a GPS location (in degrees).

required
object

A latitude, longitude pair, describing a GPS location (in degrees).

transitTypes
Array of strings
Items Enum: "Tram" "Subway" "Rail" "Bus" "Ferry" "CableCar" "Gondola" "Funicular"

Focus on a certain set of transit types. If not specified, all will be allowed.

preferredAgencies
Array of integers

Prefer a specific set of public transit agencies

agencies
Array of integers

Allow only a specific set of public transit agencies to be returned

time
integer <int64>

The local time in Java format (milliseconds since 1/1/1970). If not specified the current time will be used

timeUtc
integer <int64>

The UTC time in Java format (milliseconds since 1/1/1970). If not specified the current time will be used

timeType
required
integer
Enum: 1 2 3

Specifies whether the time signifies departure time, or arrival time. Values are: 1 - Arrival, 2 - Departure, 3 - Last

searchType
string
Default: "Fastest"
Enum: "Fastest" "LeastWalking" "LeastTransfers"

Route preference

modeTypes
Array of strings
Items Enum: "PublicTransit" "CarShare" "Bike"

Focus on a certain set of transportation modes. If not specified, all modes will be allowed.

bikeTypes
Array of strings
Items Enum: "Private" "DockedBikes" "DocklessBikes" "DockedScooter" "DocklessScooter"

Focus on a certain type of bikes. If not specified, all will be allowed.

Responses

Request samples

Content type
application/json
{
  • "from": {
    },
  • "to": {
    },
  • "timeType": 2
}

Response samples

Content type
application/json
{
  • "summaries": [
    ]
}

Get Walking Routes

Server Type: tp-app

This API performs a trip plan search from point A to point B, using only walking routes.

Request Body schema: application/json
required
object

A latitude, longitude pair, describing a GPS location (in degrees).

required
object

A latitude, longitude pair, describing a GPS location (in degrees).

time
integer <int64>

The local time in Java format (milliseconds since 1/1/1970). If not specified the current time will be used

timeType
required
integer
Enum: 1 2 3

Specifies whether the time signifies departure time, or arrival time. Values are: 1 - Arrival, 2 - Departure, 3 - Last

Responses

Request samples

Content type
application/json
{
  • "from": {
    },
  • "to": {
    },
  • "time": 1535032789000,
  • "timeType": 2
}

Response samples

Content type
application/json
{
  • "itineraryId": "db6344e3-7510-409d-b3bf-064363e8be35#2020050341B1222FC91D45669D7F3A5BE62EF782:0",
  • "startTime": 1588558184000,
  • "endTime": 1588558883000,
  • "distance": 891.9578730775283
}

Get Basic Itinerary

Server Type: tp-app

Returns data according to an Itinerary ID previously returned by one of the above trip plan search APIs. The basic info contains data as to the various legs comprising the itinerary, including the locations, public transit lines, start and end times. An itinerary is available up to 24 hours following a search request.

Request Body schema: application/json
itineraryId
required
string

An ID of an itinerary previously returned by one of the trip plan search APIs
Note: Since itineraries are transient objects, this isn’t a working sample, and the itinerary ID in this sample should be replaced by an itinerary returned by one of the trip plan search APIs in the past 24 hours.

Responses

Request samples

Content type
application/json
{
  • "itineraryId": "f454ede7-6e74-41d4-92c5-32d98d5caae8#20180826559A27E097B54BE883A5501B532820C8:0#1"
}

Response samples

Content type
application/json
{
  • "itinerary": {
    }
}

Get Detailed Itinerary Shape

Server Type: tp-app

Returns the shape of an Itinerary ID previously returned by one of the above trip plan search APIs. For public transit legs will return also the stops that the leg passes through. For walk and bike legs, will return also the turn-by-turn navigation data. An itinerary is available up to 24 hours following a search request.

Request Body schema: application/json
itineraryId
required
string

An ID of an itinerary previously returned by one of the trip plan search APIs
Note: Since itineraries are transient objects, this isn’t a working sample, and the itinerary ID in this sample should be replaced by an itinerary returned by one of the trip plan search APIs in the past 24 hours.

Responses

Request samples

Content type
application/json
{
  • "itineraryId": "f454ede7-6e74-41d4-92c5-32d98d5caae8#20180826559A27E097B54BE883A5501B532820C8:0#1"
}

Response samples

Content type
application/json
{
  • "itinerary": {
    }
}

Get Detailed Itinerary Schedules

Server Type: tp-app

Returns data as to all departures of PT legs for the current 24 hours for an Itinerary ID previously returned by one of the above trip plan search APIs. An itinerary is available up to 24 hours following a search request.

Request Body schema: application/json
itineraryId
required
string

An ID of an itinerary previously returned by one of the trip plan search APIs
Note: Since itineraries are transient objects, this isn’t a working sample, and the itinerary ID in this sample should be replaced by an itinerary returned by one of the trip plan search APIs in the past 24 hours.

Responses

Request samples

Content type
application/json
{
  • "itineraryId": "f454ede7-6e74-41d4-92c5-32d98d5caae8#20180826559A27E097B54BE883A5501B532820C8:0#1"
}

Response samples

Content type
application/json
{
  • "itinerary": {
    }
}

Get Detailed Itinerary

Server Type: tp-app

Aggregates together all data as to the specified itinerary (previously returned by one of the above trip plan search APIs). This is a combination of data returned in Get Basic Itinerary, Get Detailed Itinerary Shape and Get Detailed Itinerary Schedules. An itinerary is available up to 24 hours following a search request.

Request Body schema: application/json
itineraryId
required
string

An ID of an itinerary previously returned by one of the trip plan search APIs
Note: Since itineraries are transient objects, this isn’t a working sample, and the itinerary ID in this sample should be replaced by an itinerary returned by one of the trip plan search APIs in the past 24 hours.

Responses

Request samples

Content type
application/json
{
  • "itineraryId": "f454ede7-6e74-41d4-92c5-32d98d5caae8#20180826559A27E097B54BE883A5501B532820C8:0#1"
}

Response samples

Content type
application/json
{
  • "itinerary": {
    }
}

PT Real-Time API

Get Line Stop Arrivals Ex

Server Type: core-app

Returns up to three next Live Arrival times for a given line at a given stop

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

directionId
integer
Enum: 0 1 2

One of: 0-Forward, 1-Backward, 2-Unspecified

required
stopKey (object) or stopCode (object) or stopId (object)

Responses

Request samples

Content type
application/json
Example
{
  • "lineId": 3358900,
  • "stopKey": 2945624
}

Response samples

Content type
application/json
{
  • "stopArrival": [
    ]
}

Get Line Arrivals

Server Type: core-app

Returns the next Live Arrival times for each stop within the specified line.

Request Body schema: application/json
One of
lineNumber
required
string

The line number

agencyName
required
string

The agency name

directionId
required
integer
Enum: 0 1 2

One of: 0-Forward, 1-Backward, 2-Unspecified

Responses

Request samples

Content type
application/json
Example
{
  • "lineId": 2355628
}

Response samples

Content type
application/json
{
  • "lineArrivals": [
    ]
}

Get Stop Arrivals

Server Type: core-app

Returns the requested number of Live Arrivals for all lines arriving at the specified stop

Request Body schema: application/json
maxArrivals
integer [ 0 .. 15 ]
Default: 15

The maximum arrivals to return per line. If not specified the system default will be used

maxFutureSec
integer [ 1 .. 86400 ]
Default: 3600

The maximum time in the future to return arrivals for. If not specified the system default will be used. Units: seconds

required
stopKey (object) or stopId (object)
transitType
string or null
Enum: "Tram" "Subway" "Rail" "Bus" "Ferry" "CableCar" "Gondola" "Funicular"

The transit type of the line.

agencyName
string

The agency name

Responses

Request samples

Content type
application/json
Example
{
  • "stopId": 2945624
}

Response samples

Content type
application/json
{
  • "stopArrival": [
    ]
}

Get Multi Stops Arrivals

Server Type: core-app

Returns the requested number of Live Arrivals for all lines arriving for list of stops.

Request Body schema: application/json
maxArrivals
integer [ 0 .. 15 ]
Default: 15

The maximum arrivals to return per line. If not specified the system default will be used

maxFutureSec
integer [ 1 .. 86400 ]
Default: 3600

The maximum time in the future to return arrivals for. If not specified the system default will be used. Units: seconds

transitType
string or null
Enum: "Tram" "Subway" "Rail" "Bus" "Ferry" "CableCar" "Gondola" "Funicular"

The transit type of the line.

agencyName
string

The agency name

required
stopIds (object) or stopKeys (object) or stopCodes (object)

Exactly one of these parameters is required
StopCode and StopKey availability depends on metro settings

Responses

Request samples

Content type
application/json
{
  • "stopIds": [
    ]
}

Response samples

Content type
application/json
{
  • "stopArrivalsList": [
    ]
}

Get Multi Stops Arrivals With Alerts

Server Type: core-app

External Stop services

Request Body schema: application/json
maxArrivals
integer [ 0 .. 15 ]
Default: 15

The maximum arrivals to return per line. If not specified the system default will be used

maxFutureSec
integer [ 1 .. 86400 ]
Default: 3600

The maximum time in the future to return arrivals for. If not specified the system default will be used. Units: seconds

transitType
string or null
Enum: "Tram" "Subway" "Rail" "Bus" "Ferry" "CableCar" "Gondola" "Funicular"

The transit type of the line.

agencyName
string

The agency name

required
stopIds (object) or stopKeys (object) or stopCodes (object)

Exactly one of these parameters is required
StopCode and StopKey availability depends on metro settings

Responses

Request samples

Content type
application/json
{
  • "stopIds": [
    ]
}

Response samples

Content type
application/json
{
  • "stopArrivalsList": [
    ]
}

General API

Get Metro Service Alerts

Server Type: core-app

Returns a list of all active service alerts, that are defined in the metro or agency level, and are not connected to a specific line or stop. Each element in the list is an alert summary. For details of a specific alert, call Get Service Alert Details API with the relevant alert ID.

Responses

Request samples

curl -L -X POST 'https://api.moovitapp.com/services-app/services/EX/API/GetMetroServiceAlerts' -H 'API_KEY: <<YOUR_API_KEY>>' -H 'MOOVIT_METRO_ID: 121' -H 'Content-Type: application/json' --data-raw ''

Response samples

Content type
application/json
{
  • "alerts": [
    ]
}

Get Alert Details

Server Type: core-app

Returns details as to the alert with the specified ID.
Natural Language Example: “Show me more details”
Textual Output: “Due to unexpected construction work University station is closed and line 5 will detour via King Street station. Expected resolution time is yet unknown”

Request Body schema: application/json
alertId
required
string <string>

ID of the alert

Responses

Request samples

Content type
application/json
{
  • "alertId": "41754097"
}

Response samples

Content type
application/json
{
  • "alertId": "41754097",
  • "agencyId": 10369,
  • "agencyName": "CT Transit- Stamford",
  • "category": "Modified",
  • "lineGroupIds": [
    ],
  • "publicationDate": 1587404823339,
  • "title": "Reduced Service Schedule on Route 351 (Updated)",
  • "desc": "<div>\n <p>MNR will be operating hourly service on the New Haven Line effective Monday, 4/13.  The 351 route will continue to operate a reduced schedule until further notice.</p>\n </div>",
  • "effect": "SA_REDUCED_SERVICE",
  • "alertLevel": "Line"
}

Get Metro Agencies

Server Type: core-app

Returns a list of all public transit agencies operating in the metro specified according to the request header.
POST with empty body

Responses

Request samples

curl -L -X POST 'https://api.moovitapp.com/services-app/services/EX/API/GetMetroAgencies' -H 'API_KEY: <<YOUR_API_KEY>>' -H 'MOOVIT_METRO_ID: 121' -H 'Content-Type: application/json' --data-raw ''

Response samples

Content type
application/json
{
  • "agencies": [
    ]
}

Get Metro Supported Transit Types

Server Type: core-app

Returns a list of all public transit types (bus, subway, etc.) supported in the metro specified according to the request header.
POST with empty body

Responses

Request samples

curl -L -X POST 'https://api.moovitapp.com/services-app/services/EX/API/GetMetroSupportedTransitTypes' -H 'API_KEY: <<YOUR_API_KEY>>' -H 'MOOVIT_METRO_ID: 121' -H 'Content-Type: application/json' --data-raw ''

Response samples

Content type
application/json
{
  • "transitTypes": [
    ]
}

GTFS Real-Time API

RT GTFS

Server Type: core-app

This service has two flavors. By default returns all trip updates for the metro specified in the request. When vehiclePositions = 1 will return Vehicle Positions data. Results can be filtered based on agency ID and transit type.

query Parameters
metroId
required
number
Example: metroId=121

The requested Moovit metro ID.

vehiclePositions
boolean
Example: vehiclePositions=1

Return Vehicle Positions feed entity data.

agencyId
number
Example: agencyId=8903

Filter results based on agencyId ID.

transitType
string
Enum: "TRAM" "SUBWAY" "RAIL" "BUS" "FERRY" "CABLECAR" "GONDOLA" "FUNICULAR"
Example: transitType=BUS

Filter results based on transit type.

Responses

Request samples

curl -L -X GET 'https://api.moovitapp.com/services-app/services/EX/API/RtGtfs?metroId=121&transitType=BUS' -H 'API_KEY: <<YOUR_API_KEY>>' -H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "entity": [
    ],
  • "header": {
    }
}

SA RT GTFS

Server Type: core-app

Returns all service alerts for the metro specified in the request.

query Parameters
metroId
required
number
Example: metroId=121

The requested Moovit metro ID.

agencyId
number
Example: agencyId=8903

Filter results based on agencyId ID.

transitType
string
Enum: "TRAM" "SUBWAY" "RAIL" "BUS" "FERRY" "CABLECAR" "GONDOLA" "FUNICULAR"
Example: transitType=BUS

Filter results based on transit type.

Responses

Request samples

curl -L -X GET 'https://api.moovitapp.com/services-app/services/EX/API/RtGtfs?SaRtGtfs=121&agencyId=8903' -H 'API_KEY: <<YOUR_API_KEY>>' -H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "header": {
    },
  • "entity": [
    ]
}

Polygon RT GTFS

Server Type: core-app

This API is similar to the RT GTFS API but returns only RT data relevant to a predefined geographic area. Additionally, the results can be limited to a specific set of line groups. In order to use this API, these settings should be defined via the Moovit account manager.

query Parameters
metroId
required
number
Example: metroId=121

The requested Moovit metro ID.

vehiclePositions
boolean
Example: vehiclePositions=1

Return Vehicle Positions feed entity data.

Responses

Request samples

curl -L -X GET 'https://api.moovitapp.com/services-app/services/EX/API/PolygonRtGtfs?metroId=121' -H 'API_KEY: <<YOUR_API_KEY>>' -H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "entity": [
    ],
  • "header": {
    }
}

Search API

Stop Search

Server Type: search

Returns all stops matching the query. Results can be filtered based on transit type.

Request Body schema: application/json
query
required
string

Text to be searched.

maxResults
number [ 1 .. 1000 ]
Default: 1000

The maximum number of results returned.

transitTypes
Array of strings
Items Enum: "Tram" "Subway" "Rail" "Bus" "Ferry" "Cable_Car" "Gondola" "Funicular"

Allow only a specific set of public transit types to be returned.

Responses

Request samples

Content type
application/json
{
  • "query": "Washington",
  • "maxResults": 10,
  • "transitTypes": [
    ]
}

Response samples

Content type
application/json
{}

Line Search

Server Type: search

Returns all lines matching the query.

Request Body schema: application/json
text
required
string

Text to be searched.

Responses

Request samples

Content type
application/json
{
  • "text": "M-3"
}

Response samples

Content type
application/json
{
  • "lineGroups": [
    ]
}