Learn how to set up and host an Aviasales search form for flights.
This article will guide you through setting up an Aviasales search form for flights.
To configure the search form and get its code for posting it on your platform:
1. Go to the Aviasales program page in your Travelpayouts account.
Note! You need to connect to the program to be able to access and customize its tools.
2. Select the Tools tab and then the Widgets section.
3. Click the Set up button for the Aviasales search form widget.
You can set up the search form and its appearance in the window that opens. All parameters are listed on the left side of the form, on the right you can see how the form will look when you make any changes.
Main settings
- Project — select the Project where the widget will be placed
- Your SubID — use this option to collect detailed statistics. More details on SubID
- Form type — the search form type:
- Avia — airline tickets only
- Flights + Hotels — a combined form (can be switched using tabs)
- Add checkbox show hotels — This adds a checkbox labeled "Show hotels" to the search form. When activated, it opens a tab for searching hotels on the search initialization page and the flight search is launched in a new tab.
- Add my referral link — adds a link Powered by Travelpayouts under the search form. More details in the article Referral program.
- Language — the language of the search form
- Currency — select the currency to display in search results
- Hosts — a website on which a list of tickets opens when users click on the Search button. To open tickets search on your website, create and configure a White Label, then select it in the list of domains.
Appearance settings
- Primary color, icon color, text color, input background color, background color, border color, focus color — customize the colors of the widget in HEX format
- Border radius, px — the radius of the rounding frame of the widget
- Hide labels — select to remove the labels from the widget
- Hide logo — select to remove the Aviasales logo from the search form
Filters settings
- Origin, destination — enter the departure and destination cities to be displayed in the widget by default. If this is not done, the departure city will be determined by the user’s IP address
To place a widget on your website, click Copy code and paste the code onto your website.
Example of the search form
What to do with the old search forms
Previously, you could find old format search widgets in the Aviasales and Hotellook affiliate programs, but as of May 6, 2024, we have removed the ability to customize them in your Travelpayouts account.
Any previously created search forms on your site will continue to work. However, unlike the new widgets, the old ones will no longer receive technical support or be enhanced with new features.
Therefore, we recommend transitioning to the new widgets. To do this, simply replace the code of each old search form widget on your website with the code of the new Aviasales or Hotellook widgets.
How to understand if the search form is old
If you are unsure whether new or old widgets are placed on your resource, we recommend comparing the tools by appearance or code.
Here's what the old search form looks like:
And this is what the new one looks like:
You can also find the old search form in the page code
<script charset="utf-8" src="//www.travelpayouts.com/widgets/dd...e9.js?v=2235" async></script>
You can search for a snippet of code from the old widget that is missing from the code of the new widget, e.g. travelpayouts.com/widgets/.