Skip to content

mhgbrown/bvg_grabber_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An alternative JSON API for Berlin's public transportation authority based on bvg-grabber by @MarkusH.

Usage

/scheduled returns scheduled departure times and accepts the following options:

  • station - the station from which to retrieve departures
  • vehicles- the medium(s) of transport to look up (accepts S,U,TRAM,BUS,FERRY,RB,IC)
  • limit - the number of results to return

/actual returns actual departure times and accepts the following options:

  • station - the station from which to retrieve departures

Response

The JSON response is a list of depatures:

[
    ["S Prenzlauer Allee", [{
        "start": "S Prenzlauer Allee",
        "remaining": -300,
        "line": "S41\n\n(Gl. 1)",
        "end": "Ringbahn S 41"
    }, {
        "start": "S Prenzlauer Allee",
        "remaining": -300,
        "line": "S41\n\n(Gl. 1)",
        "end": "Ringbahn S 41"
    }]]
]

Examples

Motivation

Although BVG provides an API for web developers, one must submit an application for its use. This API provides some of the features of the official API without the hassle of applying.

Development Information

This app is based on Heroku's Getting Started with Python on Heroku tutorial and has been upgraded to support Python 3.4.2 according to some very useful information on Stack Overflow.

Running Locally

Make sure you have Python installed properly.

$ pip install -r requirements.txt
$ foreman start web

About

A alternative BVG web API built with https://github.com/MarkusH/bvg-grabber

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •