Traveloka APItraveloka.com ↗
Access Traveloka hotel data via 3 endpoints: search by property, list hotels by region, and discover popular destinations with prices and ratings.
What is the Traveloka API?
The Traveloka API exposes 3 endpoints for retrieving hotel data from Traveloka.com, covering hotel names, star ratings, user ratings, review counts, prices, and location details. Use get_hotels_by_region to list hotels in cities like Bali or Jakarta, search_hotels to find properties similar to a known hotel, or get_popular_destinations to enumerate valid region slugs and geo IDs for region-based queries.
curl -X GET 'https://api.parse.bot/scraper/fbbb6f69-7fe3-4f0b-bd86-98fd3f029c37/search_hotels' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace traveloka-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""
Traveloka Hotel API - Discover destinations and browse hotels by region.
Get your API key from: https://parse.bot/settings
"""
from parse_apis.traveloka_hotel_api import Traveloka, Destination, Hotel, NotFoundError
# Initialize the client
traveloka = Traveloka(api_key="YOUR_API_KEY")
# List popular destinations - discover region slugs and geo IDs
for destination in traveloka.destinations.list(limit=5):
print(destination.slug, destination.geo_id)
# Pick the first destination and list its hotels
dest = traveloka.destinations.list(limit=1).first()
if dest:
for hotel in dest.hotels.list(checkin="2026-07-01", checkout="2026-07-02", limit=3):
print(hotel.name, hotel.star_rating, hotel.user_rating, hotel.num_reviews)
if hotel.price is not None:
print(f" Price: {hotel.price.amount} {hotel.price.currency}")
# Construct a known destination directly and browse its hotels
bali = Destination(_api=traveloka, geo_id="102746", slug="bali")
try:
first_hotel = bali.hotels.list(limit=1).first()
if first_hotel:
print(first_hotel.name, first_hotel.location, first_hotel.accommodation_type)
except NotFoundError as exc:
print(f"Region not found: {exc}")
print("exercised: destinations.list / destination.hotels.list / constructible Destination")
Search for hotels similar to a given property. Useful for discovering and listing multiple hotels with names, ratings, prices, and locations.
| Param | Type | Description |
|---|---|---|
| rooms | integer | Number of rooms |
| adults | integer | Number of adults |
| checkin | string | Check-in date (YYYY-MM-DD) |
| checkout | string | Check-out date (YYYY-MM-DD) |
| currency | string | Currency code |
| hotel_idrequired | string | Base hotel ID for the search |
{
"type": "object",
"fields": {
"hotels": "array"
},
"sample": {
"hotels": [
{
"id": "254012",
"name": "Harris Suites FX Sudirman",
"price": {
"amount": "9733",
"currency": "USD"
},
"region": "Senayan",
"location": {
"lat": "-6.2246542736947585",
"lng": "106.80359624326229"
},
"image_url": "https://ik.imagekit.io/...",
"star_rating": "4.0",
"user_rating": "8.6",
"review_count": "6193"
}
]
}
}About the Traveloka API
Endpoints and What They Return
get_popular_destinations takes no parameters and returns an array of destination objects, each with a slug (e.g. bali, singapore) and a geo_id (e.g. 102746). These values are required inputs to get_hotels_by_region, making this endpoint the natural starting point for any region-scoped hotel search.
get_hotels_by_region accepts a required region_slug and geo_id (from get_popular_destinations) plus optional checkin and checkout dates in YYYY-MM-DD format. If dates are omitted, checkin defaults to 7 days from today and checkout to one day after. The response includes an array of hotel objects with fields: id, name, location, star_rating, user_rating, num_reviews, price, accommodation_type, image_url, and seo_p, alongside a total_hotels count for the region.
Search by Similar Property
search_hotels takes a required hotel_id and optional occupancy parameters — rooms, adults, checkin, checkout, and currency — then returns an array of hotels similar to the specified property. This is useful when you already know a reference hotel and want to surface alternatives. The currency parameter lets you request prices in a specific denomination across results.
The Traveloka API is a managed, monitored endpoint for traveloka.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when traveloka.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official traveloka.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a hotel comparison tool for a specific region using
get_hotels_by_regionwith star_rating and price fields. - Populate a destination picker UI by mapping
get_popular_destinationsslugs to supported cities. - Display user rating and review count alongside pricing for hotels in a city like Bangkok or Jakarta.
- Suggest alternative hotels to a known property using
search_hotelswith a reference hotel_id. - Track nightly price changes for a region by querying
get_hotels_by_regionwith different check-in and check-out dates. - Filter accommodation listings by
accommodation_typeto separate hotels from other lodging categories. - Embed hotel thumbnails in a travel app using the
image_urlfield returned per property.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Traveloka offer an official developer API?+
What does get_hotels_by_region return beyond basic hotel names?+
id, name, location, star_rating, user_rating, num_reviews, price, accommodation_type, image_url, and seo_p. The response also returns the region slug queried, the checkin and checkout dates used, and a total_hotels count indicating how many hotels exist in that region.Does the API support filtering hotels by price range, star rating, or amenities within a region?+
How do I get valid geo_id and region_slug values for get_hotels_by_region?+
get_popular_destinations returns an array of destination objects each containing a slug and geo_id. Pass those values directly as region_slug and geo_id to get_hotels_by_region. The endpoint documentation also lists a few examples: 102813 for Jakarta and 102746 for Bali.