Core concepts

Requests and billing

Plans, per-request costs, and batches.

How requests are counted

  • Each plan includes a number of requests a month. Most requests count as 1; the table below lists every cost.
  • Only successful 2xx responses are counted. A request that fails, for any reason, is free. A batch or comparison that succeeds is counted at the size it asked for, even when some of its items fail inside the response.
  • The response headers keep their older name: X-RailCore-Credits-Cost is what this request counted as and X-RailCore-Credits-Remaining the requests left. One credit is one request.
  • When the month's requests run out, requests answer 402 CREDITS_EXHAUSTED until the plan renews or you change plan.

Plans

Monthly list prices in Indian rupees. Rate limits are on the rate limits page.

Plans: price, requests a month, price per 1,000 requests and use
PlanList priceRequests a monthPer 1,000 requestsUse
Free₹0500FreeEvaluation and personal projects
Starter₹699/month40,000₹17.48Commercial use
Growth₹2,499/month1,50,000₹16.66Commercial use
Scale₹6,499/month5,00,000₹13.00Commercial use
EnterpriseContractAgreed volumeContractCommercial use

Cost per request

Most endpoints count each request as one. The chart suite counts more because each of its requests does far more work.

Cost per request: operation, requests and plans
OperationRequestsPlans
GET/v1/stations/search1 requestAll plans
GET/v1/stations/{station_code}1 requestAll plans
GET/v1/stations/{station_code}/live1 requestAll plans
GET/v1/trains/search1 requestAll plans
GET/v1/trains/{train_number}1 requestAll plans
GET/v1/trains/{train_number}/schedule1 requestAll plans
GET/v1/trains/{train_number}/stops1 requestAll plans
GET/v1/trains/{train_number}/route1 requestAll plans
GET/v1/trains/{train_number}/coach-position1 requestAll plans
GET/v1/trains/{train_number}/live1 requestAll plans
GET/v1/routes/trains1 requestAll plans
GET/v1/journeys/search1 requestAll plans
POST/v1/journeys/compare1 request per route compared, minimum 1 requestAll plans
GET/v1/availability/seats1 requestAll plans
POST/v1/availability/seats/batch1 request per distinct class per item, minimum 1 requestAll plans
GET/v1/availability/calendar1 requestAll plans
GET/v1/availability/classes1 requestAll plans
GET/v1/fares/estimate1 requestAll plans
GET/v1/fares/search1 requestAll plans
GET/v1/fares/unreserved1 requestAll plans
GET/v1/charts/status1 requestScale and Enterprise
GET/v1/charts/vacant-berths3 requestsScale and Enterprise
GET/v1/charts/vacant-berths/hopping4 requestsScale and Enterprise
GET/v1/charts/vacant-berths/route-scan8 requestsScale and Enterprise
POST/v1/jobs/route-scan8 requestsScale and Enterprise
POST/v1/jobs/hopping4 requestsScale and Enterprise
GET/v1/jobs/{job_id}0 requestsScale and Enterprise
DELETE/v1/jobs/{job_id}0 requestsScale and Enterprise
GET/v1/jobs/{job_id}/stream0 requestsScale and Enterprise
GET/v1/jobs0 requestsScale and Enterprise

Batches and comparisons

JavaScript
// POST /v1/availability/seats/batch
// 1 request per distinct class per item, minimum 1 request. Classes compare case-insensitively,
// so a class repeated in one item counts once. An item without classes,
// or with an empty list, is checked in 4 default classes.
const distinctClasses = (classes) => new Set(classes.map((code) => String(code).trim().toUpperCase())).size;
const classRequests = items.reduce((total, item) => total + (item.classes?.length ? distinctClasses(item.classes) : 4), 0);
const batchCalls = Math.max(1, classRequests);

// POST /v1/journeys/compare
// 1 request per route compared, minimum 1 request.
const compareCalls = Math.max(1, journeys.length);

The largest batch, 25 items with 8 classes each, counts as 200 requests. Comparing 5 routes counts as 5 requests.

The cost is worked out from the request body before any lookup runs. A batch or comparison that answers 200 is counted at that size: an item or route that fails inside the response still counts, and nothing is given back for it. A request refused as a whole (4xx or 5xx) is free. Ask only for the classes you need.

Settlement rules

2xx

Counted. X-RailCore-Credits-Cost and X-RailCore-Credits-Remaining report the requests counted and left.

4xx or 5xx

Not counted.

402

Too few requests are left to cover this one. Nothing is fetched.

503 METERING_UNAVAILABLE

A successful live result is withheld because the request could not be counted.

Async jobs

Submission is counted when accepted, and stays counted if the job later fails or is cancelled. Polling, listing, streaming and cancelling count as 0 requests.

Last updated