Quicksearch

Quick search allows you to provide a short string and API will return a list of known properties, locations or regions that match given string.

There are two modes under which quick search operates:

  • General mode: Returns any region, location or property that matches given string. This is the simplest and default mode.

  • Local mode: Does the same as general mode, but returns only matches that have any offers in our local database. It also allows you to place additional restrictions on search query.

Quick search works by default in general mode. You can change mode with LocalSearch parameter. For more information see local search section.

API Endpoints

It's API endpoint is, /search/<content type>/quicksearch[?query=query]

For example:

  • For hotel: /search/hotel/quicksearch
  • For pauschal: /search/pauschal/quicksearch
  • For trips: /search/trips/quicksearch

You can mix or match different content types for this query. For example, URL /search/hotel,pauchal/quicksearch is a valid search endpoint, that will do quicks earch for only hotel and pauschal types.

You can use special endpoint any that will execute search for any content type. This is recommended endpoint if you do not set LocalSearch to true.

Search parameters

Search parameters are different than base search. The required paramater is only Query.

Paramater Format Description
Query string Search query
LocalSearch bool Enable local search mode (default = false)

In local search mode, all general search parameters are also allowed. Those place extra restrictions on returned results.

Local search

This whole section is applicable only if LocalSearch parameter was set to true.

Local search mode enables you to request only matches that actually have any offers in our database. For example, while search query veg will match Las Vegas, in local search this location will be in the results only, if there any offers with this location in our database.

Warning

Not all tour operators support local mode. The most notable examples are German (with exception of RIVA) tour operators. The API will return a field called FoundTourOperators that returns the list of tour operators, on which such search was actually performed on.

In this mode, you can also use all usual search parameters to place additional restrictions on returned results. See example for more information.

Even when local search mode is enabled StartDate, EndDate, and AdultCount fields are optional. However, omitting these fields, might cause a problem where quicksearch will return a match that for a later query (eg. with products) will not yield any results. This can happen when returned match does not have offers in searched date range or for given number of people.

Note

Example; search for troy without start and end date returns product Hotel Troya Tenerife (With GIATA ID 3693). However later products search for 2 adults from 01.09.2020 to 03.10.2020 for that Giata ID yields no results. This can happen when, such product have valid offers only in time period outside searched range (eg. from 01.11.2020 onwards) or is applicable for different number of persons (eg. min 4). That is why it is recommended that in this mode, to either always submit number of adults, start and end dates, or to design an application so that it can handle such cases gracefully.

Local search example

Take this example of a quicksearch query:

{
    "Query": "teneri",
    "LocalSearch": true,
    "AdultCount": 2,
    "ServiceType": ["AI"],
    "Region": [135]
}

We're looking for anything that matches keyword teneri. However, we want to see only results that also have an offer for 2 adults, all-inclusive service and is in region ID 135. For this query, quick search results will contain only results that:

  • For regions and locations: Any region or location that matches in name teneri, and has any (regardless of its name) offer for two adults, with all-inclusive service in region 135.

  • For products: Any product that matches in name teneri and has offers for two adults, with all-inclusive service in region 135.

Use case for such query, would be (such as) a quick search field on your website that will return results only for popular skiing resorts during winter months (albeit limited to tour operators that support such mode).

Filters and sorts

This query does not support filtering or sorting.

Response structure

Of special note is Types field; it is present only in local search mode and it contains the content type where a match was found.

Note

For example, if the Types field is set to ["hotel", "pauschal"], this indicates that the returned offer was found both for hotel and pauschal content types.

Warning

Products field is limited to maximum of 300 entries.

typedef Results = struct{
    # Contains list of tour operators, that the quicksearch found any
    # results for. This is present only in local search mode.
    FoundTourOperators array{struct{
        TourOperator     string
        TourOperatorName string
    }}

    # Contains list of results. If given category has not matched anything,
    # the structure is ommited from search results.
    Results struct{
        # Found regions that match given query
        Regions array{struct{
            # Region name that matched given query
            RegionName string

            # Region ID that matched given query
            RegionID   int

            # Content types that match given query. This is returned
            # only in local search mode.
            Types      array{string}

            # Region group this object belongs to
            RegionGroupID   int
            RegionGroupName string

        }}

        Locations array{struct{
            # Location name that matched given query
            LocationName string

            # Location ID that matched given query
            LocationID   int

            # Content types that match given query. This is returned
            # only in local search mode.
            Types      array{string}

            # Region group and region (with coressponding IDs) this
            # object belongs to
            RegionGroupID   int
            RegionGroupName string
            RegionID        int
            RegionName      string
        }}

        # Matched products
        Products array{struct{
            # Contains product name that mached given query
            ProductName string

            # Contains the product ID that mached given query. This
            # is an equivalent to an GIATA ID
            ProductID   int

            # Content types that match given query. This is returned
            # only in local search mode.
            Types      array{string}

            Picture   struct{
                # URL to object thumbnail picture (about 100x66 px)
                Thumbnail string

                # URL to object full-scale picture
                Full      string
            }

            # Object category (1-5)
            Category                 int

            # Rating of the offer (0-100)
            OfferRating              int

            # Percentage of guests recommending this object (0-100)
            RecommendationPercentage int

            Location struct{
                # Location name and its corresponding ID of this object
                LocationName    string
                LocationID      int

                # Region group and region (with coressponding IDs) this
                # object belongs to
                RegionGroupID   int
                RegionGroupName string
                RegionID        int
                RegionName      string

                # Object exact latitude and longitude. This information
                # is missing for some objects
                Latitude        float
                Longitude       float
            }

            Facts map{
                # Facts are short factoids about object properties.
                # Key in this map is a fact short code, and it's value
                # is a human-readable description of a factoid.
                string => string
            }
        }}
    }
}

