{"openapi":"3.1.0","info":{"title":"Traveloka Hotels Flights and Reviews Data (x402 & MCP)","version":"0.1.0","description":"Traveloka hotel rates, rooms, guest reviews and flight offers across Southeast Asian markets, one row per entity.","x-guidance":"Structured real-time web intelligence APIs paid per delivered row in USDC via x402 on Base, Polygon, Arbitrum, Monad, World Chain and Solana. All endpoints are synchronous at POST /s/<site>/v1/<endpoint> and also exposed over stateless MCP at POST /mcp. Supports x402 v2 'upto' (Permit2) and 'exact' (EIP-3009) on EVM chains, and 'exact' (SPL USDC transfer, facilitator-paid fees) on Solana. 'upto' charges only for the rows delivered. 'exact' settles the full quoted amount (quoted rows x the row price) even when fewer rows than maxResults are delivered. Empty/0-row (404), invalid input (422), and upstream failures or timeouts (503, see error.code) are never charged.","contact":{"email":"ops@opendata.best"}},"servers":[{"url":"https://agensi.opendata.best"}],"paths":{"/s/traveloka-com/v1/search":{"post":{"operationId":"traveloka_com_search","summary":"Traveloka Hotels Flights and Reviews Data: Search Traveloka hotels, flights and reviews","description":"Query Traveloka hotel stays, room details, guest reviews and flights across Southeast Asian and regional markets. Unit price: $0.005000/row USDC (default quote 10 rows, max 20 rows). Unsettled / 0-row / error responses are never charged.","tags":["traveloka-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":{"service":{"type":"string","description":"What to collect. Auto picks Hotels when you fill Destination, Hotel geo ID or Hotel list URL, and Flights when you fill Origin. Hotels come from Traveloka's own hotel search with live prices for your dates; flights from the flight search page; the other services list links from their Traveloka pages and need no destination.","default":"auto","enum":["auto","hotels","flights","activities","car_rental","airport_transfer","trains"]},"destination":{"type":"string","description":"Hotels: a city, region or area as you would type it on Traveloka (Bali, Ubud, Bangkok, Singapore). Flights: destination airport IATA code (e.g. DPS). Leave every target empty with Service on Auto for a short example run."},"origin":{"type":"string","description":"Flights: origin airport IATA code (e.g. CGK). Filling it with Service on Auto runs a flight search. With Service = Flights and no codes, the route is CGK to DPS.","pattern":"^([A-Za-z]{3})?$"},"hotelListUrl":{"type":"string","description":"A Traveloka hotel area or region URL, such as https://www.traveloka.com/en-id/hotel/indonesia/area/ubud-102771. Returns hotels up to your row limit, with advertised starting prices rather than rates for your dates.","pattern":"^((https?://)?([a-z0-9-]+\\.)*traveloka\\.com/.*hotel/.+)?$"},"geoId":{"type":"string","description":"Traveloka's id of the city/area (e.g. 102746 = Bali). Use it instead of Destination to skip the lookup.","pattern":"^([0-9]+)?$"},"maxResults":{"type":"integer","description":"Most rows this call returns, 1 to 20 (default 10). All row types count toward it. The 402 payment quote is maxResults x $0.0050/row USDC: with the upto scheme you pay only for the rows delivered, with exact you pay the quoted amount. Calls that return 0 rows or fail are not charged.","default":10,"minimum":1,"maximum":20},"checkin":{"type":"string","description":"Hotels: check-in date, YYYY-MM-DD. Default: 21 days from today.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"checkout":{"type":"string","description":"Hotels: check-out date, YYYY-MM-DD, after check-in, at most 30 nights. Default: 2 nights.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"adults":{"type":"integer","description":"Number of adults.","default":2,"minimum":1},"children":{"type":"integer","description":"Number of children. With hotels, set Child ages instead (one age per child).","default":0,"minimum":0},"childAges":{"type":"array","items":{"type":"string"},"description":"One age (0-17) per child, e.g. [7, 10]."},"rooms":{"type":"integer","description":"Number of hotel rooms.","default":1,"minimum":1},"enrichDetails":{"type":"boolean","description":"Add hotel details and separate room rows for up to the first 100 hotels, within your combined row limit. Room rows are billed individually and may be unpriced catalog entries when dated offers are unavailable.","default":false},"includeReviews":{"type":"boolean","description":"Add reviews shown on the hotel page as separate billed rows, within maxReviews and the combined row limit. This is a sample, not the full review history.","default":false},"maxReviews":{"type":"integer","description":"Maximum review rows per hotel when includeReviews is enabled, from 1 to 20. Reviews share maxResults with hotel and room rows.","default":20,"minimum":1,"maximum":20},"departureDate":{"type":"string","description":"Flights: departure date, YYYY-MM-DD. Default: 28 days from today.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"returnDate":{"type":"string","description":"Flights (round trip): return date, YYYY-MM-DD. Default: 7 days after departure.","pattern":"^(\\d{4}-\\d{2}-\\d{2})?$"},"tripType":{"type":"string","description":"oneway or roundtrip for flights.","default":"oneway","enum":["oneway","roundtrip"]},"cabinClass":{"type":"string","description":"Flight cabin class.","default":"ECONOMY","enum":["ECONOMY","PREMIUM_ECONOMY","BUSINESS","FIRST"]},"infants":{"type":"integer","description":"Number of infants.","default":0,"minimum":0},"locale":{"type":"string","description":"Traveloka site language and market (e.g. en-sg = English, Singapore dollars). Sets the default currency.","default":"en-sg","enum":["en-id","id-id","en-my","en-sg","en-ph","en-th","th-th","en-vn","vi-vn","en-au","ja-jp","ko-kr","en-en"]},"currency":{"type":"string","description":"Optional currency override (e.g. USD). Defaults to the locale's currency."},"domain":{"type":"string","description":"Host. Default www.traveloka.com.","default":"www.traveloka.com"}},"additionalProperties":false},"example":{"service":"hotels","destination":"Bali","enrichDetails":false,"includeReviews":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_traveloka_com"},"example":{"jobId":"job_travelok_example","status":"succeeded","done":true,"rowCount":1,"rowsBilled":1,"rowsDelivered":1,"rows":[{"rowType":"example_rowType","id":"example_001","parentName":"example_parentName","imageUrl":"https://traveloka.com/item/1","name":"example_name","starRating":4.7}],"meta":{"site":"traveloka-com","endpoint":"search","maxResults":10,"payment":{"scheme":"upto","network":"eip155:8453","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"}}}},"503":{"description":"error.code collection_failed / source_blocked (upstream source failed or blocked) or upstream_timeout (synchronous deadline reached, task cancelled): charged=false. Also settlement_pending or facilitator_unavailable; retry same payment to reconcile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/s/traveloka-com/v1/health":{"get":{"operationId":"traveloka_com_health","summary":"Traveloka Hotels Flights and Reviews Data: health check","description":"Free readiness check (never returns 402 and never starts a collection).","tags":["traveloka-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_traveloka_com":{"type":"object","properties":{"rowType":{"type":["string","null"],"title":"Row type"},"id":{"type":["string","null"],"title":"Entity ID"},"parentName":{"type":["string","null"],"title":"Parent hotel"},"imageUrl":{"type":["string","null"],"title":"Photo"},"name":{"type":["string","null"],"title":"Name"},"starRating":{"type":["number","null"],"title":"Stars"},"rating":{"type":["number","null"],"title":"Rating /10"},"reviewCount":{"type":["number","null"],"title":"Reviews"},"area":{"type":["string","null"],"title":"Area"},"price":{"type":["number","null"],"title":"Price / night"},"currency":{"type":["string","null"],"title":"Currency"},"originalPrice":{"type":["number","null"],"title":"Was"},"totalPrice":{"type":["number","null"],"title":"Stay total"},"priceType":{"type":["string","null"],"title":"Price type"},"freeCancellation":{"type":["boolean","null"],"title":"Free cancel"},"hotelFreeCancellation":{"type":["boolean","null"],"title":"Hotel free cancel"},"sponsored":{"type":["boolean","null"],"title":"Sponsored"},"checkin":{"type":["string","null"],"title":"Check-in"},"checkout":{"type":["string","null"],"title":"Check-out"},"url":{"type":["string","null"],"format":"uri","title":"URL"}},"additionalProperties":true},"Response_traveloka_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_traveloka_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"]}}}}