Public APIs
Transport for Sao Paulo, Brazil favicon

Transport for Sao Paulo, Brazil

Transportation

SPTrans.

Transport for Sao Paulo, Brazil's website screenshot

About Transport for Sao Paulo, Brazil

The API do Olho Vivo is a REST/JSON web service published by SPTrans, the public transport authority of the city of Sao Paulo, Brazil. It provides real-time and reference data on the city's bus system, including bus line search, line direction and itinerary information, stop locations by line or transit corridor, vehicle positions by line or garage, arrival predictions by line and stop, and vehicle speeds along corridors and other roads.

Access requires authentication via a token generated in the developer's application area, submitted through a POST call to a login endpoint that returns true or false depending on success. The API is accessed over HTTPS at a versioned base URL (v2.1 is the version documented), with HTTP access having been phased out.

The service is intended for developers building applications that consume Sao Paulo public transit data, such as bus arrival times, route planning, or vehicle tracking.

Key features

  • Search bus lines by number or name with phonetic matching
  • Look up bus stops by name or address, including latitude/longitude
  • Retrieve all stops served by a specific bus line
  • Get real-time vehicle positions by line or garage
  • Get arrival time predictions for a line at a stop
  • Query speed on corridors and other roadways

Frequently asked questions

What data format does the API return?

The API follows a RESTful structure and returns data in JSON format.

How do I authenticate with the API?

You authenticate with an HTTP POST call to Login/Autenticar passing an access token generated in the 'Meus Aplicativos' area, which returns true on success.

What protocol does the API use?

The API now uses HTTPS; HTTP access was discontinued as of 02/01/2024.

What is the base URL and current version of the API?

The API is accessed at http://api.olhovivo.sptrans.com.br/v2.1, with version 2.1 being the available version.

Who is this API for?

It is aimed at developers building applications that need bus line, stop, vehicle position, and arrival prediction data for the city of Sao Paulo.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product