https://efa.sta.bz.it/apb. The integration lives in src/app/services/efa.ts.
Base URL
Stop search
searchStopsEfa(query)
The primary autocomplete function. It searches for stops matching a query string and automatically adds bilingual translations so users get results regardless of whether they type in German or Italian.
- Normalizes the query and looks up any known bilingual translations
- Builds a list of unique query variants (original + translated)
- Fires all variants in parallel via
searchSingleEfa() - Deduplicates results by stop ID and returns a flat list
searchLocations(query)
A higher-level wrapper over searchStopsEfa that returns GeocodingResult objects suitable for dropdown suggestions:
EfaStop type
EFA endpoint
Stop search hits theXML_STOPFINDER_REQUEST endpoint:
language parameter controls the display language for stop names in the response.
Bilingual translation
South Tyrol is officially bilingual (German and Italian). Stop names, city names, and transit facility names differ between languages.efa.ts ships a built-in translation map:
| German | Italian |
|---|---|
| Bozen | Bolzano |
| Meran | Merano |
| Brixen | Bressanone |
| Bruneck | Brunico |
| Sterzing | Vipiteno |
| Schlanders | Silandro |
| Bahnhof | Stazione |
| Busbahnhof | Autostazione |
searchStopsEfa appends the translated variant as an additional query. Both variants run in parallel and results are merged by ID.
Transport modes
The service layer maps EFA’s internal mode codes to a normalized set used throughout the app:| Mode | Covers |
|---|---|
RAIL | SAD regional trains, Trenitalia |
BUS | SASA urban buses (Bolzano, Merano), SAD regional coaches |
GONDOLA | Cable cars and aerial tramways (Seilbahn) |
WALK | Walking segments between stops |
Language selection
efa.ts reads the EFA language from getEfaLanguage(), which returns 'de' or 'it' based on the user’s active locale:
- German →
de - Italian →
it - English →
de(fallback) - Ladin →
de(fallback)
Error handling
searchSingleEfa wraps each request in a try/catch. If a request fails, it returns an empty array — the outer searchStopsEfa continues with results from whichever queries succeeded. No error is surfaced to the user for a failed autocomplete request.
The EFA API does not require authentication. All requests are made client-side directly from the browser. CORS is permitted by the server.
Architecture
How the EFA service fits into the overall app architecture.
Development setup
Running SmartMove locally.