Trip.com hotel listings, prices, ratings, train routes and attraction offers across regional storefronts, one row per entity.
Search Trip.com hotels, trains and attractions
Request schema
Destination. City or region to search, for example Bangkok or Tokyo. Leave it empty if you fill in City ID.
City ID. Optional Trip.com city id (for example Bangkok = 359). Use it instead of Destination, or together with it for more precise hotel results.
Travel service. Choose hotels, trains or attractions. Flights, cars and packages are not available.
Max rows per input (each listed URL, ID or keyword; a single target counts as one input). All row types share this allowance. Each plan caps the rows of one request (BASIC 10, PRO 70, ULTRA 200, MEGA 500); larger values are lowered to your plan's cap. You pay per delivered row (Rows).
Check-in date. Hotels: check-in date (year-month-day). Leave empty to search 21 days from today.
Check-out date. Hotels: check-out date (year-month-day). Leave empty for a two-night stay.
Adults. Number of adult travelers
Children. Number of children
Rooms. Number of hotel rooms
Train departure date. Optional train search date in YYYY-MM-DD format. Published route offers are not guaranteed to match this date.
Trip.com Domain. Regional Trip.com host (e.g. www.trip.com, ph.trip.com, uk.trip.com, jp.trip.com).
Currency. Requested currency code, such as USD or GBP. Set it explicitly when changing regional domains.
Locale. Language setting, such as en_US or en_GB. Set it explicitly when changing regional domains.
Hotel sorting. Hotel result ordering preference, such as RECOMMENDED. Available ordering depends on the selected search.
Include Sponsored Ads. Include sponsored ad cards in results
Include listing details. Add available public hotel contacts and address details, or attach available attraction offers to the listing row. Off by default; additional details are not guaranteed.
Train origin. Departure city for a train route, such as Tokyo. Use with destination and service set to trains.
Return date (reserved). Reserved setting. Leave empty for the supported travel services.
Trip type (reserved). Reserved setting. Keep the default for the supported travel services.
Optional. Your id for this request: repeating it while the job runs returns the same job.
Response schema
{
"allOf": [
{
"type": "object",
"properties": {
"jobId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"queued",
"running",
"succeeded",
"partial",
"failed",
"cancelled"
]
},
"done": {
"type": "boolean"
},
"rowsAvailable": {
"type": "integer"
},
"rowsDelivered": {
"type": "integer",
"description": "Rows already delivered (and billed) to you for this job."
},
"rowsLimit": {
"type": "integer",
"description": "Most rows this job can deliver."
},
"estimatedFinishSec": {
"type": "integer",
"description": "While running: estimated seconds until done."
},
"statusUrl": {
"type": "string"
},
"resultsUrl": {
"type": "string"
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"retentionHours": {
"type": "integer"
},
"error": {
"$ref": "#/components/schemas/ErrorDetail"
}
}
},
{
"type": "object",
"properties": {
"offset": {
"type": "integer"
},
"nextOffset": {
"type": "integer"
},
"hasMore": {
"type": "boolean"
},
"rowCount": {
"type": "integer"
},
"rowsBilled": {
"type": "integer",
"description": "Rows delivered by this response."
},
"rows": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Row"
}
},
"meta": {
"type": "object",
"additionalProperties": true
}
}
}
]
}Easiest way: the APIHub CLI. Credits cover x402, no wallet needed.
# install and set up once
npx @apihubio/cli register
npx @apihubio/cli topup 10
# call this service
npx @apihubio/cli call "https://proxy.apihub.io/trip-com/v1/search" \
-d '{"destination":"Bangkok","regionId":"example regionId","service":"hotels","maxResults":3,"checkin":"example checkin","checkout":"example checkout","adults":2,"children":0,"rooms":1,"departureDate":"example departureDate","domain":"www.trip.com","currency":"USD","locale":"en_US","sort":"RECOMMENDED","includeSponsored":false,"enrichDetails":false,"origin":"example origin","returnDate":"example returnDate","tripType":"oneway","requestId":"example requestId"}'Or call the proxy directly (curl / any HTTP client):
curl -X POST https://proxy.apihub.io/trip-com/v1/search \
-H "Authorization: Bearer ahk_your_key" \
-H "Content-Type: application/json" \
-d '{"destination":"Bangkok","regionId":"example regionId","service":"hotels","maxResults":3,"checkin":"example checkin","checkout":"example checkout","adults":2,"children":0,"rooms":1,"departureDate":"example departureDate","domain":"www.trip.com","currency":"USD","locale":"en_US","sort":"RECOMMENDED","includeSponsored":false,"enrichDetails":false,"origin":"example origin","returnDate":"example returnDate","tripType":"oneway","requestId":"example requestId"}'
# If credits available: charged automatically, returns 200
# Otherwise: returns 402 (pay via @x402/fetch or top up credits)Estimate your monthly cost for Trip.com Hotels Trains and Attractions Data.