Aviasales hot tickets scraper avatar
Aviasales hot tickets scraper

Pricing

Pay per usage

Go to Apify Store
Aviasales hot tickets scraper

Aviasales hot tickets scraper

Scrapes hot tickets prices from Aviasales. Extracts destination, price, discount, and dates. Uses Selenium. Saves data to Apify dataset. Hot ticket page example for Moscow: https://www.aviasales.ru/?params=MOW1&service=hottickets&marker=70279

Pricing

Pay per usage

Rating

0.0

(0)

Developer

VolarAI

VolarAI

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

1

Monthly active users

4 days ago

Last modified

Share

English

Project Summary

This project is an Apify actor that scrapes hot ticket offers from Aviasales using Selenium and Chrome WebDriver. It extracts discounted flight ticket information from the Aviasales site, processes the data, and stores the results in the Apify dataset.

How to Use

  1. Install dependencies:

    • Python 3.8+ required
    • Install required packages:
      $pip install selenium apify-client
    • Ensure Chrome browser is installed and compatible ChromeDriver is available.
  2. Configure input:

    • The actor expects an input JSON file with the following fields:
      • departure_city (string): IATA code for the departure city (e.g., "KZN", "LED")
      • language (string): Language/market code ("ru", etc.)
  3. Run the script locally:

    $python src/main.py

    Or deploy on Apify platform.

What the Script Does

  • Initializes as an Apify Actor and gets input (departure city, language)
  • Builds the Aviasales URL for hot tickets with the specified parameters
  • Launches a Selenium Chrome WebDriver (headless mode supported)
  • Enqueues the target URL for processing
  • Scrapes hot ticket offers, extracting for each ticket:
    • Destination city (city of arrival)
    • Comments (if present)
    • Price and old (original) price
    • Flight date, start & end time, duration
    • Calculates discount percentage
  • Pushes the structured data to an Apify dataset

Expected Input Example

{
"departure_city": "KZN",
"language": "ru"
}

Note: Currently, the extraction and output of offers works only for the Russian language.

Output

Each extracted ticket will be stored as a record with fields:

  • City: destination city (город назначения)
  • Comment: special notes (if available)
  • price: current price
  • old_price: original price
  • discount: discount percentage
  • date, time_start, time_end, duration: timing info

Results are saved to the default Apify dataset and printed to the console during execution.


Русский

Описание проекта

Этот проект — Apify-актор, который с помощью Selenium и Chrome WebDriver парсит горячие предложения авиабилетов с сайта Aviasales. Скрипт собирает данные о скидках на билеты, обрабатывает их и сохраняет в датасет Apify.

Как использовать

  1. Установите зависимости:

    • Требуется Python 3.8+
    • Установите библиотеки:
      $pip install selenium apify-client
    • Убедитесь, что у вас установлен браузер Chrome и подходящий ChromeDriver.
  2. Настройте входные параметры:

    • Скрипт ожидает JSON-файл с такими полями:
      • departure_city (строка): IATA-код города отправления (например, "KZN", "LED")
      • language (строка): код языка/рынка ("ru" и др.)
  3. Запуск скрипта локально:

    $python src/main.py

    Или разверните на платформе Apify.

Описание работы скрипта

  • Инициализация актора Apify и получение входных параметров
  • Формирование целевого URL для горячих билетов Aviasales
  • Запуск Selenium Chrome WebDriver (поддерживается headless режим)
  • Добавление URL в очередь обработки
  • Сбор данных о билетах:
    • Город назначения
    • Комментарии (если есть)
    • Цена и старая (оригинальная) цена
    • Дата, время вылета и прилёта, длительность
    • Расчёт процента скидки
  • Сохранение структурированных данных в датасет Apify

Пример входных данных

{
"departure_city": "KZN",
"language": "ru"
}

Примечание: В настоящее время вывод предложений работает только на русском языке.

Выходные данные

Каждая запись содержит:

  • City: город назначения
  • Comment: примечания (если есть)
  • price: текущая цена
  • old_price: оригинальная цена
  • discount: процент скидки
  • date, time_start, time_end, duration: информация о времени

Результаты сохраняются в датасет Apify и выводятся в консоль.