gtt.to.it 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.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/559cc6d3-d8a1-4547-9bea-ee0e78b2dcae/list_bacini' \ -H 'X-API-Key: $PARSE_API_KEY'
List service basins (bacini) available in the underlying GTT schedule system. Returns basin codes and descriptions (e.g., U urban/suburban, E extraurban, T tourist, F railway).
No input parameters required.
{
"type": "object",
"fields": {
"bacini": "array of basin objects, each 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 gtt.to.it API
This API exposes 9 endpoints covering GTT (Gruppo Torinese Trasporti) public transport data for the Turin metro area, including line enumeration, stop lists, full-day scheduled departures, and real-time arrival predictions. The get_percorso_schedule endpoint returns a complete timetable for every stop on a given route for any service day, while get_stop_realtime delivers live arrival predictions with parsed departure arrays per line.
Line and Route Discovery
Start with list_bacini to retrieve available service basins — urban/suburban (U), extraurban (E), tourist (T), and railway (F) — identified by codice and descrizione. Feed a basin code into list_lines to get a paginated list of all lines, each carrying linea, bacino, regol, label, and percorsi_url. From there, get_line_percorsi accepts a linea and optional bacino and returns every route variant (percorso) with codice, verso, descrizione, a fermate stop list, and a polyline array. Note that upstream response times for some lines can reach 60 seconds.
Timetables and Bulk Schedules
get_percorso_schedule takes a linea, route codice, direction verso, and an optional giorno (YYYYMMDD) to return the full-day departure schedule at every stop on that route. Each stop object includes stop_code, stop_name, accessible, location, point, and a departures array. For batch collection, get_all_schedules paginates across a full basin using start and limit parameters — keep limit between 1 and 3 to manage upstream latency. It returns a total_lines count, returned_lines for the current page, and nested percorsi with stop schedules.
Stop Search and Real-Time Arrivals
search_stops accepts a term string (stop code fragment or name) and returns matching stops with value (stop code), data (stop name), bacino, and localita. Pass a palina code to get_stop_realtime for upcoming arrivals: each transit object includes linea, direzione, passaggi (semicolon-separated time string), and passaggi_list (pre-parsed array). Setting realtime=false falls back to scheduled times but may produce slower responses.
Accessibility and Nearby Services
get_stop_accessibility extends the basic arrivals response with optional stalli (accessible parking, with ubicazione, distanza, and punto) and rivendite (nearby ticket resellers with tipo, ubicazione, orario, and distanza). The nminuti parameter controls the look-ahead window, and order_by_line toggles grouping of transit results. Stop coordinates are returned in the punto object.
- Build a real-time departure board for any GTT stop using
get_stop_realtimeandpassaggi_listarrays. - Generate a static timetable for an entire bus or tram route for a specific date using
get_percorso_schedule. - Map all stops and polylines for a line's route variants using
get_percorsocoordinate data. - Bulk-export full-day schedules for all urban lines using
get_all_scheduleswith paginatedstart/limitcalls. - Locate accessible stops and nearby ticket resellers for accessibility-focused transit apps via
get_stop_accessibility. - Enumerate all GTT lines in the extraurban basin for regional transport coverage using
list_lineswithbacino=E. - Power a stop autocomplete search feature using
search_stopswith partial stop names or codes.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 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.
Does GTT have an official public developer API?+
What does `get_percorso_schedule` return and how do I target a specific date?+
stop_code, stop_name, accessible, location, point, and a departures array. Pass a giorno parameter in YYYYMMDD format to target a specific service day; omitting it defaults to today.How should I paginate `get_all_schedules` to avoid timeouts?+
limit to 1–3 lines per call and advance start by that amount on each request. The endpoint returns total_lines so you can calculate how many pages are needed. Higher limit values risk slow or dropped responses due to upstream latency on some GTT lines.Does the API cover ferry, night bus, or suburban rail services beyond urban and extraurban lines?+
list_bacini endpoint returns tourist (T) and railway (F) basin codes alongside U and E, but list_lines currently accepts only U and E for line enumeration and schedule retrieval. Tourist and railway lines are not currently accessible through the schedule and timetable endpoints. You can fork this API on Parse and revise it to add support for those basin codes.Does the API return fare prices or ticket purchase information?+
rivendite from get_stop_accessibility), but does not return fare prices or ticketing data. You can fork it on Parse and revise to add the missing endpoint if GTT exposes that data elsewhere.