{"openapi":"3.1.0","info":{"title":"Trip.com Hotels Trains and Attractions Data (x402 & MCP)","version":"0.1.0","description":"Trip.com hotel listings, prices, ratings, train routes and attraction offers across regional storefronts, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2, charged strictly for delivered rows) and 'exact' (EIP-3009). Empty/0-row (404), invalid input (422), timeout (504), and upstream failures (502) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://x402.opendata.best"}],"paths":{"/s/trip-com/v1/search":{"post":{"operationId":"trip_com_search","summary":"Trip.com Hotels Trains and Attractions Data: Search Trip.com hotels, trains and attractions","description":"Query Trip.com hotel rates, train itineraries and attractions across global Trip.com country sites. Unit price: $0.005000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["trip-com","Travel"],"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"dynamic","currency":"USD","amount":"0.050000"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"string","description":"City or region to search, for example Bangkok or Tokyo. Leave it empty if you fill in City ID."},"regionId":{"type":"string","description":"Optional Trip.com city id (for example Bangkok = 359). Use it instead of Destination, or together with it for more precise hotel results.","pattern":"^([0-9]+)?$"},"service":{"type":"string","description":"Choose hotels, trains or attractions. Flights, cars and packages are not available.","default":"hotels","enum":["hotels","trains","attractions"]},"maxResults":{"type":"integer","description":"Maximum rows for this destination or region, from 1 to 500 (default 70); delivery also stops at your maximum run cost. Free platform plan users are limited to 200 rows per run and 10 runs of this Actor.","default":10,"minimum":1,"maximum":20},"checkin":{"type":"string","description":"Hotels: check-in date (year-month-day). Leave empty to search 21 days from today.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"checkout":{"type":"string","description":"Hotels: check-out date (year-month-day). Leave empty for a two-night stay.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"adults":{"type":"integer","description":"Number of adult travelers","default":2,"minimum":1,"maximum":10},"children":{"type":"integer","description":"Number of children","default":0,"minimum":0,"maximum":10},"rooms":{"type":"integer","description":"Number of hotel rooms","default":1,"minimum":1,"maximum":10},"departureDate":{"type":"string","description":"Optional train search date in YYYY-MM-DD format. Published route offers are not guaranteed to match this date.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"domain":{"type":"string","description":"Regional Trip.com host (e.g. www.trip.com, ph.trip.com, uk.trip.com, jp.trip.com).","default":"www.trip.com","pattern":"^(https?://)?([A-Za-z0-9-]+\\.)*trip\\.com(/.*)?$"},"currency":{"type":"string","description":"Requested currency code, such as USD or GBP. Set it explicitly when changing regional domains.","default":"USD"},"locale":{"type":"string","description":"Language setting, such as en_US or en_GB. Set it explicitly when changing regional domains.","default":"en_US"},"sort":{"type":"string","description":"Hotel result ordering preference, such as RECOMMENDED. Available ordering depends on the selected search.","default":"RECOMMENDED"},"includeSponsored":{"type":"boolean","description":"Include sponsored ad cards in results","default":false},"enrichDetails":{"type":"boolean","description":"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.","default":false},"origin":{"type":"string","description":"Departure city for a train route, such as Tokyo. Use with destination and service set to trains."},"returnDate":{"type":"string","description":"Reserved setting. Leave empty for the supported travel services.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"tripType":{"type":"string","description":"Reserved setting. Keep the default for the supported travel services.","default":"oneway","enum":["oneway","roundtrip"]}},"additionalProperties":false},"example":{"service":"hotels","destination":"Bangkok","enrichDetails":false,"maxResults":10}}}},"responses":{"200":{"description":"Synchronous data rows with x402 PAYMENT-RESPONSE receipt header.","headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 v2 SettleResponse receipt.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response_trip_com"},"example":{"jobId":"job_trip-com_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"service":"example_service","name":"example_name","price":10,"priceDisplay":"example_priceDisplay","currency":"example_currency","rating":4.7}],"meta":{"site":"trip-com","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:84532","quotedMicrousd":50000,"settledMicrousd":5000,"transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}}},"402":{"description":"Payment required or invalid/declined payment authorization (never charged).","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired quote.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"no_results: 0 rows matched the query; aborted before settlement (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"payment_id_conflict: payment-identifier reused with different parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid or missing request parameters (validated before /verify; charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit or payer cooldown exceeded (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream source failed or blocked (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"upstream_timeout: synchronous deadline reached and task cancelled (charged=false).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/trip-com/v1/health":{"get":{"operationId":"trip_com_health","summary":"Trip.com Hotels Trains and Attractions Data: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["trip-com","health"],"responses":{"200":{"description":"Operational","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"charged":{"type":"boolean"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"HealthStatus":{"type":"object","required":["ok","site","status","endpoints","rowsBilled"],"properties":{"ok":{"type":"boolean"},"site":{"type":"string"},"status":{"type":"string","enum":["operational","unavailable"]},"endpoints":{"type":"array","items":{"type":"string"}},"rowsBilled":{"type":"integer"}}},"Row_trip_com":{"type":"object","properties":{"service":{"type":["string","null"],"title":"Service"},"name":{"type":["string","null"],"title":"Name"},"price":{"type":["number","null"],"title":"Price"},"priceDisplay":{"type":["string","null"],"title":"Price display"},"currency":{"type":["string","null"],"title":"Currency"},"rating":{"type":["number","null"],"title":"Rating"},"reviewCount":{"type":["number","null"],"title":"Reviews"},"destination":{"type":["string","null"],"title":"Destination"},"origin":{"type":["string","null"],"title":"Origin"},"domain":{"type":["string","null"],"title":"Domain"},"url":{"type":["string","null"],"format":"uri","title":"URL"},"sponsored":{"type":["boolean","null"],"title":"Sponsored"},"listingId":{"type":["string","null"],"title":"Listing ID"},"phones":{"type":["string","null"],"title":"Phones"},"emails":{"type":["string","null"],"title":"Emails"},"address":{"type":["string","null"],"title":"Address"},"geo":{"type":["string","null"],"title":"Geo"},"person":{"type":["string","null"],"title":"Person"},"org":{"type":["string","null"],"title":"Organization"},"web":{"type":["string","null"],"title":"Web"},"leadSource":{"type":["string","null"],"title":"Lead source"},"leadReveal":{"type":["string","null"],"title":"Lead reveal"},"leadAbsences":{"type":["string","null"],"title":"Lead absences"},"scrapedAt":{"type":["string","null"],"format":"date-time","title":"Scraped at"}},"additionalProperties":true},"Response_trip_com":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"done":{"type":"boolean"},"rowCount":{"type":"integer","minimum":1},"rowsBilled":{"type":"integer","minimum":1},"rowsDelivered":{"type":"integer","minimum":1},"rows":{"type":"array","items":{"$ref":"#/components/schemas/Row_trip_com"}},"meta":{"type":"object","properties":{"site":{"type":"string"},"endpoint":{"type":"string"},"maxResults":{"type":"integer"},"payment":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"quotedMicrousd":{"type":"integer"},"settledMicrousd":{"type":"integer"},"transaction":{"type":"string"},"payer":{"type":"string"}}}}}},"required":["jobId","status","done","rowCount","rows"]}}},"x-discovery":{"ownershipProofs":["0xdb7c562a3ef6f9f29da4672abdab1489e82e910a91b863e3c22b905df6522b7223798a84245e0452cab689483b6cbb7cd8c13141319df982b213dea31ee7e4311c"]}}