Integrating search train API

I’m currently working on a travel companion project, and so I need to fetch data for both direct and indirect trains between stations in India. During my research, I couln’t find any apis or ways that meets my requirements with its direct train search and via station indirect train search features.

I’m reaching out to see if anyone knows of any APIs or methods to fulfill my needs.

Any advice or recommendations would be greatly appreciated!

Thanks in advance!