Transport for Sweden
APIFree API for Sweden’s public transport data (timetables, real-time info, routes)
Overview
Transport for Sweden (via Trafiklab) offers RESTful endpoints for accessing Sweden’s public transport data, including static timetables (GTFS), real-time vehicle positions/alerts (GTFS-RT), route planning, stop locations, and service updates. Data formats include JSON and GTFS standards. Use cases include building journey planning apps, real-time arrival tools, integrating into navigation platforms, transit analytics, or accessibility-focused solutions. It covers all major regions and multi-modal transport (bus, train, tram, metro, ferry).
Example Integration (JavaScript)
fetch('https://www.trafiklab.se/api')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err)); Key Features
- RESTful architecture
- JSON & GTFS/GTFS-RT support
- Real-time transit data
- Route planning endpoints
- Multi-modal coverage
- Free non-commercial tiers
Frequently Asked Questions
? Is Transport for Sweden (Trafiklab) free to use?
Yes, it offers free tiers for non-commercial use; paid plans are available for higher usage or commercial purposes.
? Does it require an API Key?
Yes, you need to register on Trafiklab to generate an API key for authentication.
? What is the response format?
Most endpoints return JSON; real-time data uses GTFS-RT, and static timetables use GTFS.
Top Alternatives
People Also Ask about Transport for Sweden
Tool Info
Pros
- ⊕ Free basic access
- ⊕ Comprehensive national coverage
- ⊕ Standardized data formats
- ⊕ Diverse endpoints
- ⊕ Active developer community
Cons
- ⊖ Rate limits on free tiers
- ⊖ Requires API key registration
- ⊖ Paid plans for advanced use
- ⊖ Limited to Sweden
- ⊖ Regional-specific documentation