{
  "openapi": "3.0.1",
  "info": {
    "title": "Ozon Travel Train Tickets Scraper · Ж/д билеты Ozon Travel",
    "description": "Ozon Travel train tickets for your route and date: every train with times, stations, car types, free seats, price per seat, stops, price calendar. Ж/д билеты Ozon Travel по маршруту и дате: поезда, вокзалы, типы вагонов, свободные места, цена за место, остановки.",
    "version": "0.1",
    "x-build-id": "pkcU8gjD2ORov5l19"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/theshark~ozon-trains-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-theshark-ozon-trains-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/theshark~ozon-trains-scraper/runs": {
      "post": {
        "operationId": "runs-sync-theshark-ozon-trains-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/theshark~ozon-trains-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-theshark-ozon-trains-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "trains": {
            "title": "Routes · Маршруты",
            "type": "array",
            "description": "One route per line: city or station names in Russian («Москва — Санкт-Петербург»: the site finds the station codes), «Express» station codes (2000000-2004000) or a train search link from ozon.ru/travel/railway (it keeps its own date and passengers). A return date — one more search back.<br><br>По маршруту в строке: названия городов или станций по-русски («Москва — Санкт-Петербург»: коды станций найдёт сайт), коды станций «Экспресс» (2000000-2004000) или ссылка на поиск поездов с ozon.ru/travel/railway (в ней своя дата и пассажиры). Дата обратно — ещё один поиск, обратно.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "departure_date": {
            "title": "Departure date · Дата отправления",
            "type": "string",
            "description": "YYYY-MM-DD. Needed for routes of flights and trains (links have their own dates).<br><br>ГГГГ-ММ-ДД. Нужна для маршрутов авиабилетов и поездов (у ссылок свои даты)."
          },
          "return_date": {
            "title": "Return date · Дата обратно",
            "type": "string",
            "description": "YYYY-MM-DD, a round trip (trains: a second search back); empty — one way.<br><br>ГГГГ-ММ-ДД, туда-обратно (поезда: второй поиск, обратно); пусто — в одну сторону."
          },
          "departure_days_ahead": {
            "title": "Departure days from run day · Отправление через дней от запуска",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Instead of fixed dates — for scheduled runs: departure this many days after the run day (each run looks at «a week ahead»). 0 — the departure date above; if the departure date is set, it wins.<br><br>Вместо точных дат — для запусков по расписанию: отправление через столько дней после дня запуска (каждый запуск смотрит «через неделю»). 0 — дата отправления выше; если она задана, главная — она.",
            "default": 0
          },
          "return_after_days": {
            "title": "Return after days · Обратно через дней",
            "minimum": 0,
            "maximum": 180,
            "type": "integer",
            "description": "With «Departure days from run day»: return this many days after departure (0 — one way).<br><br>С «Отправление через дней от запуска»: обратно через столько дней после отправления (0 — в одну сторону).",
            "default": 0
          },
          "passengers": {
            "title": "Adults · Взрослых",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adults and children 10 and older. Prices are per seat; up to 4 passengers with a seat.<br><br>Взрослые и дети от 10 лет. Цены — за место; до 4 пассажиров с местом.",
            "default": 1
          },
          "children": {
            "title": "Children under 10 with a seat · Детей до 10 лет с местом",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Adults and children with a seat — up to 4.<br><br>Взрослых и детей с местом — до 4.",
            "default": 0
          },
          "infants": {
            "title": "Children under 5 without a seat · Детей до 5 лет без места",
            "minimum": 0,
            "maximum": 9,
            "type": "integer",
            "description": "Not more than adults.<br><br>Не больше, чем взрослых.",
            "default": 0
          },
          "train_car_types": {
            "title": "Only these car types · Только эти типы вагонов",
            "type": "array",
            "description": "Only trains with these cars, and the cheapest seat — among them. Empty — any cars.<br><br>Только поезда с такими вагонами, и самое дешёвое место — среди них. Пусто — любые вагоны.",
            "items": {
              "type": "string",
              "enum": [
                "sitting",
                "reserved",
                "compartment",
                "luxury",
                "soft"
              ],
              "enumTitles": [
                "Seats (sitting) · Сидячий",
                "Platzkart (open sleeper) · Плацкарт",
                "Coupe (4-berth) · Купе",
                "SV (2-berth) · СВ",
                "Lux · Люкс"
              ]
            },
            "default": []
          },
          "train_sorting": {
            "title": "Train order · Порядок поездов",
            "enum": [
              "departure",
              "arrival",
              "duration",
              "price",
              "places"
            ],
            "type": "string",
            "description": "Which trains come first (and are taken when «Products per query or link» limits them). All trains come at once — the cheapest seat of a search is always among all of them.<br><br>Какие поезда идут первыми (и берутся, когда их ограничивает «Товаров на запрос или ссылку»). Все поезда приходят сразу — самое дешёвое место поиска всегда среди всех.",
            "default": "departure"
          },
          "max_results": {
            "title": "Trains per route · Поездов на маршрут",
            "minimum": 0,
            "type": "integer",
            "description": "0 — all trains Ozon found (they come at once). Also limited by your max total charge. The cheapest seat — among all trains.<br><br>0 — все поезда, что нашёл Озон (они приходят сразу). Ограничивает и максимальная сумма списаний запуска. Самое дешёвое место — среди всех поездов.",
            "default": 5
          },
          "train_cars": {
            "title": "Cars and seats · Вагоны и места",
            "type": "boolean",
            "description": "Opens the «Choose a car and seats» window of every train: each car with its number, class («3Б», «2К»…), free seats, lower and upper berths, price with and without Ozon Bank, services. +2 requests per train, so up to 20 trains per search; not for trips with a transfer.<br><br>Открывает окно «Выбор вагона и мест» каждого поезда: каждый вагон с номером, классом («3Б», «2К»…), свободными местами, нижними и верхними, ценой с Ozon Банком и без, услугами. +2 запроса на поезд, поэтому до 20 поездов на поиск; не для поездок с пересадкой.",
            "default": false
          },
          "train_routes": {
            "title": "Train route (stops) · Маршрут поезда (остановки)",
            "type": "boolean",
            "description": "Opens the «Train route» window of every train: stops with arrival and departure times, stop duration, carrier, e-registration. +1 request per train, so up to 20 trains per search.<br><br>Открывает окно «Маршрут поезда» каждого поезда: остановки со временем прибытия и отправления, стоянка, перевозчик, электронная регистрация. +1 запрос на поезд, поэтому до 20 поездов на поиск.",
            "default": false
          },
          "output_language": {
            "title": "Output language · Язык вывода",
            "enum": [
              "en",
              "ru"
            ],
            "type": "string",
            "description": "Language of the Excel workbook, CSV, change details, run status and log. Ozon's own data (product names, characteristics, reviews) comes in the site language (the Language field).<br><br>Язык книги Excel, CSV, подробностей изменений, статуса запуска и лога. Данные самого Озона (названия товаров, характеристики, отзывы) — на языке сайта (поле «Язык сайта»).",
            "default": "en"
          },
          "sessions": {
            "title": "Sessions per storefront · Сессий на витрину",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Anonymous Ozon buyers working at the same time on each storefront, each with its own proxy session: 2 — about twice as fast as 1. Sessions are kept in the history store, so a browser opens for a new one only once.<br><br>Анонимные покупатели Озона, которые работают одновременно на каждой витрине, у каждого — своя сессия прокси: 2 — примерно вдвое быстрее, чем 1. Сессии хранятся в хранилище истории, поэтому браузер для новой открывается только один раз.",
            "default": 8
          },
          "browsers": {
            "title": "Browsers at once · Браузеров одновременно",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "A browser (~320 MB) opens only to get a new Ozon session (they are kept in the history store, so mostly on the first run). Several at once — the first run starts faster. Capped by run memory: 1 GB — 1, 2 GB — 3, 4 GB — 7.<br><br>Браузер (~320 МБ) открывается, только чтобы получить новую сессию Озона (они хранятся в хранилище истории — значит, в основном при первом запуске). Несколько сразу — первый запуск начинается быстрее. Ограничено памятью запуска: 1 ГБ — 1, 2 ГБ — 3, 4 ГБ — 7.",
            "default": 3
          },
          "history_store": {
            "title": "History store · Хранилище истории",
            "type": "string",
            "description": "Name of the key-value store in your account that keeps price history between runs. Different names — separate histories. Runs with the same store don't overlap: a second one waits up to 10 minutes for the first to finish.<br><br>Имя key-value store в вашем аккаунте, где хранится история цен между запусками. Разные имена — отдельные истории. Запуски с одним хранилищем не пересекаются: второй ждёт до 10 минут, пока закончит первый.",
            "default": "ozon-trains-history"
          },
          "proxy_ru": {
            "title": "Your proxy for ozon.ru · Свои прокси для ozon.ru",
            "type": "string",
            "description": "user:pass@host:port, residential, Russia — one per line: every Ozon session gets its own (one line — all sessions share it). Empty — the actor's built-in proxies of this country (included in the price).<br><br>user:pass@host:port, резидентные, Россия — по одному в строке: каждой сессии Озона — свой (одна строка — общий на все сессии). Пусто — встроенные прокси актора этой страны (входят в цену)."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}