Discover/To API
live

To APIgtt.to.it

Access GTT Turin public transport data: service basins, line routes, stop lists, full-day timetables, real-time arrivals, and stop accessibility via 9 endpoints.

Endpoint health
verified 3d ago
get_percorso_schedule
get_stop_realtime
get_stop_accessibility
list_bacini
get_percorso
9/9 passing latest checkself-healing
Endpoints
9
Updated
26d ago

What is the To API?

The GTT Turin Transit API exposes 9 endpoints covering the full depth of Turin's GTT public transport network — from enumerating service basins and lines to fetching full-day departure schedules at every stop on a route. The get_percorso_schedule endpoint returns ordered stop lists with all timed departures for any route code and service date, while get_stop_realtime delivers live arrival predictions keyed to a stop code.

Try it

No input parameters required.

api.parse.bot/scraper/559cc6d3-d8a1-4547-9bea-ee0e78b2dcae/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/559cc6d3-d8a1-4547-9bea-ee0e78b2dcae/list_bacini' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace gtt-to-it-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
GTT (Torino) Bus/Tram Schedules API — SDK usage example.

Discover transit lines, look up routes and schedules, and check real-time arrivals.
"""

from parse_apis.gtt__torino__bus_tram_schedules_api import GTT, ServiceBasin

gtt = GTT()

# Search for a stop by name fragment
results = gtt.stopsearchresults.search(term="SANSOVINO")
for stop in results:
    print(stop.value, stop.data, stop.bacino)

# Pick the first matching stop and get real-time arrivals
first_stop = results[0]
realtime = gtt.stoprealtimes.get(palina=first_stop.value, bacino=ServiceBasin.URBAN)
print(realtime.codice, realtime.nome, realtime.ubicazione)
for transit in realtime.transiti:
    print(transit.linea, transit.direzione, transit.passaggi_list)

# List all urban lines
lines = gtt.lines.list(bacino=ServiceBasin.URBAN)
for line in lines:
    print(line.linea, line.description)

# Get line detail with all routes (percorsi)
details = gtt.linedetails.list(linea="3", bacino=ServiceBasin.URBAN)
for detail in details:
    print(detail.linea, detail.tipo_mezzo, detail.nomesteso)
    for route in detail.percorsi:
        print(route.codice, route.verso, route.descrizione)

# Get full route geometry and stops
route_detail = gtt.routedetails.get(linea="3", codice="03A1", verso="As", bacino=ServiceBasin.URBAN)
print(route_detail.linea, route_detail.descrizione)
for fermata in route_detail.fermate:
    print(fermata.codice, fermata.nome, fermata.lat, fermata.lon)

# Get schedule for a specific route on a given day
schedule = gtt.routeschedules.get(linea="3", codice="03A1", verso="As", giorno="20260610")
print(schedule.linea, schedule.percorso_codice, schedule.giorno)
for sched_stop in schedule.stops:
    print(sched_stop.stop_code, sched_stop.stop_name, sched_stop.departures)

# Get accessibility info, nearby resellers and parking
accessibility = gtt.stopaccessibilities.get(palina="171", bacino=ServiceBasin.URBAN, nminuti=30)
print(accessibility.codice, accessibility.nome)
for reseller in accessibility.rivendite:
    print(reseller.tipo, reseller.ubicazione, reseller.distanza)
for stallo in accessibility.stalli:
    print(stallo.ubicazione, stallo.distanza)
All endpoints · 9 totalmissing one? ·

List service basins (bacini) available in the GTT schedule system. Each basin represents a transport service category: U (urban/suburban), E (extraurban), T (tourist), F (railway). No parameters required.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "bacini": "array of basin objects with codice and descrizione"
  },
  "sample": {
    "data": {
      "bacini": [
        {
          "codice": "U",
          "descrizione": "GTT Servizio Urbano"
        },
        {
          "codice": "T",
          "descrizione": "GTT Servizi Turistici"
        },
        {
          "codice": "F",
          "descrizione": "GTT Servizio Ferroviario"
        },
        {
          "codice": "E",
          "descrizione": "GTT Servizio Extraurbano"
        }
      ]
    },
    "status": "success"
  }
}

About the To API

Line and Route Enumeration

Start with list_bacini to retrieve the four service basin codes (U for urban/suburban, E for extraurban, T for tourist, F for railway), then pass a bacino value to list_lines to get every line in that basin. Each line object includes linea, label, description, regol, and a percorsi_url. From there, get_line_percorsi accepts a linea code and returns the full percorsi array — each entry carries codice, verso, descrizione, fermate, polyline, and supplydays. The codice/verso pairs from this response are required inputs for downstream schedule and geometry endpoints. Note that upstream response times for some lines can reach 60 seconds.

Schedules and Route Geometry

get_percorso_schedule is the core timetable endpoint. Supply linea, codice, verso, and an optional giorno in YYYYMMDD format (defaults to today) to receive a stops array where each entry contains stop_code, stop_name, accessible, location, and a full departures list for the day. For route geometry only, get_percorso returns fermate (ordered stops with lat, lon, disabili, and lineeInters) plus a polyline array of coordinate objects. To pull schedules for multiple lines in one call, get_all_schedules pages through a basin's lines using start and limit parameters; keep limit between 1 and 3 to stay within upstream latency constraints. An optional include_types parameter (e.g. Bus,Tram) filters results by vehicle type.

Stop Search and Real-Time Arrivals

search_stops accepts a name fragment or stop code as term and returns matching stops with value (stop code), data (stop name), bacino, and localita. Use the returned stop code as the palina parameter in get_stop_realtime, which returns transiti — an array of upcoming line arrivals with linea, direzione, passaggi (semicolon-separated times string), and passaggi_list (parsed array). Setting realtime=false switches to scheduled-only mode but may noticeably increase response time.

Accessibility and Nearby Services

get_stop_accessibility extends the arrivals view with accessibility-specific fields. In addition to transiti (which include per-vehicle accessibility and tap-and-go status), it can return stalli (nearby accessible parking with ubicazione, distanza, and punto) and rivendite (nearby ticket resellers with tipo, orario, distanza, and punto). Control which data blocks are returned via the stalli and rivendite boolean parameters; nminuti sets the look-ahead window in minutes.

Reliability & maintenanceVerified

The To API is a managed, monitored endpoint for gtt.to.it — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when gtt.to.it changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official gtt.to.it API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
9/9 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a trip planner that maps all stops on a GTT route using fermate lat/lon coordinates from get_percorso.
  • Generate a full-day timetable display for any bus or tram line by stop using get_percorso_schedule with a specific giorno.
  • Create a departure board app for a Turin stop showing live arrival predictions via get_stop_realtime.
  • Audit GTT service coverage by bulk-extracting all urban basin schedules with get_all_schedules paginated across lines.
  • Find ticket resellers and accessible parking near any stop using get_stop_accessibility with rivendite and stalli flags.
  • Power a stop autocomplete search field using the term parameter of search_stops.
  • Compare scheduled versus real-time arrivals at a stop by toggling the realtime parameter in get_stop_realtime.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does GTT publish an official developer API?+
GTT does not publish a documented public developer API. The data exposed here is sourced from GTT's public-facing schedule and arrivals services (das_ws), which are not formally documented or supported for third-party use.
What does get_percorso_schedule return, and how do I target a specific day?+
It returns a stops array for the given route, where each stop object contains stop_code, stop_name, accessible, location, and a departures list covering the full service day. Pass giorno in YYYYMMDD format to target a specific date; omitting it defaults to today. The codice and verso inputs must be a matched pair from get_line_percorsi.
Why are some requests slow, and what can I do about it?+
Upstream response times for certain lines can reach up to 60 seconds, particularly for get_line_percorsi and get_all_schedules. For get_all_schedules, keeping the limit parameter between 1 and 3 lines per call reduces the chance of timeouts. For get_stop_realtime, setting realtime=false switches to scheduled-only mode but may also increase latency compared to the real-time mode.
Does the API cover historical schedule data or multi-day range queries?+
The API targets a single service day per request via the giorno parameter — there is no endpoint for historical archives or date-range batch queries. It covers today's schedule by default, or any single date you supply. You can fork this API on Parse and revise it to add a date-range looping endpoint that aggregates results across multiple days.
Are extraurban, tourist, and railway lines included, or only urban bus and tram routes?+
All four basin types are available: U (urban/suburban), E (extraurban), T (tourist), and F (railway). Pass the relevant bacino code to list_lines or get_all_schedules to target a specific basin. Not all basins may have equivalent real-time arrival data; the real-time feed depth varies by service type.
Page content last updated . Spec covers 9 endpoints from gtt.to.it.
Related APIs in Maps GeoSee all →
trenitalia.com API
Search for trains across Italy, check real-time train status and delays, view station departure and arrival boards, and find available tickets all in one place. Get live traffic information and detailed train itineraries to plan your journey with complete visibility into schedules and service disruptions.
rfi.it API
Check real-time train schedules and station information across Italy's railway network, search for stations, and get live alerts about delays and service disruptions. Monitor train circulation status and access detailed station mappings to plan your journeys efficiently.
mbta.com API
Track real-time subway, bus, and commuter rail departures across Greater Boston, check schedules and service alerts, and find detailed information about routes and stops. Plan your commute with up-to-the-minute MBTA transit data and never miss your connection.
citymapper.com API
Get real-time transit information including live stop arrivals, service status, and line details across major cities worldwide. Search for nearby transit options and stay informed with service alerts to plan your commute efficiently.
metro.istanbul API
Plan your Istanbul Metro trips by checking real-time service status, finding stations on specific lines, and looking up current ticket prices. Access detailed information about all metro lines and the complete network map to navigate the city's transit system efficiently.
reise.ruter.no API
Access real-time bus arrivals and departures for Oslo's public transit network (Ruter). Search for stops by name and retrieve live schedules with up-to-the-minute tracking across buses, trams, and metro lines.
ratp.fr API
Monitor real-time traffic conditions and service disruptions across Paris's RATP and RER networks to plan your commute efficiently. Get instant updates on line statuses, delays, and service alerts for all metro and regional rail lines.
bahn.com API
Search German train schedules and stations, find connections between destinations, and compare ticket prices across Deutsche Bahn routes. Get real-time station information and transit association details to plan your train journey efficiently.