C# SDK engine

Google Travel Explore

Google Travel Explore destinations and flight ideas from a departure city or airport.

engine: google_travel_explore constant: XylopSearchEngines.GoogleTravelExplore GET /search
C# пример

Вызов через XylopSearchClient

using Xylop.Api.Client;

var client = new XylopSearchClient(new HttpClient(), "YOUR_API_KEY");

using var response = await client.SearchJsonAsync(
    XylopSearchEngines.GoogleTravelExplore,
    new Dictionary<string, string?>
    {
        ["departure_id"] = "AUS",
        ["arrival_id"] = "LAX",
    });

Для типизированного режима используйте `SearchAsync<TResponse>` и response-модель из `Xylop.Logic.SerpApiResponses.*`, которая входит в пакет C# SDK.

Endpoint

HTTP контракт

URL
https://api.xylop.ru/search
Engine
google_travel_explore
API key
Передается SDK автоматически из настроек клиента.
Входные параметры

Параметры запроса

Параметр Тип Обязателен Значение Описание
api_key SDK string Да Ключ Xylop API. В C# SDK задается один раз в XylopSearchClientOptions.ApiKey или в конструкторе клиента.
engine SDK string Да google_travel_explore Google Travel Explore engine.
departure_id string Да AUS Departure airport code or kgmid.
arrival_id string Нет LAX Optional arrival airport or kgmid.
Выходные параметры

Поля ответа

Поле Тип Источник Описание
search_metadata object пример ответа Метаданные запроса: статус, идентификатор, время выполнения и служебная информация провайдера.
destinations array пример ответа Типизированное поле ответа для этого engine; структура зависит от upstream-провайдера и параметров запроса.
JSON

Пример ответа

{
  "search_metadata": { "status": "Success" },
  "destinations": [
    {
      "destination_id": "/m/02_286",
      "name": "New York",
      "country": "United States"
    }
  ]
}