GATI DRISHTI
API Documentation
The GATI DRISHTI REST API allows you to build custom railway logistics apps, power station display boards, and automate freight operations. Our endpoints are fully CORS-enabled and support high-throughput polling.
Search Stations
Search for railway stations across India by name or station code. Returns a comprehensive list of matching nodes.
/api/stations/search?q={query}{
"success": true,
"data": [
{
"name": "NEW DELHI",
"code": "NDLS",
"state": "Delhi",
"zone": "NR",
"latitude": 28.642512,
"longitude": 77.21832,
"isJunction": false,
"routeCount": 0
}
]
}Station Details
Get detailed information about a specific railway station using its unique station code.
/api/stations/{id}{
"success": true,
"data": {
"name": "NEW DELHI",
"code": "NDLS",
"state": "Delhi",
"zone": "NR",
"latitude": 28.642512,
"longitude": 77.21832,
"isJunction": false,
"routeCount": 0
}
}{
"success": false,
"error": "Station not found"
}Real-Time Train Telemetry
Retrieves live geospatial location, precise delays, and full route node data. Automatically switches between origin-departure logic and mid-journey tracking schemas.
/api/trains/{id}/live{
"success": true,
"data": {
"trainNumber": "12002",
"currentStation": "BINA JN",
"nextStation": "BHOPAL JN",
"delayMinutes": 0,
"progressPercentage": 80,
"expectedArrival": "14:40",
"lastUpdated": "Crossed SORAI~ at 13:36",
"route": [
{ "code": "NDLS", "name": "NEW DELHI", "status": "COMPLETED" },
{ "code": "BINA", "name": "BINA JN", "status": "CURRENT" },
{ "code": "RKMP", "name": "RANI KAMLAPATI", "status": "UPCOMING" }
]
}
}Predictive ETA Intelligence
Queries the GATI DRISHTI inference engine. Returns an AI-generated ETA taking into account cascading network delays, weather, and historical junction bottlenecks.
/api/trains/{id}/eta{
"success": true,
"data": {
"trainNumber": "12002",
"prediction": {
"expectedDelayMinutes": 12,
"confidenceScore": 89,
"riskLevel": "LOW",
"factors": [
{ "factor": "Network Congestion", "impact": "High" }
]
}
}
}Historical Delay Variance
Aggregates performance over the last 30 journeys, outputting median delays per station to identify chronic infrastructure bottlenecks.
/api/trains/{id}/history{
"success": true,
"data": {
"trainNumber": "12002",
"onTimePercentage": 82,
"avgDelayOverall": 14,
"bottlenecks": [
{ "station": "MTJ", "avgDelay": 18, "recoveryRate": 0.4 }
]
}
}Global Network Congestion
Provides a live socket-like snapshot of severe network events, speed restrictions, and track maintenance overriding normal operations.
/api/network/alerts{
"success": true,
"data": [
{
"id": "alert-772",
"type": "HIGH",
"node": "ST",
"message": "Major congestion detected at Surat Junction.",
"timestamp": "2026-09-06T07:54:00.000Z"
}
]
}Event-Driven Webhooks
Registers a target URL to receive push events when a specified train crosses a threshold delay (e.g., > 30 mins).
/api/webhooks/subscribe{
"success": true,
"webhookId": "wh_99x82jf",
"status": "Active"
}{
"success": false,
"error": "Invalid target URL payload."
}Authentication
Currently, all prototype APIs operate in Open Mode for SIH 2026 integration testing.
Authorization: Bearer <YOUR_API_KEY>Will be strictly enforced in production.