The full code of the Aviasales search form

To get full code of search form and edit fields of it, clear the check box Short code.

The form code becomes:

<script charset="UTF-8" type="text/javascript">
window.TP_FORM_SETTINGS = window.TP_FORM_SETTINGS || {};
window.TP_FORM_SETTINGS["51226f99649ab833e300000a"] = {
"handle": "51226f99649ab833e300000a",
"widget_name": "Wix",
"border_radius": "5",
"additional_marker": "wix",
"width": 940,
"show_logo": true,
"show_hotels": true,
"form_type": "avia_hotel",
"locale": "en",
"multi_city": true,
"currency": "usd",
"sizes": "default",
"search_target": "_parent",
"search_in_iframe": false,
"active_tab": "avia",
"search_host": "",
"hotels_host": "",
"hotel": {
"name": "Ритц-Карлтон Москва",
"location": "",
"hotels_count": " отелей",
"search_id": "333601",
"search_type": "hotel"
"hotel_alt": "Hotellook - best prices on hotels worldwide. Compare prices across 30 booking websites and save on your hotel.",
"avia_alt": "",
"id": 316,
"marker": "16886.wix",
"origin": {
"name": "Moscow",
"iata": "MOW"
"destination": {
"name": "Berlin",
"iata": "BER"
"color_scheme": {
"name": "white_blue",
"icons": "icons_blue",
"background": "#ffffff",
"color": "#000000",
"border_color": "#cccccc",
"button": "#03bae4",
"button_text_color": "#ffffff"
"hotels_type": "hotellook_host",
"best_offer": {
"locale": "en",
"currency": "usd",
"marker": "16886.wix",
"search_host": "",
"offers_switch": false,
"api_url": "//",
"routes": []
"hotel_logo_host": "",
"search_logo_host": "",
"hotel_marker_format": "marker=",
"hotelscombined_marker": null
<script charset="UTF-8" src="//"></script>

Parameters of search form

  • handle — a unique id form (can’t be modified!)
  • widget_name — form name
  • border_radius — rounding radius of borders
  • additional_marker — additional marker
  • width — width of form
  • show_logo — display a logo of Aviasales (if true)
  • show_hotels — display hotels search tab
  • form_type — type of form (only air, only hotels and mixed)
  • locale — language of form (can’t be changed without re-saving the form in the personal account, since the translations are written in the form js-code)
  • multi_city — activate multi-city search (true)
  • currency — select the currency to display in search results
  • sizes — responsible for size of the form (a / compact)
  • search_target — how search opens (in a new window, in a new tab, in the same window)
  • search_in_iframe — true - open the search result on the page with embedded White Label iframe, false - standard method. The search result is opened on the domain / page specified in the search_host field
  • active_tab — name of the active tab by default
  • search_host — site where flight search results open (can be specified in your White Label). Note! To open search result on the page with the White Label embedded in the iframe, you should create and configure a White Label, add its iframe code on the required page and paste the address of this page in this field.
  • hotels_host — site where hotel search results open (can be specified in your White Label or a link to the page with the iframe code of White Label)
  • hotel — information about default hotel
  • powered_by — adds a link Powered by Travelpayouts under the search form. More details in the article Referral program
  • id — service parameter
  • marker — affiliate marker
  • origin — name or IATA code for point of departure. IATA code is shown by uppercase letters, for example, MOW
  • destination — name or IATA code for flight destination. IATA code is shown by uppercase letters, for example, MOW
  • color_scheme — color scheme of form
  • hotels_type — service parameter
  • best_offer — settings of a block Best Offer
  • hotel_logo_host — service parameter
  • search_logo_host — service parameter
  • hotel_marker_format — service parameter
  • hotelscombined_marker — service parameter
  • responsive — paste true if this form is responsive

Pay attention! If you are working with the full version of a code, you must make changes in the code directly on the page where it is embedded.