PHPackages                             opendatach/transport - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. opendatach/transport

ActiveLibrary

opendatach/transport
====================

Swiss public transport API

2621352[49 issues](https://github.com/OpendataCH/Transport/issues)[1 PRs](https://github.com/OpendataCH/Transport/pulls)PHP

Since Jun 17Pushed 1y ago29 watchersCompare

[ Source](https://github.com/OpendataCH/Transport)[ Packagist](https://packagist.org/packages/opendatach/transport)[ RSS](/packages/opendatach-transport/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

> **The backend of the Transport API changed on 31 July 2017.** [Read more on opendata.ch](https://opendata.ch/2017/06/search-ch-rettet-transport-opendata-ch/).

Transport API
=============

[](#transport-api)

[![Build](https://github.com/OpendataCH/Transport/workflows/Build/badge.svg)](https://github.com/OpendataCH/Transport/actions)

The Transport API allows interested developers to build their own applications using public timetable data, whether they're on the web, the desktop or mobile devices.

Feel free to fork this project implement your own ideas or send pull requests.

Installation
------------

[](#installation)

You can install the Transport API on your own server, however we recommend the usage of [transport.opendata.ch](http://transport.opendata.ch/).

```
$ git clone git://github.com/OpendataCH/Transport.git transport
$ cd transport
$ composer install

```

Also make sure, the directory `transport/var/` is writable.

If you cloned the repository inside your document root, the API is now accessible at [http://localhost/transport/web/api.php/v1/](http://localhost/transport/web/api.php/v1/locations?query=Basel). However we recommend setting the document root to `transport/web/` and using the provided `.htaccess` to route API requests to `api.php`.

Or you can start it with the PHP's built-in webserver (not recommended for a production setup, but the easy way to get started locally)

```
php -S localhost:8000

```

And then access it with

### Configuration

[](#configuration)

To define your own configuration for the API copy the file `config.php.sample` to `config.php` and override the variables you want to change.

### Statistics

[](#statistics)

You can get some basic statistics for the API by configuring a Redis server in your configuration (`$redis`) and have a look at .

Development
-----------

[](#development)

XSD for the XML Fahrplan API is available here: [hafasXMLInterface.xsd](hafasXMLInterface.xsd)

Troubleshooting
---------------

[](#troubleshooting)

### Missing package php-xml

[](#missing-package-php-xml)

If you're running Ubuntu and `composer install` produces the error message

```
Your requirements could not be resolved to an installable set of packages.

```

you can try to install the package `php-xml` using the command

```
sudo apt install php-xml

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community30

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fb470bb4c5d42b9c3ba3cd49ac26972ae2273faf1b08c2bc9cac66b305a42d93?d=identicon)[fabian](/maintainers/fabian)

---

Top Contributors

[![fabian](https://avatars.githubusercontent.com/u/13346?v=4)](https://github.com/fabian "fabian (656 commits)")[![benib](https://avatars.githubusercontent.com/u/821875?v=4)](https://github.com/benib "benib (33 commits)")[![colinfrei](https://avatars.githubusercontent.com/u/752836?v=4)](https://github.com/colinfrei "colinfrei (28 commits)")[![rndstr](https://avatars.githubusercontent.com/u/32963?v=4)](https://github.com/rndstr "rndstr (9 commits)")[![dbrgn](https://avatars.githubusercontent.com/u/105168?v=4)](https://github.com/dbrgn "dbrgn (5 commits)")[![dol](https://avatars.githubusercontent.com/u/41777?v=4)](https://github.com/dol "dol (5 commits)")[![aahlenst](https://avatars.githubusercontent.com/u/198908?v=4)](https://github.com/aahlenst "aahlenst (4 commits)")[![chregu](https://avatars.githubusercontent.com/u/47106?v=4)](https://github.com/chregu "chregu (4 commits)")[![benoitpointet](https://avatars.githubusercontent.com/u/104787?v=4)](https://github.com/benoitpointet "benoitpointet (3 commits)")[![dgruntz](https://avatars.githubusercontent.com/u/1516800?v=4)](https://github.com/dgruntz "dgruntz (2 commits)")[![dragoon](https://avatars.githubusercontent.com/u/490130?v=4)](https://github.com/dragoon "dragoon (2 commits)")[![maidmaid](https://avatars.githubusercontent.com/u/4578773?v=4)](https://github.com/maidmaid "maidmaid (2 commits)")[![jschmid](https://avatars.githubusercontent.com/u/574168?v=4)](https://github.com/jschmid "jschmid (1 commits)")[![Kleisli](https://avatars.githubusercontent.com/u/18674199?v=4)](https://github.com/Kleisli "Kleisli (1 commits)")[![loleg](https://avatars.githubusercontent.com/u/31819?v=4)](https://github.com/loleg "loleg (1 commits)")[![ltog](https://avatars.githubusercontent.com/u/4726277?v=4)](https://github.com/ltog "ltog (1 commits)")[![rafi16d](https://avatars.githubusercontent.com/u/9106487?v=4)](https://github.com/rafi16d "rafi16d (1 commits)")[![Bcow7](https://avatars.githubusercontent.com/u/2751121?v=4)](https://github.com/Bcow7 "Bcow7 (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

phpsilextransport-api

### Embed Badge

![Health badge](/badges/opendatach-transport/health.svg)

```
[![Health](https://phpackages.com/badges/opendatach-transport/health.svg)](https://phpackages.com/packages/opendatach-transport)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
