Gares & Connexions IDs outside of France
Open, LowPublic


Wikidata and the SNCF homepage only define those ids for stations in France, but the SNCF tickets also use those for international stations, following the same scheme, just not starting with 'FR' but with the corresponding country code (e.g. 'ESBST' for Barcelona or 'CHGVA' for Geneva).

  • Can we relax Wikidata's constraint there and also add international ones?
  • Is there a table of all international station codes used by SNCF somewhere?
vkrause created this task.May 23 2018, 5:13 PM
vkrause triaged this task as Low priority.

I am unsure if that's what you want, as I am not familiar with the format of the codes you expect:

This is about, a 5 letter code (2 letters ISO 3166-1 country code + 3 letter station code) used in the SNCF ticket barcodes. For French station this is available in Wikidata (e.g. 'FRAVG' for Gare d'Avignon TGV,, but it's also been observed on international SNCF TGV tickets (e.g. 'ESBST' for Barcelona), those international codes are the ones we are missing. I haven't found them (nor the French ones for that matter) on the SNCF open data site yet (but I don't speak French, which makes searching stuff there tricky).

Well, I do speak French, so I inquired about it directly to I'm not sure I'll get an answer, though. Meanwhile, I explored a bit their data API, there is a trove of interesting things.:

But also, playing around with other SNCF sites, there is an interesting API that does almost, but not quite, what you want (not sure we can rely on that one, though):

Playing around a bit more, I found this interesting endpoint:

Unfortunately, we only get the human-readable version, no UIC code.

Thanks, that's definitely progress :) These are the codes we see in the tickets, 'CHGVA' is another foreign example I have and that is also correctly resolved with the last endpoint.

Ideally we'd get the complete list somewhere, and as you note, preferably with a mapping to UIC station codes or something else unique, so we can import that into Wikidata. That way we could avoid both vendor-specific solutions and the use of online queries for this.

vkrause updated the task description. (Show Details)Sep 15 2018, 7:55 AM