Unofficial GTFS Realtime feed for Schleswig-Holstein

This endpoint provides realtime transit data for Schleswig-Holstein & Hamburg in the GTFS Realtime (GTFS-RT) format.

API status

Underneath, it works by polling the nah.SH HAFAS endpoint underneath. Those interested in delays of all vehicles, instead of a particular one, don't have to poll nah.SH's API brute-force: They're able to fetch the data efficiently from here.

Note: This feed is run by people not related to nah.SH and the government.

Why use this API?

Getting Started

Note: This project is work-in-progress, the feed might go offline at any time! I'm happy to receive any kind of feedback via the nahsh-gtfs-rt-server GitHub Issues.

The URL of the GTFS-RT feed is https://v0.sh-gtfs-rt.transport.rest/feed.

As an example, let's use print-gtfs-rt-cli and jq to inspect it:

curl 'https://v0.sh-gtfs-rt.transport.rest/feed' -s | print-gtfs-rt --json | head -n 1 | jq
{
	"id": "13040",
	"trip_update": {
		"trip": {
			"trip_id": "199942657",
			"start_time": "15:45:00",
			"start_date": "20211101",
			"route_id": "43229_2"
		},
		"stop_time_update": [
			{
				"stop_sequence": 0,
				"departure": {
					"time": 1635777900
				},
				"stop_id": "000008000238",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 1,
				"arrival": {
					"time": 1635778380
				},
				"departure": {
					"time": 1635778380
				},
				"stop_id": "000008001646",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 2,
				"arrival": {
					"time": 1635778680
				},
				"departure": {
					"time": 1635778740
				},
				"stop_id": "000008003577",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 3,
				"arrival": {
					"time": 1635779280
				},
				"departure": {
					"delay": 180,
					"time": 1635779520
				},
				"stop_id": "000008000058",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 4,
				"arrival": {
					"delay": 120,
					"time": 1635780180
				},
				"departure": {
					"delay": 120,
					"time": 1635780240
				},
				"stop_id": "000008004057",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 5,
				"arrival": {
					"delay": 120,
					"time": 1635780660
				},
				"departure": {
					"delay": 60,
					"time": 1635780780
				},
				"stop_id": "000008004952",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 6,
				"arrival": {
					"delay": 0,
					"time": 1635781200
				},
				"departure": {
					"delay": 60,
					"time": 1635781260
				},
				"stop_id": "000009057774",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 7,
				"arrival": {
					"delay": 0,
					"time": 1635781440
				},
				"departure": {
					"delay": 60,
					"time": 1635781500
				},
				"stop_id": "000009057832",
				"schedule_relationship": 0
			},
			{
				"stop_sequence": 8,
				"arrival": {
					"delay": 0,
					"time": 1635781920
				},
				"stop_id": "000009057819",
				"schedule_relationship": 0
			}
		],
		"vehicle": {
			"id": "11824",
			"label": "Lübeck Hbf"
		},
		"delay": 120
	}
}