
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
JavaScript module for finding the cheapest railway connections using the Deutsche Bahn Sparpreise API. Inofficial, using an endpoint by Deutsche Bahn. Ask them for permission before using this module in production.
npm install db-prices
prices() returns a Promise that will resolve with a list of offers.
const prices = require('db-prices')
prices(from, to, [date], [opt]).then(…)
from and to must be station IDs like '8000105'.
date must be a Date object; if empty, the current datetime will be used.
With opt, you can override the default options, which look like this:
{
class: 2, // 1st class or 2nd class
noICETrains: false,
transferTime: 0, // in minutes
duration: 1440, // search for routes in the next n minutes
preferFastRoutes: true,
travellers: [{ // one or more
bc: 0, // BahnCard ID (see https://gist.github.com/juliuste/202bb04f450a79f8fa12a2ec3abcd72d)
typ: "E", // E: adult: K: child; B: baby -- BUG: child and baby dont work ATM
alter: 30 // age
}],
}
The result will be a list of Friendly Public Transport Format journey objects.
With from = '8000105', to = '8011160' and date = new Date('2016-08-17T00:00:00.000Z'), the result looked like this:
[
{
type: 'journey',
id: '0',
origin: {
type: 'station',
id: '8000105',
name: 'Frankfurt(Main)Hbf'
},
destination: {
type: 'station',
id: '8098160',
name: 'Berlin Hbf (tief)'
},
legs: [{
origin: {
type: 'station',
id: '8000105',
name: 'Frankfurt(Main)Hbf'
},
departure: '2017-06-05T08:53:00.000Z',
departurePlatform: '13',
destination: {
type: 'station',
id: '8098160',
name: 'Berlin Hbf (tief)'
},
arrival: '2017-06-05T13:17:00.000Z',
arrivalPlatform: '7',
line: {
type: 'line',
id: 'ice-1537',
name: 'ICE 1537',
product: 'ICE'
}
}],
price: {
currency: 'EUR',
amount: 126,
discount: false,
name: 'Flexpreis',
description: 'Fully flexible (not bound to a specific train / not dependent on the connection indicated on the selected route). Exchanges and refunds free of charge; on or after the first day of validity subject to a fee.'
},
nightTrain: false
}
// …
]
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.
Cheers to Jannis R for contributing.
FAQs
Find the cheapest routes using the DB Sparpreise API.
The npm package db-prices receives a total of 5 weekly downloads. As such, db-prices popularity was classified as not popular.
We found that db-prices demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.