Railway Engine
Railway Engine
DocsDashboardPricingContact

Getting Started

IntroductionGetting StartedAuthenticationRate Limits & Honesty

Live Train

Live StatusGETScheduleGETRouteGET

Search

Train SearchGETStation by CodeGETStation SearchGETStation Live BoardGET

Train Details

Coach CompositionGETFare EnquiryGETPlatform NumbersGET

Booking

PNR StatusGET

System

HealthGETVersionGETCoverageGETProvider HealthGET

Tools

Playground

Reference

Errors & Status Codes

Search Stations

GETGET /v1/stations/search?q=&limit=

Description

Find stations by partial name or code. Returns matching station records with coordinates and the result count.

Parameters

NameInTypeRequiredDescription
qQUERYstringYESQuery param — partial station name or code, e.g. delhi.
limitQUERYnumberNOQuery param — maximum number of results to return.

Code Example

javascript
const res = await fetch(
  "https://railway-engine.apkscope.workers.dev/v1/stations/search?q=delhi&limit=5",
  { headers: { "x-api-key": "YOUR_KEY" } },
);

const { status, data, error } = await res.json();
if (status === "SUCCESS") {
  console.log(data.count, "matches");
  for (const station of data.results) {
    console.log(station.code, station.name, station.zone);
  }
} else {
  console.error(status, error?.code, error?.message);
}

Notes

Errors: 400 INVALID_REQUEST (missing or too-short q), 404 NOT_FOUND when nothing matches, 429 RATE_LIMITED. Each result uses the same shape as GET /v1/station/:code.

Response Example

JSON response
200JSON