B2B hotel API for travel businesses
The Trekko API gives online agencies, tour operators and travel technology teams programmatic access to more than 3 million properties in 190+ countries, plus private transfers and car rental, with one set of credentials. It is a REST API with JSON requests and responses, a self-serve sandbox you can open without a sales call, and the safety features a booking integration needs in production: idempotent confirmation, per-key rate limits and signed webhooks.
Open a sandbox account- 3M+ PROPERTIES
- 23,000+ AGENCIES
- 190+ COUNTRIES

What the API covers
The hotel flow follows the order a booking really happens in: search a destination, request live availability for a hotel, check out the chosen option (the price is re-validated with the supplier at this point), pay, confirm, and later list, retrieve or cancel bookings. Prices returned already include the markup configured for your agency.
The same API key also works for private transfers, including hourly chauffeur service, and for car rental. You integrate one authentication scheme, one error format and one usage log for all three products.
Destination search and availability
Search by city or region, then request availability for the properties that interest you. Each offer carries its room, board basis and cancellation terms, so your interface can show the conditions before the guest commits.
Checkout, payment and confirmation
Checkout re-prices the option. Payment is taken from your agency balance (prepaid funds first, then any credit line), or held against credit with the pay-later option where it is agreed. Confirmation returns a stable booking identifier your system stores.
BASE="https://api.trekko.co/core"
AUTH="Authorization: ApiKey trk_test_xxxxxxxx:your_secret_here"
# 1) Search for the city
curl -sS "${BASE}/accommodation/search?query=Barcelona" -H "${AUTH}"
# 2) Live availability (prices already include your markup)
curl -sS -X POST "${BASE}/accommodations/get_accommodation_availability" \
-H "${AUTH}" -H "Content-Type: application/json" \
-d '{
"accommodation_id": 1376114,
"start_date": "2027-04-12",
"end_date": "2027-04-15",
"guests": [ { "id": 1, "age": 34 }, { "id": 2, "age": 30 } ],
"guests_room_distribution": [ { "guest_ids": [1, 2] } ],
"nationality": "ES",
"currency_code": "EUR"
}'Built for production traffic
Booking APIs fail in expensive ways: a timeout during confirmation can create a duplicate reservation. The confirmation call accepts an Idempotency-Key header, so a retry with the same key returns the original response instead of booking twice.
Rate limits are applied per API key rather than per IP address, and each agency's limits are independent, so another partner's traffic never throttles yours. Errors share one envelope, and authentication errors follow the usual split between unknown credentials and valid credentials without permission.
Credentials handled safely
Each integration receives a key and a secret. The secret is displayed once and stored hashed on our side; it can be rotated, and a key can be revoked without deleting its history.
Webhooks and automatic rebooking
Bookings made through the API are eligible for Trekko's automatic rebooking: while free cancellation is still open, the booking is checked every day for a lower rate on the same stay. When a rebooking happens, your booking keeps the same stable identifier, and your system receives a signed booking.rebooked webhook with the old and new price and the saving.
Webhooks are signed with HMAC so you can verify they come from Trekko, and delivery is at least once with automatic retries; each event carries an identifier you can deduplicate on. You can also opt out of rebooking for any individual booking through the API.
Sandbox first, live when you are funded
Sign up for the sandbox with your email, confirm the code we send, and you receive test credentials straight away. The sandbox runs the full booking loop on a fixed test catalogue, never calls a real supplier and never moves money, and it includes a rebooking simulator so you can test the webhook flow on demand.
Going live does not require a separate payment integration. You fund your Trekko account up to the minimum deposit by card top-up, bank transfer or an agreed credit line, then activate production to receive your live key. Code written against the sandbox runs in production by changing the key and base URL.
An integration checklist
Store the stable booking identifier returned at confirmation, not the supplier's confirmation number, which can change after a rebooking. Send an Idempotency-Key on every confirmation. Verify the signature on every webhook before acting on it, and deduplicate on the event identifier. Show your users the cancellation deadline returned with each offer.
Who integrates the Trekko API
Online travel agencies adding hotels to their own sites, tour operators feeding a dynamic-packaging engine, corporate booking tools that need stays and ground transport, and travel start-ups that want inventory without negotiating supplier contracts one by one.
What you do not have to build
Supplier contracts, the mapping of each supplier's hotel codes to one property, payment collection from the supplier side and the daily rebooking checks are handled on the Trekko side. You integrate one API and keep control of your own front end and pricing to your customers.
Frequently asked questions
Is there a free test environment?
Yes. The sandbox is self-serve: sign up with your email, enter the verification code and you receive test credentials. It uses a fixed test catalogue and never charges money.
What format does the API use?
REST over HTTPS with JSON requests and responses, authenticated with an API key and secret sent in the request headers.
Which products are available through the API?
Hotels and other accommodation (3M+ properties), private transfers including hourly chauffeur service, and car rental, all with the same credentials.
How do I avoid duplicate bookings on retries?
Send an Idempotency-Key header when confirming. A retry with the same key returns the original response rather than creating a second booking.
How do I get live credentials?
Fund your Trekko account up to the minimum deposit, then activate production from your test credentials to receive a live key.
Does the API notify me when a booking is rebooked?
Yes, through a signed booking.rebooked webhook. The booking keeps the same stable identifier, so your records stay in sync.
Are there official SDKs?
Not publicly yet. Integrate directly against the REST endpoints; the sandbox lets you test every call.
Get your sandbox keys
Create a free sandbox account, verify your email and make your first test booking against the Trekko API today.
Open a sandbox account