|
Sign In |
$ (USD)
|
We offer a set of APIs for conducting Kayak searches. The following pages describe each one:
If you would like a packaged solution for including Kayak searches on a page, embed our search widget:
<script src="http://www.kayak.com/widget/"></script>
Our widgets are available in a number of different sizes. Please select a widget size.
You can customize the widget through GET variables sent to the base URL:
| External Variable | Semantics | Range | Default | Example |
|---|---|---|---|---|
| ai | Affiliate identifier provided by Kayak.com. | Character string. No embedded whitespace or special characters. | Empty string. | |
| cars | Answers the question "Show cars search?" | y,n | y | |
| clickTAG | Redirect URL. | If provided, widget searches will be sent through this URL with the search URL passed as a GET parameter named "url". | Empty string. | |
| cruises | Answers the question "Show cruises search?" | y,n | y | |
| deals | Answers the question "Show deals search?" | y,n | y | |
| flights | Answers the question "Show flights search?" | y,n | y | |
| hotels | Answers the question "Show hotels search?" | y,n | y | |
| l1 | Pre-filled origin location. | String to insert as a default value in search forms. If the string is "!", we will attempt to determine the nearest airport based on the user's IP address. | Empty string. | |
| l2 | Pre-filled destination location. | String to insert as a default value in search forms. If the string is "!", we will attempt to determine the nearest airport based on the user's IP address. | Empty string. | |
| p | Optional Sub-Affiliate identifier. This is a pass-thru value from Kayak's perspective; used by affiliate for internal promotion tracking if desired. | Character string. No embedded whitespace or special characters. | Empty string. | |
| tab | Answers the question "Which search to display initially?" | cars, cruises, deals, flights, hotels | hotels | |
| vacations | Answers the question "Show vacations search?" | y,n | y | |
| External Variable | Semantics | Range | Default | Example |
|---|---|---|---|---|
| ai | Affiliate identifier provided by Kayak.com. | Character string. No embedded whitespace or special characters. | Empty string. | |
| cars | Answers the question "Show cars search?" | y,n | y | |
| clickTAG | Redirect URL. | If provided, widget searches will be sent through this URL with the search URL passed as a GET parameter named "url". | Empty string. | |
| cruises | Answers the question "Show cruises search?" | y,n | n | |
| deals | Answers the question "Show deals search?" | y,n | n | |
| flights | Answers the question "Show flights search?" | y,n | y | |
| hotels | Answers the question "Show hotels search?" | y,n | y | |
| l1 | Pre-filled origin location. | String to insert as a default value in search forms. If the string is "!", we will attempt to determine the nearest airport based on the user's IP address. | Empty string. | |
| l2 | Pre-filled destination location. | String to insert as a default value in search forms. If the string is "!", we will attempt to determine the nearest airport based on the user's IP address. | Empty string. | |
| p | Optional Sub-Affiliate identifier. This is a pass-thru value from Kayak's perspective; used by affiliate for internal promotion tracking if desired. | Character string. No embedded whitespace or special characters. | Empty string. | |
| tab | Answers the question "Which search to display initially?" | cars, cruises, deals, flights, hotels | hotels | |
| vacations | Answers the question "Show vacations search?" | y,n | n | |
This widget is constructed from the options in the table above:
");
return false;
}).click();
jQuery("#widget120x240Refresh").click(function() {
var params = [];
jQuery("#widget120x240 input, #widget120x240 select").each(function() {
// hide defaults
if( this.value && !(jQuery(this).is("select") && this.value == "hotels") ) {
params.push(this.name + "=" + encodeURIComponent(this.value));
}
});
params.push("size=120x240");
var url = "http://www.kayak.com/widget/";
if (params.length) { url += "?" + params.join("&"); }
jQuery.get(url, function(data) {
jQuery("#iframe").html(data.substring(16, data.length - 4));
});
jQuery("#example").text("");
return false;
});
});
-->