comboios icon indicating copy to clipboard operation
comboios copied to clipboard

Comboios de Portugal (CP, Portugese Railways) API client.

comboios

JavaScript client for the Portugese 🇵🇹 Comboios de Portugal (CP) railway API. Complies with the friendly public transport format. Inofficial, using CP endpoints. Ask them for permission before using this module in production.

npm version Build Status license

Installation

npm install comboios

Usage

const comboios = require('comboios')

This package contains data in the Friendly Public Transport Format.

  • stations() - to get a list of operated stations such as Lisboa - Oriente or Viana do Castelo
  • journeys(origin, destination, opt) - to get routes between stations
  • stopovers(station, opt) - to get departures and arrivals at a given station
  • trip(id) - to get all stopovers for a given trip (train)

See also

Contributing

If you found a bug or want to propose a feature, feel free to visit the issues page.