Discover/12go API
live

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.

This API takes change requests — .
Endpoint health
verified 11h ago
search_trains
1/1 passing latest checkself-healing
Endpoints
1
Updated
14h ago

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.

Try it
Travel date in ISO format YYYY-MM-DD.
Origin station or city slug as used in the 12go.asia URL path (e.g. 'tashkent-central', 'bangkok', 'hanoi').
Destination station or city slug as used in the 12go.asia URL path (e.g. 'samarkand', 'chiang-mai', 'ho-chi-minh').
api.parse.bot/scraper/4a0760ad-93e6-4a2b-9d1e-3c0b2186d641/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
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'
Python SDK · recommended

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")
All endpoints · 1 totalmissing one? ·

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.

Input
ParamTypeDescription
daterequiredstringTravel date in ISO format YYYY-MM-DD.
originrequiredstringOrigin station or city slug as used in the 12go.asia URL path (e.g. 'tashkent-central', 'bangkok', 'hanoi').
destinationrequiredstringDestination station or city slug as used in the 12go.asia URL path (e.g. 'samarkand', 'chiang-mai', 'ho-chi-minh').
Response
{
  "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.

Reliability & maintenanceVerified

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.

Last verified
11h ago
Latest check
1/1 endpoint passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • 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
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does 12go.asia have an official developer API?+
12go.asia does not publish a public developer API or documentation portal. This Parse API provides structured access to train search data from the 12go.asia platform.
What does search_trains return beyond basic schedule data?+
Each entry in the 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?+
Not currently. The API covers train routes only, as returned by the 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?+
No, each 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?+
Coverage follows what 12go.asia lists for train travel across Asia broadly — including routes in Uzbekistan, Vietnam, Thailand, and other countries where the platform operates. Routes in regions where 12go.asia has no inventory will return an empty trains array. For any specific corridor, verifying the correct station slugs from 12go.asia URLs before querying is recommended.
Page content last updated . Spec covers 1 endpoint from 12go.asia.
Related APIs in TravelSee all →
rome2rio.com API
Find and compare train routes between cities worldwide, instantly viewing travel duration, number of stops, carrier information, ticket prices, and direct booking links. Streamline your train journey planning by accessing comprehensive route options and pricing in one place.
enquiry.indianrail.gov.in API
Search for trains between Indian stations, check schedules, and look up station details to plan your rail journeys. Get real-time train information with support for captcha-protected searches to ensure reliable access to Indian Railways data.
railyatri.in API
Search trains between stations and get real-time information including live train status, timetables, seat availability, and PNR confirmation details. Find the perfect journey by autocompleting station and train names while checking current availability and train schedules.
thetrainline.com API
Search UK train stations and find the cheapest fares across date ranges, then generate direct booking links to complete your purchase on Trainline.com. Get real-time journey information to compare prices and book your tickets in seconds.
amtrak.com API
Search for Amtrak trains across stations, compare fares, and discover discounts to plan your rail journey with current pricing and availability. Get detailed train information, autocomplete station names, and find the cheapest routes for your travel dates.
omio.com API
Search and compare train, bus, and flight trips across multiple providers in real-time, with detailed pricing breakdowns and the ability to view fares across different dates. Find the best deals by exploring popular destinations, autocompleting location searches, and analyzing price variations to plan your ideal journey.
trainline.eu API
Search for train stations and routes across the UK and Europe, then find and compare available journeys with schedules and pricing. Book your ideal train trip by accessing real-time travel options directly from Trainline.com.
redbus.in API
Search and explore bus and train services on redBus.in. Look up city and station suggestions, find available routes, check schedules, and view seat layouts and fare details.