To access the API, clients must provide an API key in the apiKey query parameter of the request. Your API key will be mailed to you upon signing up.
The API key is delivered only by email and cannot be viewed anywhere in the system, so keep that email safe for future reference.
curl --location 'https://sandbox-en-us.kayakaffiliates.com/api/affiliate/autocomplete/v1/flights?apiKey={API_KEY}&searchTerm=Boston'
The Sandbox environment is designed for testing and development purposes. It simulates the behavior of the production API but with important limitations and obfuscated data to ensure safe experimentation.
https://sandbox-en-us.kayakaffiliates.com
Sandbox environment limitations
Use the sandbox-api-empty:true header to simulate no-results in the sandbox; particularly useful for APIs returning static responses.
The Sandbox enforces lower rate limits than production. Current per-API limits are listed below and may change at any time.
| API | Rate limit |
|---|---|
| Autocomplete API | 100 / hour |
| Hotel Search API | 250 / hour |
| Flight Search API | 250 / hour |
| Car Search API | 250 / hour |
| Static Data Feed API | 50 / hour |
| CompareTo Ads API | 50 / hour |
| Inline Ads API | 50 / hour |
| Price Insights API | 50 / hour |
Search APIs include Flight Search API, Hotel Search API, Car Search API, CompareTo Ads API and Inline Ads API.
Search APIs additionally require the userTrackId parameter.
The userTrackId is a unique identifier per end user and should not be confused with the unique identifier per affiliate or affiliate code.
Incorrectly setting this parameter can lead to rate limiting and blocking of requests.
| Bad userTrackId usage | Good userTrackId usage |
|---|---|
|
|
The User-Agent header must always identify your actual requesting client and platform.
Always send the exact User-Agent your client would naturally send — for example:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1x-original-client-ip header should contain the user’s IP address. It is used to identify and take measures against bots. Both IPv4 and IPv6 formats are allowed.
For usages when it is impossible to acquire the user’s IP address this restriction can be lifted.