{"openapi":"3.0.0","info":{"title":"Traveloka Hotels Flights and Reviews Data","version":"1.0.0","description":"Traveloka hotel rates, rooms, guest reviews and flight offers across Southeast Asian markets, one row per entity."},"servers":[{"url":"https://ah-traveloka-com.opendata.best/s/traveloka-com"}],"paths":{"/v1/search":{"post":{"operationId":"search","summary":"Search Traveloka hotels, flights and reviews","description":"Query Traveloka hotel stays, room details, guest reviews and flights across Southeast Asian and regional markets.","tags":["search"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"service":{"type":"string","enum":["auto","hotels","flights","activities","car_rental","airport_transfer","trains"],"description":"Service. 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","example":"hotels"},"destination":{"type":"string","description":"Destination. 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.","example":"Bali"},"origin":{"type":"string","description":"Origin IATA (flights). 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."},"hotelListUrl":{"type":"string","description":"Hotel list URL (optional). 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."},"geoId":{"type":"string","description":"Hotel geo ID (optional). Traveloka's id of the city/area (e.g. 102746 = Bali). Use it instead of Destination to skip the lookup."},"maxResults":{"type":"integer","minimum":1,"maximum":20,"description":"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).","default":10,"example":3},"checkin":{"type":"string","description":"Check-in. Hotels: check-in date, YYYY-MM-DD. Default: 21 days from today."},"checkout":{"type":"string","description":"Check-out. Hotels: check-out date, YYYY-MM-DD, after check-in, at most 30 nights. Default: 2 nights."},"adults":{"type":"integer","minimum":1,"description":"Adults. Number of adults.","default":2},"children":{"type":"integer","minimum":0,"description":"Children. Number of children. With hotels, set Child ages instead (one age per child).","default":0},"childAges":{"type":"array","items":{"type":"string"},"description":"Child ages (hotels). One age (0-17) per child, e.g. [7, 10]."},"rooms":{"type":"integer","minimum":1,"description":"Rooms. Number of hotel rooms.","default":1},"enrichDetails":{"type":"boolean","description":"Hotel details and rooms. 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,"example":false},"includeReviews":{"type":"boolean","description":"Hotel reviews. 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,"example":false},"maxReviews":{"type":"integer","minimum":1,"maximum":20,"description":"Max reviews per hotel. Maximum review rows per hotel when includeReviews is enabled, from 1 to 20. Reviews share maxResults with hotel and room rows.","default":20},"departureDate":{"type":"string","description":"Departure date. Flights: departure date, YYYY-MM-DD. Default: 28 days from today."},"returnDate":{"type":"string","description":"Return date. Flights (round trip): return date, YYYY-MM-DD. Default: 7 days after departure."},"tripType":{"type":"string","enum":["oneway","roundtrip"],"description":"Trip type. oneway or roundtrip for flights.","default":"oneway"},"cabinClass":{"type":"string","enum":["ECONOMY","PREMIUM_ECONOMY","BUSINESS","FIRST"],"description":"Cabin class. Flight cabin class.","default":"ECONOMY"},"infants":{"type":"integer","minimum":0,"description":"Infants. Number of infants.","default":0},"locale":{"type":"string","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"],"description":"Locale. Traveloka site language and market (e.g. en-sg = English, Singapore dollars). Sets the default currency.","default":"en-sg","example":"en-sg"},"currency":{"type":"string","description":"Currency. Optional currency override (e.g. USD). Defaults to the locale's currency."},"domain":{"type":"string","description":"Domain. Host. Default www.traveloka.com.","default":"www.traveloka.com"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,80}$","description":"Optional. Your id for this request: repeating it while the job runs returns the same job."}}},"example":{"service":"hotels","destination":"Bali","enrichDetails":false,"includeReviews":false,"maxResults":3}}}},"responses":{"200":{"description":"Done within the request: the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsPage"}}}},"404":{"description":"No results matched the query (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid or missing parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"At capacity, too many running jobs, or rolling 24-hour row limit reached; retry after Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The source could not be collected this time (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Synchronous timeout reached before completion; task cancelled (nothing was billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/health":{"get":{"operationId":"health","summary":"API health check","description":"Lightweight readiness check for this API. Never starts a collection and always bills 0 rows.","tags":["health"],"responses":{"200":{"description":"API is operational (0 rows).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"API is temporarily unavailable (not billed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"schemas":{"Row":{"type":"object","properties":{"rowType":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"string"},"parentId":{"nullable":true,"type":"string"},"parentName":{"nullable":true,"type":"string"},"parentUrl":{"nullable":true,"type":"string"},"parentLocation":{"nullable":true},"hotelName":{"nullable":true,"type":"string"},"roomId":{"nullable":true,"type":"string"},"roomInventoryId":{"nullable":true,"type":"string"},"roomOfferCount":{"nullable":true,"type":"integer"},"maxOccupancy":{"nullable":true,"type":"integer"},"sizeSqm":{"nullable":true,"type":"number"},"breakfast":{"nullable":true,"type":"string"},"refundable":{"nullable":true,"type":"boolean"},"cancellationPolicy":{"nullable":true,"type":"string"},"remainingRooms":{"nullable":true,"type":"integer"},"reviewId":{"nullable":true,"type":"string"},"reviewSampleCount":{"nullable":true,"type":"integer"},"text":{"nullable":true,"type":"string"},"originalText":{"nullable":true,"type":"string"},"reviewerName":{"nullable":true,"type":"string"},"date":{"nullable":true,"type":"string"},"reviewSource":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"service":{"nullable":true,"type":"string"},"locale":{"nullable":true,"type":"string"},"hotelId":{"nullable":true,"type":"string"},"listingId":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"price":{"nullable":true,"type":"number"},"rating":{"nullable":true,"type":"number"},"area":{"nullable":true,"type":"string"},"geoId":{"nullable":true,"type":"string"},"currency":{"nullable":true,"type":"string"},"url":{"nullable":true,"type":"string"},"origin":{"nullable":true,"type":"string"},"destination":{"nullable":true,"type":"string"},"checkin":{"nullable":true,"type":"string"},"checkout":{"nullable":true,"type":"string"},"scrapedAt":{"nullable":true,"type":"string"},"type":{"nullable":true,"type":"string"},"accommodationType":{"nullable":true,"type":"string"},"travelTheme":{"nullable":true,"type":"string"},"ratingText":{"nullable":true,"type":"string"},"priceType":{"nullable":true,"type":"string"},"dealLabel":{"nullable":true,"type":"string"},"imageUrl":{"nullable":true,"type":"string"},"searchId":{"nullable":true,"type":"string"},"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"province":{"nullable":true,"type":"string"},"postalCode":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"checkInTime":{"nullable":true,"type":"string"},"checkOutTime":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"airline":{"nullable":true,"type":"string"},"departureTime":{"nullable":true,"type":"string"},"arrivalTime":{"nullable":true,"type":"string"},"departureAirport":{"nullable":true,"type":"string"},"arrivalAirport":{"nullable":true,"type":"string"},"duration":{"nullable":true,"type":"string"},"stops":{"nullable":true,"type":"string"},"departureDate":{"nullable":true,"type":"string"},"returnDate":{"nullable":true,"type":"string"},"cabinClass":{"nullable":true,"type":"string"},"roomsSource":{"nullable":true,"type":"string"},"flightCardId":{"nullable":true,"type":"string"},"starRating":{"nullable":true,"type":"number"},"ratingScale":{"nullable":true,"type":"number"},"latitude":{"nullable":true,"type":"number"},"longitude":{"nullable":true,"type":"number"},"priceBeforeTaxes":{"nullable":true,"type":"number"},"taxesAndFees":{"nullable":true,"type":"number"},"originalPrice":{"nullable":true,"type":"number"},"totalPrice":{"nullable":true,"type":"number"},"reviewCount":{"nullable":true,"type":"integer"},"rank":{"nullable":true,"type":"integer"},"nights":{"nullable":true,"type":"integer"},"adults":{"nullable":true,"type":"integer"},"children":{"nullable":true,"type":"integer"},"roomsRequested":{"nullable":true,"type":"integer"},"numberOfRooms":{"nullable":true,"type":"integer"},"builtYear":{"nullable":true,"type":"integer"},"available":{"nullable":true,"type":"boolean"},"freeCancellation":{"nullable":true,"type":"boolean"},"hotelFreeCancellation":{"nullable":true,"type":"boolean"},"payAtHotel":{"nullable":true,"type":"boolean"},"sponsored":{"nullable":true,"type":"boolean"},"imageUrls":{"nullable":true,"type":"array","items":{}},"features":{"nullable":true,"type":"array","items":{}},"facilities":{"nullable":true,"type":"array","items":{}},"policies":{"nullable":true,"type":"array","items":{}},"reviewSources":{"nullable":true,"type":"array","items":{}},"priceDisplay":{"nullable":true,"type":"string"}},"additionalProperties":true,"description":"One collected entity. Field availability depends on rowType and the source. Fields always present (a|b = at least one of them): every row: id|hotelId|listingId|url, name|title|hotelName|price; rowType=hotel: id|hotelId|listingId, name, url; rowType=review: id, hotelId, comment|rating; rowType=room: id, name, hotelId|url."},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}}},"ErrorDetail":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","example":"invalid_input"},"message":{"type":"string"},"retryable":{"type":"boolean"}}},"JobStatus":{"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"}}},"RowsPage":{"allOf":[{"$ref":"#/components/schemas/JobStatus"},{"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}}}]},"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"}}}}}}