https://github.com/juliuste/flix-rest
REST endpoint for the FlixBus (Meinfernbus) / FlixTrain API.
https://github.com/juliuste/flix-rest
api bus coach deployment public-transport
Last synced: 12 months ago
JSON representation
REST endpoint for the FlixBus (Meinfernbus) / FlixTrain API.
- Host: GitHub
- URL: https://github.com/juliuste/flix-rest
- Owner: juliuste
- License: isc
- Created: 2017-07-08T06:03:17.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-10-24T09:24:41.000Z (over 4 years ago)
- Last Synced: 2025-03-23T04:41:14.372Z (about 1 year ago)
- Topics: api, bus, coach, deployment, public-transport
- Language: JavaScript
- Homepage: https://1.flixbus.transport.rest
- Size: 20.5 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# meinfernbus-rest
A public HTTP REST API, exposing a clean interface to query the Meinfernbus/FlixBus API. Complies with the [friendly public transport format](https://github.com/public-transport/friendly-public-transport-format). Inofficial, using endpoints by *Flixbus/MFB*. Ask them for permission before using this endpoint in production.
The public endpoint is available at `https://1.flixbus.transport.rest`.
[](https://david-dm.org/juliuste/meinfernbus-rest)
[](https://david-dm.org/juliuste/meinfernbus-rest#info=devDependencies)
[](LICENSE)
[](https://gitter.im/juliuste)
## `GET /regions`
Output from [`search-meinfernbus-locations`](https://github.com/derhuerst/search-meinfernbus-locations) (regions only).
- `query`: **Required.** Search query
```shell
curl 'https://1.flixbus.transport.rest/regions/?query=Frankfurt'
```
## `GET /regions/all`
List of all operated regions, output from [`require('meinfernbus').regions`](https://github.com/juliuste/meinfernbus/blob/master/docs/regions.md).
```shell
curl 'https://1.flixbus.transport.rest/regions/all'
```
## `GET /stations`
Output from [`search-meinfernbus-locations`](https://github.com/derhuerst/search-meinfernbus-locations) (stations only).
- `query`: **Required.** Search query
```shell
curl 'https://1.flixbus.transport.rest/stations/?query=Frankfurt'
```
## `GET /stations/all`
List of all operated stations, output from [`require('meinfernbus').stations`](https://github.com/juliuste/meinfernbus/blob/master/docs/stations.md).
```shell
curl 'https://1.flixbus.transport.rest/stations/all'
```
## `GET /journeys`
Output from [`require('meinfernbus').journeys`](https://github.com/juliuste/meinfernbus/blob/master/docs/journeys.md)
- `origin`: Region id **or** `origin.id`: Region/station id and `origin.type`: Region/station - **Required.**
- `destination`: Region id **or** `destination.id`: Region/station id and `destination.type`: Region/station - **Required.**
- `date`: When? UNIX timestamp or `JS`-parsable date string. Default: now.
- `adults`: Number of adults. Default: 1
- `children`: Number of children. Default: 0
- `bikes`: Number of bikes. Default: 0
```shell
curl 'https://1.flixbus.transport.rest/journeys/?origin=88&destination=1394&date=2018-04-13T10:30:00'
```
## Similar Projects
- [meinfernbus](https://github.com/juliuste/meinfernbus/) – Meinfernbus/FlixBus API client
- [search-meinfernbus-locations](https://github.com/derhuerst/search-meinfernbus-locations/) – Meinfernbus location search
- [db-hafas](https://github.com/derhuerst/db-hafas) - Deutsche Bahn (DB) API client
- [db-prices](https://github.com/juliuste/db-prices) - Deutsche Bahn (DB) Sparpreise API client
## Contributing
If you found a bug, want to propose a feature or feel the urge to complain about your life, feel free to visit [the issues page](https://github.com/juliuste/meinfernbus-rest/issues).