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.

v2.1.0-beta
99.9% Uptime
Open CORS

Search Stations

Directory API

Search for railway stations across India by name or station code. Returns a comprehensive list of matching nodes.

GET/api/stations/search?q={query}
Simulation Sandbox
200Success (Example)
application/json
{
  "success": true,
  "data": [
    {
      "name": "NEW DELHI",
      "code": "NDLS",
      "state": "Delhi",
      "zone": "NR",
      "latitude": 28.642512,
      "longitude": 77.21832,
      "isJunction": false,
      "routeCount": 0
    }
  ]
}

Station Details

Directory API

Get detailed information about a specific railway station using its unique station code.

GET/api/stations/{id}
Simulation Sandbox
200Success (Example)
application/json
{
  "success": true,
  "data": {
    "name": "NEW DELHI",
    "code": "NDLS",
    "state": "Delhi",
    "zone": "NR",
    "latitude": 28.642512,
    "longitude": 77.21832,
    "isJunction": false,
    "routeCount": 0
  }
}
404Not Found (Example)
application/json
{
  "success": false,
  "error": "Station not found"
}

Real-Time Train Telemetry

Core API

Retrieves live geospatial location, precise delays, and full route node data. Automatically switches between origin-departure logic and mid-journey tracking schemas.

GET/api/trains/{id}/live
Simulation Sandbox
200Success (Example)
application/json
{
  "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

AI Engine

Queries the GATI DRISHTI inference engine. Returns an AI-generated ETA taking into account cascading network delays, weather, and historical junction bottlenecks.

GET/api/trains/{id}/eta
Simulation Sandbox
200Success (Example)
application/json
{
  "success": true,
  "data": {
    "trainNumber": "12002",
    "prediction": {
      "expectedDelayMinutes": 12,
      "confidenceScore": 89,
      "riskLevel": "LOW",
      "factors": [
        { "factor": "Network Congestion", "impact": "High" }
      ]
    }
  }
}

Historical Delay Variance

Analytics

Aggregates performance over the last 30 journeys, outputting median delays per station to identify chronic infrastructure bottlenecks.

GET/api/trains/{id}/history
Simulation Sandbox
200Success (Example)
application/json
{
  "success": true,
  "data": {
    "trainNumber": "12002",
    "onTimePercentage": 82,
    "avgDelayOverall": 14,
    "bottlenecks": [
      { "station": "MTJ", "avgDelay": 18, "recoveryRate": 0.4 }
    ]
  }
}

Global Network Congestion

Core API

Provides a live socket-like snapshot of severe network events, speed restrictions, and track maintenance overriding normal operations.

GET/api/network/alerts
Simulation Sandbox
200Success (Example)
application/json
{
  "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

Integration

Registers a target URL to receive push events when a specified train crosses a threshold delay (e.g., > 30 mins).

POST/api/webhooks/subscribe
Simulation Sandbox
201Created (Example)
application/json
{
  "success": true,
  "webhookId": "wh_99x82jf",
  "status": "Active"
}
400Bad Request (Example)
application/json
{
  "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.