Skip to content
Scrappa Get API key
Trip.com API 1 credit / request

Trip.com Coach Search API Documentation

GET https://scrappa.co/api/tripcom/buses/search

Trip.com Coach Search API Documentation Search coach journeys for one day. Each coach has an id, local departure and arrival times in ISO 8601, duration, changes, both stations and the cheapest fare when Trip.com shows one. Codes are coach station codes such as GBLONGGE or city codes such as GB1594 (London) and GB1677 (Manchester) from the Train Stations endpoint in coach mode. A pair or date without coaches returns an empty list and costs nothing. has_more is true when Trip.com has more coaches on a next page; only the first page is returned. One way only. Cost: 1 credit per successful call. Failed calls cost 0.

Trip.com Coach Search API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/tripcom/buses/search
Auth header
x-api-key
Cost
1 credit / request
from = example to = example date = 2026-06-15
Response preview
200 OK
{
    "data": {
        "to": "GB1677",
        "date": "2027-03-14",
        "from": "GB1594",
        "total": 1,
        "coaches": [
            {
                "id": "s2@BUS...",
                "tags": [
                    "allowed_e_ticket",
                    "cheapest"
                ],
                "direct": true,
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

3 required parameters needed before sending a request.

2 optional filters available.

from string Required

Departure coach station or city code, e.g. GB1594 (London).

Example value example
to string Required

Arrival coach station or city code, e.g. GB1677 (Manchester).

Example value example
date string Required

Departure date, YYYY-MM-DD, today or later.

Example value 2026-06-15
currency string Optional

USD, EUR, GBP, JPY or KRW. Defaults to USD. Prices come back in this currency.

Example value USD
locale string Optional

Site language: en, en-gb, de, fr, ja, ko or zh-hk. Defaults to en.

Example value en-US

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "to": "GB1677",
        "date": "2027-03-14",
        "from": "GB1594",
        "total": 1,
        "coaches": [
            {
                "id": "s2@BUS...",
                "tags": [
                    "allowed_e_ticket",
                    "cheapest"
                ],
                "direct": true,
                "changes": 0,
                "duration": "3h 20m",
                "operator": null,
                "available": true,
                "arrival_time": "2027-03-14T13:51:00",
                "cheapest_fare": {
                    "price": 304.83,
                    "currency": "USD",
                    "booking_fee": 0,
                    "tickets_left": 172,
                    "original_price": 304.83
                },
                "train_numbers": [],
                "departure_time": "2027-03-14T10:31:00",
                "arrival_station": {
                    "code": "FR3466",
                    "name": "Paris Gare du Nord",
                    "latitude": 48.88099883257269,
                    "city_code": "PAR",
                    "longitude": 2.356107777136769,
                    "country_code": "FR"
                },
                "duration_minutes": 200,
                "departure_station": {
                    "code": "GB3467",
                    "name": "London St. Pancras International",
                    "latitude": 51.5306243,
                    "city_code": "LON",
                    "longitude": -0.1255274,
                    "country_code": "GB"
                },
                "operator_logo_url": "https://example.com/logo.png"
            }
        ],
        "currency": "USD",
        "has_more": false
    },
    "meta": {
        "billable": true,
        "endpoint_family": "bus_search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "date": [
            "A departure date is required, formatted YYYY-MM-DD."
        ]
    },
    "message": "The request validation failed"
}
503

Unexpected Upstream Format

Trip.com answered with a format Scrappa does not know. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "bus_search"
    },
    "error": {
        "code": "PARSER_DRIFT",
        "message": "Trip.com answered with an unexpected format. Please retry later."
    },
    "success": false
}
503

Upstream Unavailable

Trip.com did not answer or no capacity was free. This response is not billable. Retry later.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "bus_search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The Trip.com API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.