Search code examples
androidmobile

Any Public API for IRCTC to check PNR Status and Seat Availability?


I'm working on an Android application to check PNR status and seat availability. So is there any public API for getting this information?

I tried many API, but most of them are not working.


Solution

  • Have you tried https://rapidapi.com/IRCTCAPI/api/irctc1 ?

    They have some sample examples also,

    const axios = require("axios");
    
    const options = {
      method: 'GET',
      url: 'https://irctc1.p.rapidapi.com/api/v1/getPNRStatus',
      params: {pnrNumber: 'xxxxxxxxxx'},
      headers: {
        'X-RapidAPI-Host': 'irctc1.p.rapidapi.com',
        'X-RapidAPI-Key': 'YOUR KEY'
     }
    };
    
    axios.request(options).then(function (response) {
    console.log(response.data);
    }).catch(function (error) {
    console.error(error);
    });
    

    Note please use your key in X-RapidAPI-Key

    Apart from PNR and Seat availability they some more useful API's.