Notable content differences

When local search is enabled quicksearch may not work, if additional search parameters are not compatible with all searched content types.

For example, when you enable local search and submit DepartureAirport parameter, query for endpoint /search/hotel,pauchal/quicksearch will return results only for pauschal type, since DepartureAirport is not applicable to hotel content type.

Example response

{
    "RequestID": "d17c4dcc-5fd33041eee08912222179",
    "FoundTourOperators": [
        {
            "TourOperator": "UNI",
            "TourOperatorName": "Uniline NETTO"
        },
        {
            "TourOperator": "PALM",
            "TourOperatorName": "Palma"
        },
        {
            "TourOperator": "SJKH",
            "TourOperatorName": "Sajko Turizem"
        },
        {
            "TourOperator": "PALH",
            "TourOperatorName": "Palma Croatia"
        },
        {
            "TourOperator": "IGT",
            "TourOperatorName": "Ignas Tour"
        },
        {
            "TourOperator": "ARC",
            "TourOperatorName": "Arcadia"
        },
        {
            "TourOperator": "KOMP",
            "TourOperatorName": "Kompas"
        },
        {
            "TourOperator": "LTO",
            "TourOperatorName": "Destinacija Rogla - Pohorje"
        },
        {
            "TourOperator": "ANX",
            "TourOperatorName": "Anxur Tours"
        },
        {
            "TourOperator": "RIVA",
            "TourOperatorName": "RIVA"
        },
        {
            "TourOperator": "MV",
            "TourOperatorName": "MountVacation"
        },
        {
            "TourOperator": "CENT",
            "TourOperatorName": "Center Turizem"
        },
        {
            "TourOperator": "BON",
            "TourOperatorName": "Bonus"
        },
        {
            "TourOperator": "UNIL",
            "TourOperatorName": "Uniline"
        },
        {
            "TourOperator": "POCI",
            "TourOperatorName": "Pocitnice.si"
        },
        {
            "TourOperator": "RLX",
            "TourOperatorName": "Relax"
        }
    ],
    "Results": {
        "Products": [
            {
                "ProductName": " Kresten Palace Hotel & Wellness",
                "ProductID": 1281,
                "Types": [
                    "pauschal"
                ]
            },
            {
                "ProductName": "Adler Autentic",
                "ProductID": 51300,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Dolomiten Residenz Sporthotel Sillian",
                "ProductID": 25423,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Gaarten",
                "ProductID": 295953,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Glamping Tents Mediteran Kamp Navis",
                "ProductID": 888132,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Hotel Falkensteiner Montenegro",
                "ProductID": 69076,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Hotel Troya Tenerife",
                "ProductID": 3693,
                "Types": [
                    "pauschal"
                ]
            },
            {
                "ProductName": "Kresten Royal Euphoria Resort",
                "ProductID": 202026,
                "Types": [
                    "pauschal"
                ]
            },
            {
                "ProductName": "Maritim Tenerife",
                "ProductID": 3647,
                "Types": [
                    "pauschal"
                ]
            },
            {
                "ProductName": "Perla Tenerife",
                "ProductID": 38243,
                "Types": [
                    "pauschal"
                ]
            },
            {
                "ProductName": "Petener",
                "ProductID": 2223298548193,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Tenuta Barco di Em\u00e9ra",
                "ProductID": 435741,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Tenuta San Francesco",
                "ProductID": 244876,
                "Types": [
                    "hotel"
                ]
            },
            {
                "ProductName": "Vienna Ostenda",
                "ProductID": 100483,
                "Types": [
                    "hotel"
                ]
            }
        ],
        "Regions": [
            {
                "RegionName": "Montenegro",
                "RegionID": 1052,
                "Types": [
                    "hotel"
                ]
            },
            {
                "RegionName": "Tenerife",
                "RegionID": 135,
                "Types": [
                    "pauschal"
                ]
            },
            {
                "RegionName": "Trentino-S\u00fcdtirol \/ Dolomiten",
                "RegionID": 100030,
                "Types": [
                    "hotel"
                ]
            }
        ],
        "Locations": [
            {
                "LocationName": "Primosten",
                "LocationID": 2284,
                "Types": [
                    "hotel"
                ]
            }
        ]
    }
}