12go API12go.asia ↗
Search Asian train routes via the 12go.asia API. Get schedules, operators, cabin class prices, seat availability, and booking links for any travel date.
What is the 12go API?
The 12go.asia API gives developers access to Asian train availability through a single endpoint, search_trains, returning up to dozens of train options per query with departure and arrival times, operator names, train numbers, per-cabin-class pricing, seat counts, and direct booking links. It covers routes across Central Asia, Southeast Asia, and beyond, using the same city and station slugs found in 12go.asia URLs.
curl -X GET 'https://api.parse.bot/scraper/4a0760ad-93e6-4a2b-9d1e-3c0b2186d641/search_trains?date=2026-07-28&origin=tashkent-central&destination=samarkand' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace 12go-asia-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: 12Go Asia train search SDK — bounded, re-runnable."""
from parse_apis.api_12go_asia_api import TwelveGo, RouteNotFound
client = TwelveGo()
# Search trains from Tashkent to Samarkand for a specific date
for train in client.trains.search(origin="tashkent-central", destination="samarkand", date="2026-07-21", limit=3):
print(train.departure_time, train.operator, train.train_number)
for p in train.prices:
print(f" {p.class_}: {p.amount} {p.currency} (bookable={p.is_bookable})")
# Handle a route that doesn't exist
try:
result = client.trains.search(origin="nowhere-city", destination="samarkand", date="2026-07-21", limit=1).first()
print(result.operator if result else "no trains")
except RouteNotFound as e:
print(f"route not found: {e.origin} -> {e.destination}")
print("exercised: trains.search")
Search train routes between two stations on a given date. Returns all available trains with departure/arrival times, operator and train number, prices per cabin class, seat availability, and a booking link. Results are a single-page list of all trains for that date.
| Param | Type | Description |
|---|---|---|
| daterequired | string | Travel date in ISO format YYYY-MM-DD. |
| originrequired | string | Origin station or city slug as used in the 12go.asia URL path (e.g. 'tashkent-central', 'bangkok', 'hanoi'). |
| destinationrequired | string | Destination station or city slug as used in the 12go.asia URL path (e.g. 'samarkand', 'chiang-mai', 'ho-chi-minh'). |
{
"type": "object",
"fields": {
"total": "integer count of train routes found",
"trains": "array of train route objects with schedule, operator, prices, and booking link"
},
"sample": {
"data": {
"total": 45,
"trains": [
{
"prices": [
{
"class": "1st Class Seat",
"amount": 330633.6,
"currency": "UZS",
"is_bookable": true,
"available_seats": 34
},
{
"class": "2nd Class Seat",
"amount": 220085.8,
"currency": "UZS",
"is_bookable": true,
"available_seats": 34
}
],
"operator": "Nasaf",
"booking_url": "https://12go.asia/en/train/tashkent-central/samarkand?date=2026-07-21",
"arrival_time": "2026-07-21 12:11:00",
"train_number": "716Ф",
"departure_time": "2026-07-21 08:58:00",
"origin_station": "Tashkent",
"duration_minutes": 193,
"destination_station": "Samarkand"
}
]
},
"status": "success"
}
}About the 12go API
What the API returns
The search_trains endpoint accepts three required parameters — origin, destination, and date — and returns a total count plus a trains array. Each object in the array includes the train operator, train number, departure and arrival times, available cabin classes with per-class pricing, current seat availability, and a booking link pointing directly to the 12go.asia checkout for that service.
Station and city slugs
Both origin and destination take slugs that mirror the path segments used in 12go.asia URLs. For example, searching Tashkent Central to Samarkand uses tashkent-central and samarkand. Checking the 12go.asia URL for a route is the reliable way to confirm the correct slug before querying. The date parameter takes a standard ISO 8601 string (YYYY-MM-DD).
Coverage and result shape
Results are returned as a single flat list of all trains available on that date — there is no pagination. The response distinguishes between cabin classes (e.g. economy, business, sleeper variants) and reflects price differences across those classes within the same train. Seat availability is included per train, so downstream apps can filter or surface only services with confirmed open seats.
Use in booking and planning tools
Because each train object includes a direct booking URL, the API is straightforward to use in itinerary builders or fare-comparison tools: retrieve the full train list, display schedules and prices by class, and route the user to 12go.asia to complete the transaction.
The 12go API is a managed, monitored endpoint for 12go.asia — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when 12go.asia changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official 12go.asia API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Compare cabin class prices across all trains on a given Tashkent–Samarkand route
- Build a fare calendar by querying search_trains for consecutive dates and aggregating price fields
- Filter available trains by seat count before surfacing results to end users
- Populate itinerary planners with departure/arrival times and operator details for Asian rail legs
- Generate booking deep-links for affiliate or travel aggregator sites using the booking URL returned per train
- Alert travelers when price or availability changes on a specific train route and date
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does 12go.asia have an official developer API?+
What does search_trains return beyond basic schedule data?+
trains array includes the operator name, train number, departure and arrival times, a breakdown of available cabin classes with individual prices for each, current seat availability, and a direct booking link. The endpoint returns all trains for the requested date in a single response with no pagination.Does the API cover bus, ferry, or flight options also listed on 12go.asia?+
search_trains endpoint. 12go.asia also lists buses, ferries, and flights for many of the same city pairs. You can fork this API on Parse and revise it to add endpoints for those transport modes.Can I query routes for multiple dates in one call?+
search_trains call is scoped to a single date value. To build a multi-date fare view you would need one request per date. You can fork this API on Parse and revise it to add a batch-date endpoint that loops over a date range.Are there routes outside Central Asia and Southeast Asia covered?+
trains array. For any specific corridor, verifying the correct station slugs from 12go.asia URLs before querying is recommended.