Getting started
Quickstart
A key, one curl, and X-Credits-Charged on the response — about five minutes.
1. Sign in and create a key
Sign in with a magic link or Google — no password, no card. Then open
Keys and create your first key. The plaintext is shown once; it starts with
dr_live_. The Free plan gives the account 250 credits a month, reset monthly.
2. Shop one hotel
Every rate endpoint is a POST with a JSON body and the key in x-api-key:
export DIRECTRATE_API_KEY=dr_live_…
curl -s https://api.directrate.dev/v1/shop \
-H "x-api-key: $DIRECTRATE_API_KEY" \
-H "content-type: application/json" \
-d '{"chain":"hyatt","hotel_code":"CHIZP","checkin":"2026-11-10","los":1}'
The response is the room × rate-plan matrix for that stay — every plan the chain sells, the member
rate as its own rows (member_only: true), lowest.bar / lowest.member and the after-tax twins,
status, and source / cache_age_sec so you know how fresh it is. Read the price on the response
itself:
X-Credits-Charged: 1
3. Points, parity, a calendar
Same body, different path:
# award nights in points, cents-per-point against the cash rate, free-night certificates
curl -s https://api.directrate.dev/v1/award -H "x-api-key: $DIRECTRATE_API_KEY" -H "content-type: application/json" \
-d '{"chain":"marriott","hotel_code":"CHIRL","checkin":"2026-11-10","los":1}'
# the direct rate beside Booking.com, Expedia, Hotels.com, Trip.com and Agoda
curl -s https://api.directrate.dev/v1/parity -H "x-api-key: $DIRECTRATE_API_KEY" -H "content-type: application/json" \
-d '{"chain":"choice","hotel_code":"IL263","checkin":"2026-11-10","los":1}'
# lowest per night over a window
curl -s https://api.directrate.dev/v1/calendar -H "x-api-key: $DIRECTRATE_API_KEY" -H "content-type: application/json" \
-d '{"chain":"ihg","hotel_code":"CHIMM","start":"2026-11-10","days":30}'
4. Find hotel codes
Codes are each chain’s own property identifiers (Marriott CHIRL, Hyatt CHIZP, IHG CHIMM,
Hilton CHITDHX, Choice IL263) — not guessable, not shared between chains. Ask for them:
curl -s "https://api.directrate.dev/v1/hotels?chain=marriott&q=Chicago,%20IL&radius=5" \
-H "x-api-key: $DIRECTRATE_API_KEY"
One credit however many hotels come back (Best Western 5, Wyndham 6).
5. Watch the quota
curl -s https://api.directrate.dev/v1/usage -H "x-api-key: $DIRECTRATE_API_KEY"
Free to call, answered even when the quota is spent. Errors, unknown codes and timeouts never bill.
Next: Authentication · Credits & pricing · the API reference for every field.