Skip to main content

An API client for public transport data from Entur.

Project description

Entur API client

Python client for fetching estimated departures from stop places in Norway from API. Information about stop places, platforms and real-time departures.

PyPI version PyPI pyversions

Buy me a coffee


import aiohttp
import asyncio
from enturclient import EnturPublicTransportData

API_CLIENT_ID = 'awesome_company - my_application'

async def print_bergen_train_delay():
    async with aiohttp.ClientSession() as client:
        stops = ['NSR:StopPlace:548']
        quays = ['NSR:Quay:48550']

        data = EnturPublicTransportData(
            client_name=API_CLIENT_ID, # Required
            web_session=client) # recommended argument

        await data.update()

        bergen_train = data.get_stop_info('NSR:StopPlace:548')
        bergen_train_delay = bergen_train.estimated_calls[0].delay_in_min


Obtaining a stop id

Entur's travel planer has a map of all stops used in Norway. Use the map to find the stops you're interested in. When you have found one of your stops, click on it, and hit "Se alle avganger".

Now the web browser should contain an URL with the id in it. Such as this:

The stop id is the content after id= parameter in the url. Copy paste this into the configuration.

It's also possible to use the National Stop Register (NSR). Log in as "guest"/"guest" at to explore the contents of NSR. Find your stop in the map, click on it and then again at the name. You have to zoom quite a bit in before the stops shows in the map. Information about the stop place, including the stop and quay ids will pop up on the side.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for enturclient, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size enturclient-0.2.2-py3-none-any.whl (7.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size enturclient-0.2.2.tar.gz (8.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page