{"id":17370421,"url":"https://github.com/public-transport/oebb","last_synced_at":"2025-10-05T12:43:00.343Z","repository":{"id":38713143,"uuid":"108631253","full_name":"public-transport/oebb","owner":"public-transport","description":"Austrian Federal Railways (ÖBB) API client.","archived":false,"fork":false,"pushed_at":"2023-07-26T14:05:00.000Z","size":108,"stargazers_count":66,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-24T06:58:28.980Z","etag":null,"topics":["library","public-transport","railway"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/public-transport.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-28T08:06:16.000Z","updated_at":"2025-07-16T11:35:34.000Z","dependencies_parsed_at":"2024-11-06T07:34:31.555Z","dependency_job_id":"83e4ea51-c498-4da2-af48-7bf57366c40f","html_url":"https://github.com/public-transport/oebb","commit_stats":{"total_commits":38,"total_committers":7,"mean_commits":5.428571428571429,"dds":0.2894736842105263,"last_synced_commit":"c71ff266980ae042a3c4999265ca14c67fa548e6"},"previous_names":["public-transport/oebb"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/public-transport/oebb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/public-transport%2Foebb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/public-transport%2Foebb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/public-transport%2Foebb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/public-transport%2Foebb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/public-transport","download_url":"https://codeload.github.com/public-transport/oebb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/public-transport%2Foebb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267976567,"owners_count":24174965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","public-transport","railway"],"created_at":"2024-10-16T00:57:58.666Z","updated_at":"2025-10-05T12:42:55.302Z","avatar_url":"https://github.com/public-transport.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oebb\n\nClient for the [Austrian Federal Railways (ÖBB)](https://oebb.at/) API. Inofficial, using endpoints by *ÖBB*. Ask them for permission before using this module in production. **Actually, there should be no need for projects like this since endpoints for state-owned public transportation operators should be open to the public. It's ~~2017, 2018, 2019,~~ 2020. By the way: Even [Deutsche Bahn](http://www.bahn.de/) gets this now, and you don't ever want to be less progressive than them, because that would hurt their pride 😄.**\n\nThis module conforms to the [FPTI-JS `0.3.2` standard](https://github.com/public-transport/fpti-js/tree/0.3.2) for JavaScript public transportation modules.\n\n[![npm version](https://img.shields.io/npm/v/oebb.svg)](https://www.npmjs.com/package/oebb)\n[![Build Status](https://travis-ci.org/juliuste/oebb.svg?branch=master)](https://travis-ci.org/juliuste/oebb)\n[![license](https://img.shields.io/github/license/juliuste/oebb.svg?style=flat)](license)\n[![fpti-js version](https://fpti-js.badges.juliustens.eu/badge/juliuste/oebb)](https://fpti-js.badges.juliustens.eu/link/juliuste/oebb)\n\n## Installation\n\n```shell\nnpm install oebb\n```\n\n## Usage\n\n```js\nconst oebb = require('oebb')\n```\n\nThe `oebb` module conforms to the [FPTI-JS `0.3.2` standard](https://github.com/public-transport/fpti-js/tree/0.3.2) for JavaScript public transportation modules and exposes the following methods:\n\nMethod | Feature description | [FPTI-JS `0.3.2`](https://github.com/public-transport/fpti-js/tree/0.3.2)\n-------|---------------------|--------------------------------------------------------------------\n[`stations.search(query, [opt])`](#stationssearchquery-opt) | Search stations by *query*. | [✅ yes](https://github.com/public-transport/fpti-js/blob/0.3.2/docs/stations-stops-regions.search.md)\n[`journeys(origin, destination, [opt])`](#journeysorigin-destination-opt) | Journeys between stations | [✅ yes](https://github.com/public-transport/fpti-js/blob/0.3.2/docs/journeys.md)\n\n---\n\n### `stations.search(query, [opt])`\n\nSearch stations by *query*. See [this method in the FPTI-JS `0.3.2` spec](https://github.com/public-transport/fpti-js/blob/0.3.2/docs/stations-stops-regions.search.md).\n\n#### Supported Options\n\nAttribute | Description | FPTI-spec | Value type | Default\n----------|-------------|------------|------------|--------\n`results` | Max. number of results returned | ✅ | `Number` | `null`\n\n#### Example\n\n```js\noebb.stations.search('Wie', { results: 2 }).then(…)\n```\n\n```js\n[\n\t\t{\n\t\t\ttype: 'station',\n\t\t\tid: '1190100',\n\t\t\tname: 'Wien',\n\t\t\tmeta: true, // indicates that this is a \"meta\" station, actually representing a group of stations, corresponding to the city of vienna in this case\n\t\t\tlocation: {\n\t\t\t\ttype: 'location',\n\t\t\t\tlongitude: 16.372134,\n\t\t\t\tlatitude: 48.208547\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\ttype: 'station',\n\t\t\tid: '1290401',\n\t\t\tname: 'Wien Hbf (U)',\n\t\t\tmeta: false,\n\t\t\tlocation: {\n\t\t\t\ttype: 'location',\n\t\t\t\tlongitude: 16.375326,\n\t\t\t\tlatitude: 48.185507\n\t\t\t}\n\t\t}\n\t]\n```\n\n---\n\n### `journeys(origin, destination, [opt])`\n\nFind journeys between stations. See [this method in the FPTI-JS `0.3.2` spec](https://github.com/public-transport/fpti-js/blob/0.3.2/docs/journeys.md).\n\n#### Supported Options\n\nAttribute | Description | FPTI-spec | Value type | Default\n----------|-------------|------------|------------|--------\n`when` | Journey date, synonym to `departureAfter` | ✅ | [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/date) | `new Date()`\n`departureAfter` | List journeys with a departure (first leg) after this date | ✅ | [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/date) | `new Date()`\n`results` | Max. number of results returned | ✅ | `Number` | `null`\n`interval` | Results for how many minutes after `when`/`departureAfter` | ✅ | `Number` | `null`\n`transfers` | Max. number of transfers | ✅ | `Number` | `null`\n`prices` | Add price information to journeys (spawning an additional request internally) | ❌ | `Boolean` | `true`\n\n#### Example\n\n```js\nconst berlin = '8011160' // station id\nconst vienna = { // FPTF station\n    type: 'station',\n    id: '1190100',\n    name: 'Wien'\n    // …\n}\n\noebb.journeys(berlin, vienna, { when: new Date('2019-11-02T05:00:00+02:00'), results: 1 }).then(…)\n```\n\n```js\n[\n\t{\n\t\ttype: 'journey',\n\t\tid: 'fb829242f221c309fb7fecf4fe87a7e169c084b23274d3c1d1f1a1ce2aed040b',\n\t\tlegs: [\n\t\t\t{\n\t\t\t\torigin: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '8098160',\n\t\t\t\t\tname: 'Berlin Hbf (tief)'\n\t\t\t\t},\n\t\t\t\tdestination: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '8010205',\n\t\t\t\t\tname: 'Leipzig Hbf'\n\t\t\t\t},\n\t\t\t\tdeparture: '2019-11-02T04:28:00+01:00',\n\t\t\t\tdeparturePlatform: '2',\n\t\t\t\tarrival: '2019-11-02T05:42:00+01:00',\n\t\t\t\tarrivalPlatform: '12',\n\t\t\t\thasRealtimeInformation: false,\n\t\t\t\tline: {\n\t\t\t\t\ttype: 'line',\n\t\t\t\t\tid: 'ICE 501',\n\t\t\t\t\tname: 'ICE 501',\n\t\t\t\t\tnumber: '501',\n\t\t\t\t\tproduct: {\n\t\t\t\t\t\tname: 'ICE',\n\t\t\t\t\t\tshortName: 'ICE',\n\t\t\t\t\t\tlongName: {\n\t\t\t\t\t\t\tde: 'Intercity Express',\n\t\t\t\t\t\t\ten: 'Intercity Express',\n\t\t\t\t\t\t\tit: 'Intercity express'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tmode: 'train',\n\t\t\t\t\tpublic: true,\n\t\t\t\t\toperator: {\n\t\t\t\t\t\ttype: 'operator',\n\t\t\t\t\t\tid: 'oebb',\n\t\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmode: 'train',\n\t\t\t\tpublic: true,\n\t\t\t\toperator: {\n\t\t\t\t\ttype: 'operator',\n\t\t\t\t\tid: 'oebb',\n\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\torigin: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '8010205',\n\t\t\t\t\tname: 'Leipzig Hbf'\n\t\t\t\t},\n\t\t\t\tdestination: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '5400014',\n\t\t\t\t\tname: 'Praha hl.n.'\n\t\t\t\t},\n\t\t\t\tdeparture: '2019-11-02T05:54:00+01:00',\n\t\t\t\tdeparturePlatform: '15',\n\t\t\t\tarrival: '2019-11-02T09:26:00+01:00',\n\t\t\t\tarrivalPlatform: null,\n\t\t\t\thasRealtimeInformation: false,\n\t\t\t\tline: {\n\t\t\t\t\ttype: 'line',\n\t\t\t\t\tid: 'EC 259',\n\t\t\t\t\tname: 'EC 259',\n\t\t\t\t\tnumber: '259',\n\t\t\t\t\tproduct: {\n\t\t\t\t\t\tname: 'EC',\n\t\t\t\t\t\tshortName: 'EC',\n\t\t\t\t\t\tlongName: {\n\t\t\t\t\t\t\tde: 'Eurocity',\n\t\t\t\t\t\t\ten: 'Eurocity',\n\t\t\t\t\t\t\tit: 'eurocity'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tmode: 'train',\n\t\t\t\t\tpublic: true,\n\t\t\t\t\toperator: {\n\t\t\t\t\t\ttype: 'operator',\n\t\t\t\t\t\tid: 'oebb',\n\t\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmode: 'train',\n\t\t\t\tpublic: true,\n\t\t\t\toperator: {\n\t\t\t\t\ttype: 'operator',\n\t\t\t\t\tid: 'oebb',\n\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\torigin: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '5400014',\n\t\t\t\t\tname: 'Praha hl.n.'\n\t\t\t\t},\n\t\t\t\tdestination: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '5400202',\n\t\t\t\t\tname: 'Breclav'\n\t\t\t\t},\n\t\t\t\tdeparture: '2019-11-02T09:50:00+01:00',\n\t\t\t\tdeparturePlatform: null,\n\t\t\t\tarrival: '2019-11-02T12:52:00+01:00',\n\t\t\t\tarrivalPlatform: null,\n\t\t\t\thasRealtimeInformation: false,\n\t\t\t\tline: {\n\t\t\t\t\ttype: 'line',\n\t\t\t\t\tid: 'EC 277',\n\t\t\t\t\tname: 'EC 277',\n\t\t\t\t\tnumber: '277',\n\t\t\t\t\tproduct: {\n\t\t\t\t\t\tname: 'EC',\n\t\t\t\t\t\tshortName: 'EC',\n\t\t\t\t\t\tlongName: {\n\t\t\t\t\t\t\tde: 'Eurocity',\n\t\t\t\t\t\t\ten: 'Eurocity',\n\t\t\t\t\t\t\tit: 'eurocity'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tmode: 'train',\n\t\t\t\t\tpublic: true,\n\t\t\t\t\toperator: {\n\t\t\t\t\t\ttype: 'operator',\n\t\t\t\t\t\tid: 'oebb',\n\t\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmode: 'train',\n\t\t\t\tpublic: true,\n\t\t\t\toperator: {\n\t\t\t\t\ttype: 'operator',\n\t\t\t\t\tid: 'oebb',\n\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\torigin: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '5400202',\n\t\t\t\t\tname: 'Breclav'\n\t\t\t\t},\n\t\t\t\tdestination: {\n\t\t\t\t\ttype: 'station',\n\t\t\t\t\tid: '8103000',\n\t\t\t\t\tname: 'Wien Hbf'\n\t\t\t\t},\n\t\t\t\tdeparture: '2019-11-02T12:55:00+01:00',\n\t\t\t\tdeparturePlatform: null,\n\t\t\t\tarrival: '2019-11-02T13:49:00+01:00',\n\t\t\t\tarrivalPlatform: '7C-E',\n\t\t\t\thasRealtimeInformation: false,\n\t\t\t\tline: {\n\t\t\t\t\ttype: 'line',\n\t\t\t\t\tid: 'EC 103',\n\t\t\t\t\tname: 'EC 103',\n\t\t\t\t\tnumber: '103',\n\t\t\t\t\tproduct: {\n\t\t\t\t\t\tname: 'EC',\n\t\t\t\t\t\tshortName: 'EC',\n\t\t\t\t\t\tlongName: {\n\t\t\t\t\t\t\tde: 'Eurocity',\n\t\t\t\t\t\t\ten: 'Eurocity',\n\t\t\t\t\t\t\tit: 'eurocity'\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tmode: 'train',\n\t\t\t\t\tpublic: true,\n\t\t\t\t\toperator: {\n\t\t\t\t\t\ttype: 'operator',\n\t\t\t\t\t\tid: 'oebb',\n\t\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmode: 'train',\n\t\t\t\tpublic: true,\n\t\t\t\toperator: {\n\t\t\t\t\ttype: 'operator',\n\t\t\t\t\tid: 'oebb',\n\t\t\t\t\tname: 'Österreichische Bundesbahnen',\n\t\t\t\t\turl: 'https://www.oebb.at/'\n\t\t\t\t}\n\t\t\t}\n\t\t],\n\t\tprice: {\n\t\t\tcurrency: 'EUR',\n\t\t\tamount: 186.4,\n\t\t\tfirstClass: false\n\t\t}\n\t}\n]\n```\n\n# See also\n\n- [oebb-hafas](https://github.com/juliuste/oebb-hafas/) - JavaScript client for the OEBB Hafas API. Has a broader set of methods to lookup timetable information, but doesn't contain prices\n- [db-prices](https://github.com/juliuste/db-prices/) - DB (german railways) price information\n\n## Contributing\n\nIf you found a bug or want to propose a feature, feel free to visit [the issues page](https://github.com/juliuste/oebb/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpublic-transport%2Foebb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpublic-transport%2Foebb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpublic-transport%2Foebb/lists"}