Indonesian Train Schedule - Jadwal Kereta

FREE
By jadwalkeretaapi
Updated 5 months ago
Travel
5.6/10
Popularity Score
12320ms
Latency
100%
Success Rate

Indonesian Train Schedule - Jadwal Kereta API Documentation

This API is free to use as we host it in free appharbor. You can add up to your 5 favorite origin-destination. We get the data from tiket.kereta-api.co.id. So as long as we do not violate their rules, you can still have the data.

View API Details
GETGet schedule
GETGet schedule

Get Schedule

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
regstasiunNUMBER
REQUIREDAfter register you can add up to 5 origin-destination, this example I Use Surabaya to Madiun
tanggalNUMBER
REQUIREDYou can input Equal or Greater than Now date with format 'YYYYMMDD'
apikeyNUMBER
REQUIREDAfter register you can get an API Key. But for the test, you can try 101487229685974604868
Optional Parameters
dewasaNUMBER
OPTIONALDefault is 1 and max is 4
infantSTRING
OPTIONALDefault is 0 and max is 4
Code Snippet
unirest.get("https://jadwalkeretaapi-indonesian-train-schedule-jadwal-kereta-v1.p.rapidapi.com/api?dewasa=1&infant=0&regstasiun=1&tanggal=20171106&apikey=101487229685974604868")
.header("X-RapidAPI-Host", "jadwalkeretaapi-indonesian-train-schedule-jadwal-kereta-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://jadwalkeretaapi-indonesian-train-schedule-jadwal-kereta-v1.p.rapidapi.com/api
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://jadwalkeretaapi-indonesian-train-schedule-jadwal-kereta-v1.p.rapidapi.com/api?dewasa=1&infant=0&regstasiun=1&tanggal=20171106&apikey=101487229685974604868")
.header("X-RapidAPI-Host", "jadwalkeretaapi-indonesian-train-schedule-jadwal-kereta-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication