Station Search by Name
stationsByName(name: string)Description
Find up to 10 matching stations by partial name.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | ARGUMENT | string | YES | At least 2 characters; partial matching supported |
Code Example
javascript
import { configure, stationsByName } from "railkit";
configure(process.env.RAILKIT_API_KEY);
const result = await stationsByName("delhi");
if (result.success) {
result.data.stations.forEach((station) => {
console.log(station.name, station.code);
});
}Response Example