Rejseplanen har lanceret et nyt API, 2.0. API'et er, ligesom det gamle, et RESTful interface.
Brugere af API 1.0 har indtil den 4. december til at migrere til API 2.0, hvorefter API 1.0 bliver lukket.
Gå til:
Adgang til Rejseplanens API
For at vi fortsat kan drifte API'et, og holde det så åbent som muligt, har vi indført følgende kvoter for kald til API'et:
- Ikke-kommercielt brug:
- 50.000 kald per måned gratis
- Mere end 50.000 kald anses som kommercielt brug
- Kommercielt brug:
- 100.000 kald per dag for 5.000 EUR om året + et mindre servicegebyr
- 200.000 kald per dag for 8.500 EUR om året + et mindre servicegebyr
Kommercielt brug af API’et er defineret som at sælge data fra API’et, eller at sælge en service som benytter data fra API’et.
Hvis ingen af de nævnte muligheder passer til dit behov, vil vi stadig meget gerne samarbejde med dig om at finde en løsning.
Hvis du som leverandør skal bruge Rejseplanens API på vegne af en kunde, er det din kunde, som skal anmode om adgang.
Du kan læse mere om hvordan du får adgang til API 2.0 her.
Funktionalitet, services og WADL
API 2.0 indeholder samme funktionalitet som API 1.0 - og meget mere.
Nedenfor er en liste over alle funktioner og services i API 2.0.
Ved at trykke på en service får du vist det tilhørende WADL-skema.
Søg på adresser, interessepunkter, stationer og stoppesteder
The addresslookup service returns a list of possible addresses around a given center coordinate. You can filter by type to check for station, address, POI or any combination.
The location.data service returns locations in a certain ID range. You can specify if the service should return attributes, infotexts or product information.
The location.details service returns details of a specific location.
The location.nearbystops service returns a list of stops around a given center coordinate (within a radius of 1000m). The returned results are ordered by their distance to the center coordinate.
The location.search service returns filtered locations.
The location.name service can be used to perform a pattern matching of user input and to retrieve a list of possible matches in the journey planner database. Possible matches might be stops/stations, points of interest and addresses.
The location.boundingbox service returns all stops in a bounding box.
Rejsesøgning og rejseforslag inkl. priser, billetter og zoner (Tariff)
The trip service calculates a trip from a specified origin to a specified destination. These might be stop/station IDs or coordinates based on addresses and points of interest validated by the location service or coordinates freely defined by the client.
The interval trip search service calculates trips from a specified origin to a specified destination in a time interval starting at a given date and time.
Reconstructing a trip can be achieved using the reconstruction context provided by any trip result in the ctxRecon attribute of Trip element. The result will be a true copy of the original trip search result given that the underlying data did not change.
Søg på linje- og tognummer
The lineinfo service will deliver information about a certain line identified by its line ID on a specific date. It returns a list (LineList) along with the product information and representative line journeys.
Returns a list (LineList) of matched lines.
The lineschedules service will deliver information about a certain line identified by its line ID on a specific date. It returns a list (LineList) along with the product information and all line journeys and times running on the given date.
The linesearch service will deliver information about all lines of a given operator. It returns a list (LineList) of matched lines.
The trainSearch service will deliver information about the route of a journey if it is matched by any of the given criteria. It returns a list (JourneyDetailList) of matched journeys with as many details as possible. The stop list will only contain the first and last stop. If you need more details or the complete stop list, take the JourneyDetail@ref and put it to Journey Detail Service.
Rejsedetaljer
The gisroute service takes a GIS reference as provided by a Trip result like this and delivers a routing graph, routing instructions as well as distance information.
The himSearch service will deliver a list of HIM messages (real-time messages) if matched by the given criteria and affected products if any.
The journeyDetail service will deliver information about the complete route of a vehicle. The journey identifier is part of a trip or departureBoard response. It contains a list of all stops/stations of this journey including all departure and arrival times (with real-time data if available) and additional information like specific attributes about facilities and other texts.
The journeyMatch service will deliver information about the complete route of a journey if it is matched by any of the given criteria. It only returns details about the first matched journey. If you need all matching journeys with fewer details, please refer to the Train Search service. The journeyMatch service returns the same structure as the Journey Detail Service.
The journey position service delivers real-time position information for given journeys inside a map region. The region is required and is defined via a bounding box. Results can be filtered by operators, products and lines as well as further criteria.
Afgangs- og ankomsttavler
The default duration size is always 60 minutes.
Note: The result list always contains all arrivals/departures running at the last minute even if the requested maximum was overrun. All arrivals/departures are mixed into one single list.
This method will return the next arrivals from a given point in time within a duration-covered period.
This method will return the next departures from a given point in time within a duration-covered period.
Arrival boards for multiple stations can be retrieved by a call to the multiArrivalBoard service. This method will return the next arrivals from a given point in time within a duration-covered period.
Departure boards for multiple stations can be retrieved by a call to the multiDepartureBoard service. This method will return the next departures from a given point in time within a duration-covered period.
Arrival boards for stations in a certain radius near a given coordinate can be retrieved by a call to the nearbyArrivalBoard service. This method will return the next arrivals from a given point in time within a duration-covered period.
Departure boards for stations in a certain radius near a given coordinate can be retrieved by a call to the nearbyDepartureBoard service. This method will return the next departures from a given point in time within a duration-covered period.
Pris-, billet- og zonedetaljer (Tariff)
The convert zones service returns tariff details for a specified tariff context.
A service for checking season passes in SELF.
The method calculates the daily prices for a zonal season pass (i.e. short distance) for all possible numbers of zones (and business class zones) and passenger types. The daily price for a passenger type is defined by the Rejsekort EOD version (based on the date), the fare set and the number of zones (and business class zones).
The service returns prices for all zone distances available in the Rejsekort EOD for the fare set (i.e., also for distances above the short distance threshold). This service is designed for Takst Sjælland. Technically it can be used for the Takst Vest fare sets but it is probably not needed there as no zonal tickets are available.
This service calculates the price and validity zones for season pass products based on the origin and destination addresses/stop points.
This service calculates the price per day for an adult season pass in the specified fare set, on the specified date for the given number of zones (or zone distance).
This service calculates the price and validity zones for season pass products based on the journey reconstruction context from a previous request.
Calculate the refund value of an existing season pass.
This service determines the fare set for several zones and checks if all zones are connected and if there is any metro zone among them.
This service returns a list of routes, each based on one or more journeys. It requires origin and destination stops to be passed in. This service uses a TripSearch.
This service returns a list of routes, each based on one or more journeys. It requires the origin stop number to be passed in. This service uses a TariffSearch "stRoutes".
This service returns a list of tariff zones and associated stops with additional information according to the specified mode. Only mode "DSB" is supported.
This service returns the "default" stop (stop number and name) for the given zone.
This service returns the zone the given coordinate is in.
Generel info om Rejseplanens data
This service provides detailed information about all operators, administrations, products and product categories loaded by the underlying server. Most of the values are usable in various services as filter options.
This service provides detailed information about all data sets (pools) loaded by the underlying server. Each pool carries an ID, date, and time of its physical creation and its type. The type can be ST for station, ADR for addresses and POI for point of interest. If a type can not be determined, the value will be U. In the case of an ST-typed pool, the validity period is returned with the beginning and end date as well.
XSD
XSD'er, der beskriver alle servicesvar, kan findes her.