Travel APIs

Top 5 Bus and Transit APIs

Mobility is a critical aspect of almost every business app. Users who reserve a concert seat or a table at a restaurant also need a way to get there - and developers are tasked with providing this convenience. However, adding mobility, and specifically public transport data, into apps is challenging. 

There are over 400 APIs listed on ProgrammableWeb, which provide fragmented data about different transport challenges in specific geographical locations - busses in New York, taxis in India, Rail in Europe. Developers need to piece these APIs together to provide a full solution to users, which can be hard work.

Learn more in our guide: 8 Types of Travel APIs

In this article, we handpicked the top 5 APIs that:

  • Have broad or global coverage and are not limited to specific locations
  • Are popular and used by a large community
  • Offer broad functionality applicable for a large number of applications

What are Public Transit APIs?

Cities are gradually opening up public transport data. It is sometimes offered in the form of bus APIs and transit APIs, and sometimes in the form of standardized data feeds flat files or documents. 

The data comes from a variety of sources, either governmental, municipal, commercial, or from volunteers publishing the data as open source. Sources may not be frequently updated and may not be accurate, and as a developer, you’ll have to make sure you are relying on good data.

Types of Data Included in Bus APIs and Other Transit APIs

Public transport route details

Public transport APIs provide service numbers, stations and destinations, the service operator, start times, travel durations, estimated arrival times, and other pertinent aspects of each transport service.


A critical aspect of public transport APIs is knowing the geolocation of stations traversed in a public transport service (for example, the precise location of bus stations along a bus route).

Real-time updates and changes

Public transport is dynamic, so it is useful for a public transport API to provide up-to-date information about cancellations, changes of route, maintenance, and arrival times. This type of information is not available in all transport APIs, and for some locations in the world, is not available at all.

Ticketing and costs

Public transport APIs can provide pricing data for transport services, and in some cases allow users to directly purchase tickets. This requires data about which types of tickets are available and the pricing scheme.  Tickets may be valid for a single or return) trip, or valid within an area for a period of time (a transit pass).

Public transport alternatives

Many APIs provide alternatives to public transport, such as taxis, walking, cycling, car-sharing, and pooling.

Top Bus and Transit APIs

1. Google Maps Directions API

What is the Google Maps API?

Google Maps is a popular mapping service developed by Google, offered for free as a web and mobile app. As part of its Google Maps Platform, part of Google Cloud, Google provides programmatic access to the Google Maps engine, allowing developers to access static and dynamic maps, street views, and 360-degree street visualizations. 

Note: Unlike most public transport APIs, Google Maps Platform is a paid service. See Google Maps Platform Pricing 

API Focus

The Google Maps Directions API provides directions for transit between locations. It supports several modes of transportation, including walking, public transport, cycling, and driving. For public transport, it integrates with data sources around the world providing public transport information. Public transport data may not be complete for all geographical locations.

Main Features

  • Search for directions by mode of transport - transit, driving, walkingת or cycling.
  • Return multi-part directions defined by geographical waypoints.
  • Ability to specify origins, destinations, and waypoints as coordinates, place IDs or text strings (e.g. "San Francisco, CA").

Getting Started

Directions API Developer Guide

2. Here Public Transit API

What is Here?

Here provides mapping and location data to individuals and companies. It powers 4 out of 5 in-car navigation systems in North America and Europe and provides map data and an open location platform.

API Focus

The Here Public Transit API is a REST API that provides public transport agency data, external transport services, and additional data that can help discover public transit options, request routes, and related information.

Main Features

  • Discovery - shows stations and schedules of services around a specific location, stations that can be reached within a specific time frame, and transit line details for every station
  • Routing - accepts a pair of locations and provides the most efficient transit route between them.

Getting Started

Here Transit API Developer Documentation

3. CityMapper API

What is CityMapper?

CityMapper is a popular public transit and mapping application offered as a website and mobile app.

API Focus

The Citymapper API integrates city data into applications, including public transportation and maps. It works in major cities only in North America, South America, Europe, and Asia (see list of cities).

Main Features

  • Check transit travel time between two locations
  • Check transport coverage for a specific location
  • Check transport coverage for several locations in one API call

Getting Started

CityMapper API Documentation

4. NextBus XML Feed

What is NextBus? NextBus is a commercial service which provides routes, schedules, and real-time vehicle locations and arrival predictions, based on GPS systems installed on busses and trains. It works with 136 public transport providers, primarily in the United States.
API Focus NextBus does not provide a RESTful API. It offers an XML feed that allows developers to receive information about public transport routes and real-time predictions for busses, railways, and light rail transport.
Main Features

Primary commands offered in the XML feed are:

  • agencyList - retrieving a list of public transport providers
  • routeList - retrieving a list of routes
  • predictions - data on estimated arrivals of next bus or train
  • schedule - planned schedule for the route
  • vehicleLocations - current locations of vehicles based on GPS data
Getting Started

NextBus XML Feed Documentation

NextBus Service Overview

5. Transit App API

What is the Transit App? The Transit App is a popular mobile app that aggregates and maps real-time public transit data. It works in 125 metropolitan areas around the world and supports bus, rail, and also public transport alternatives: bike-sharing, Uber, Car2Go, and since 2018, scooter sharing systems.
API Focus Transit provides a URL scheme that lets you deep-link to The Transit App, show available routes, and get directions to a specific location.
Main Features
  • Get directions from latitude/longitude coordinate to latitude/longitude coordinate. Transit 2.0+ supports query strings as well as coordinates.
  • Show nearby routes for a longitude/longitude coordinate or query string
Getting Started Transit App Developer Documentation