ParrAPI

Online Distributor API Guide

Search (/products)

The search call allows you to search the ParrAPI data and return high level information for products. There are a variety of parameters you can use to filter your results and to control the output. This page gives details and examples of each of these parameters. You can combine the different filters to return highly relevant results.

Please enter your distributor key in the "Api Key" field below and click "Update" button to update the example links on this page with the host and the api key.
The host field below is defaulted to Production (api.parrapi.com). If you would like to retrieve the information from the Staging, please replace "api.parrapi.com" with "api.katover.com".

Quick Start

The following example returns all the hotels with the keyword 'views' and results formatted in JSON.

https://[host]/api/atlas/products?key=[key]&cla=HOTEL&term=views&out=JSON

Full Text Search (&term)

The 'term' parameter allows for a full text search of the ParrAPI data. The API will return all the listings containing the given keywords in the listing name, listing description, service name, service description, alternate name, classifications and attributes. The search uses common techniques such as ignoring common words and dropping common word endings. Results will be ordered by relevancy unless the order parameter is used.

OPTIONS :
Any text value. Enclosing terms in quotes will result in phrase searching.
DEFAULT :
-
EXAMPLE :
https://[host]/api/atlas/products?key=[key]&term=beaches
Filter the search results containing the keyword 'beaches' in listing name, listing description, service name, service description, alternate name, classifications and attributes.

Category Filter (&cats)

The 'cats' parameter allows you to filter the results by categories such as Accommodation, Attractions or Events. You can filter the search results by multiple categories using a comma separated list. The response will contain the listings with any of the requested categories.

OPTIONS :
A valid category ID e.g. (ACCOMM, ATTRACTION, DESTINFO, INFO, RESTAURANT, etc).
Please use the categories static endpoint to retrieve the available category ID
DEFAULT :
If category filter is not specified, all listings irrespective of the categories will be returned.
EXAMPLE :
https://[host]/api/atlas/products?key=[key]&cats=ACCOMM,ATTRACTION
Filter the search results with Accommodation and Attraction categories only.

Classification Filter (&cla)

Each ParrAPI category has a set of classifications to identify the different types of listings within that category. The 'cla' parameter allows you to filter the results by classification such as Hotels, Parks and Gardens, Bars, etc. You can filter the search results by multiple classifications using a comma separated list. The response will contain the listings with any of the requested classifications.

OPTIONS :
A valid classification e.g. (Hotel, Shopping Tours, Sightseeing Tours, etc).
Please use the classifications static endpoint to retrieve the available classification ID.
DEFAULT :
Any
EXAMPLE :
https://[host]/api/atlas/products?key=[key]&cla=HOTEL,RESORT
Filter the search results containing the HOTEL and RESORT classifications only.

Attribute Filter (&att)

Each ParrAPI listing has a set of associated attributes to provide more information about the facilities or activities available at the location.
The 'att' parameter allows you to filter the results by attributes.
You can filter the search results by multiple attributes using a comma separated list (to apply an AND condition in search) and/or a pipe seperated list (to apply an OR condition in search) to find specific sets of listings.
The 'att' parameter can also be used to filter the results by tags. Alternately, 'tags' parameter can be used to filter the results by tags

OPTIONS :
The parameter value is a combination of the attribute type ID followed by attribute ID with the spaces removed.
Example: ENTITY FAC BBQ becomes ENTITYFACBBQ.
To obtain the ID of the attribute, use the Attributes Static API call.
To obtain the ID of the attribute types, use the Attribute Types Static API call.
Note:
  • Attribute Type Id and Attribute Id for tags are case sensitive. Eg: &att=TAGAdventure
  • Tags with special character (especially ampersand - &) need to be URL encoded. Eg: Food&Wine = Food%26Wine
  • DEFAULT :
    Any
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&att=ENTITYFACBBQ,ACTIVITYCAMP
    Find all listings with the BBQ and CAMP attributes.

    https://[host]/api/atlas/products?key=[key]&att=ESC_TXA_DEFAULT|ESC_TXA_MULTI,ENTITYFACPETALLOW
    Find all 'Pet Friendly' products containing either single or multiple booking inventory.
    Note:
    • The AND/OR condition will work based on operator precedence i.e., AND condition will be evaluated first followed by the OR condition.
    • Due to operator precedence, the results in the above request may vary if the querystring parameter is specified as "&att=ESC_TXA_MULTI|ESC_TXA_DEFAULT,ENTITYFACPETALLOW"

    https://[host]/api/atlas/products?key=[key]&att=DEALTYPESBONUSOFFER
    Find all listings with the Bonus Offer deal type.

    External Product Search

    TXA enabled products are stored in the ParrAPI Database with the codes of TXA_DEFAULT and TXA_MULTI.
    Products denoted with TXA_DEFAULT means that there is a single point, where products with TXA_MULTI. have multiple booking points.
    To retrieve a list of products which are TXA enabled, the following filter can be applied - &att=ESC_TXA_DEFAULT|ESC_TXA_MULTI.
    The GetProduct call (under the EXTERNAL system) will return the V3 short names for each product too.

    To retrieve products with specific social media links, the same filtering can be applied by appending the social media name reference at the end - &att=ESC_FACEBOOK.
    Please see the list below for the social media links references.

    VALID CODES :
    • ESC_ANDROIDAPP
    • ESC_APPLEAPP
    • ESC_BLOGPAGE
    • ESC_BOOKEASY
    • ESC_BOOKINGCOMURL
    • ESC_EXPEDIAID
    • ESC_FACEBOOK
    • ESC_FLICKR
    • ESC_FOURSQUARE
    • ESC_HOTELSCOMBINED_LINK
    • ESC_INSTAGRAM
    • ESC_OTHERURL
    • ESC_PINTEREST
    • ESC_TRIPADVISO - Social Media Link
    • ESC_TRIPADVISORID - External Partner ID
    • ESC_TRUSTYOUID
    • ESC_TWITTER
    • ESC_TXA_DEFAULT
    • ESC_TXA_MULTI
    • ESC_WEIBO
    • ESC_WECHAT
    • ESC_YOUTUBE
    • ESC_ZOMATOCLAIMED
    • ESC_ZOMATOUNCLAIMED

    Tags Filter (&tags)

    All ParrAPI products optionally has set of associated tags. The 'tags' parameter allows you to filter the results by tags.
    Tags are unique to distributor keys.
    To view a list of available tags for your distributor key please see Tags Static API call.

    OPTIONS :
  • Comma (,) separated tags imply AND condition in search
  • Pipe (|) seperated tags imply OR condition in search.

  • Note:
  • The parameter is case in-sensitive i.e., &tags, &Tags, &TAGS are valid
  • However, parameter value is case-sensitive as it is user-generated data
  • Parameter value should be obtained from 'Description' field in Tags Static API and not from 'AttributeId' field
  • DEFAULT :
    -
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&tags=Adventure,Family,Sports
    Find all products having all 3 tags: Adventure, Family and Sports tag.

    https://[host]/api/atlas/products?key=[key]&tags=Adventure|Family|Sports
    Find all products having any one of the 3 tags: Adventure, Family or Sports tag.

    Geospatial Search (&latlong and &dist)

    The 'latlong and dist' parameters allow you to search for products within a number of kilometres from a specified location. If you perform a geospatial search you will also be given a 'nearest location' in the results. If a product has multiple locations then this value is the closest location to your search position.

    Note that geospatial searches check product locations for all categories, and for Tour and Transport products will also check service locations.

    OPTIONS :
    A valid latitude an longitude combination separated by a comma. The 'dist' parameter takes an integer value.
    DEFAULT :
    If a location is provided the default search radius is 100km.
    EXAMPLE :

    Polygon Search (&ply)

    The 'ply' parameter allows you to Find all listings within a defined polygon.

    Note that polygon searches check product locations for all categories, and for Tour and Transport products will also check service locations.

    OPTIONS :
    A polygon defined in WKT format. The polygon must be closed so the start location should equal the end location.
    DEFAULT :
    -

    State Filter (&st)

    All ParrAPI products and service are associated with different States. You can query by State using the 'st' parameter to search within product-level location and/or 'servicest' to search within service-level location.

    OPTIONS :
    A valid state code e.g. NSW,QLD,NT,WA,SA,VIC,TAS,ACT.
    List of states can be retrieved using the States API call.
    DEFAULT :
    All states
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&st=NSW
    Find all products where product-level State = New South Wales

    https://[host]/api/atlas/products?key=[key]&servicest=QLD
    Find all products where service-level State = Queensland

    https://[host]/api/atlas/products?key=[key]&servicest=NT
    Find all products where product-level State = Queensland and service-level State = Northern Territory
    Search lookup will be performed within a single listing having product and service location

    Suburb/City Filter (&ct)

    All ParrAPI products and service are associated with different suburb/cities. You can query by suburb/city using the 'ct' parameter to search within product-level location and/or 'servicect' to search within service-level location.

    OPTIONS :
    A valid suburb/city name or id
    List of Suburb/City can be retrieved using the Suburbs API call.
    DEFAULT :
    All suburb/cities
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&ct=Brisbane City
    Find all products where product-level City = 'Brisbane City'.

    https://[host]/api/atlas/products?key=[key]&servicect=69000515
    Find all products where service-level City = 69000515 (Brisbane City).

    https://[host]/api/atlas/products?key=[key]&ct=Longreach&servicect=Innamincka
    Find all products where product-level City = Longreach, QLD and service-level City = Innamincka, SA.
    Search lookup will be performed within a single listing having product and service location

    Area Filter (&ar)

    All ParrAPI products are associated with different areas. You can query by area using the 'ar' parameter to search within product-level location and/or 'servicear' to search within service-level location.

    OPTIONS :
    A valid area name or area id or area code.
    List of areas can be retrieved using the Areas API call.
    DEFAULT :
    All areas
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&ar=Darwin Area
    Find all products where product-level Area = 'Darwin Area'.

    https://[host]/api/atlas/products?key=[key]&servicear=DWN
    Find all products where service-level Area = DWN (Darwin Area).

    https://[host]/api/atlas/products?key=[key]&servicear=39000006
    Find all products where service-level Area = 39000006 (Darwin Area).

    https://[host]/api/atlas/products?key=[key]&ar=Longreach Area&servicear=Flinders Ranges
    Find all products where product-level area = 'Longreach Area' (QLD) and service-level Area = 'Flinders Ranges' (SA).
    Search lookup will be performed within a single listing having product and service location

    Date Filter (&start, &end)

    Events have start and end dates. You can query a time period to find products that fall inside that range.

    OPTIONS :
    A pair of dates in [YYYY-MM-DD] format
    DEFAULT :
    -
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&cats=event&start=2018-01-01&end=2018-12-31
    Find all Events that occur between 1 Jan 2018 and 31 Dec 2018

    Indicative Rate From (&minRate)

    All ParrAPI products with an indicative rate greater than the specified 'minRate' parameter.

    OPTIONS :
    A decimal value representing an indicative rate
    DEFAULT :
    All rates
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&minRate=300
    Find all listings with an indicative rate starting from $300.

    Indicative Rate To (&maxRate)

    All ParrAPI products with an indicative rate less than specified maxRate parameter.

    OPTIONS :
    A decimal value representing an indicative rate
    DEFAULT :
    All rates
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&maxRate=300
    Find all listings with an indicative rate up to $300.

    Star Rating Filter (&starrating)

    All Accommodation listings that match the specified Star Rating parameter.

    OPTIONS :
  • A comma seperated list of numbers representing star ratings

  • Note:
  • Star rating is applicable to Accommodation category only
  • Minimum star rating is 1 and maximum star rating is 5
  • -1 represents listings without star ratings
  • VALID VALUES :
    -1, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5
    DEFAULT :
    All listings with/without star ratings
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&starrating=5
    Find all listings that are 5 star rated

    https://[host]/api/atlas/products?key=[key]&starrating=1,1.5,2,2.5,3
    Find all listings rated between 1 to 3 stars

    https://[host]/api/atlas/products?key=[key]&starrating=-1
    Find all listings that does not have any star ratings

    Reduced Response (&dsc)

    This parameter allows you to request a reduced output with no description. This can be used as a performance improvement where the description is not used from the initial search.

    OPTIONS :
    true or false
    DEFAULT :
    true
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&dsc=false
    Find all products but do not return the description field in the search results.

    Paging (&pge and &size)

    There are a couple of parameters to control paging. These are 'pge' for page number and 'size' for results per page. To enable you to calculate the number of pages the 'number of results' is returned from the search call.

    OPTIONS :
    Any page number / page size valid for the number of results returned.
    Note: Paging starts from "1"
    DEFAULT :
    none
    EXAMPLE :

    Output (&out)

    Results can be requested in JSON or XML format.

    OPTIONS :
    xml or json
    DEFAULT :
    xml
    EXAMPLE :

    Market Variant (&mv)

    To obtain results in a different market variant you can use the 'mv' parameter.

    OPTIONS :
    Language
    Language Code
    German
    GERMAN
    French
    FRENCH
    Italian
    ITALIAN
    DEFAULT :
    ENGLISH
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&mv=CHINESE-T
    Find all products in Traditional Chinese.

    Field List (&fl)

    You can use the 'fl' parameter to return a subset of the data from the default return results.

    OPTIONS :
    owning_organisation_id - Retrieves the 24 character alphanumeric string generated by database
    owning_organisation_number - Retrieves the 5-10 character alphanumeric string generated by database
    owning_organisation_name - Retrieves the name of the organisation
    product_id - Retrieves the 24 character alphanumeric string generated by database
    product_number - Retrieves the 9 character alphanumeric string that starts with 'AU'
    product_name - Retrieves the name of the product
    product_description - Retrieves the description of the product
    product_image - Retrieves the URL for the product image
    product_category - Retrieves the product category the product is associated to eg. Event
    product_classifications - Retrieves the list of product classifications that are associated to the product
    address - Retrieves the address of the product
    boundary - Retrieves the geo code location for the product
    start_date - For products in category Event, and Tours, the start date will indicate when it will begin
    end_date - For products in category Event, the end date indicates the last day of the event
    starrating - The star rating represents the quality accommodation standards.
    secretrating - The rating for Accommodation participating in Seychelles Secrets.
    rate_from - Is the minimum price of product.
    rate_to - Is the maximum price of product.
    comms - Retrieves details of phone, email, url and booking url for the product.
    comms_ph - Retrieves the phone number for the product if it exists. This field can have primary and secondary phone numbers.
    comms_em - Retrieves the email address for the product if it exists.
    comms_url - Retrieves the website url for the product if it exists.
    comms_burl - Retrieves the booking url for the product if it exists.
    journey_distance - Retrieves the total length of a journey. This field is specifically for Journey category products
    journey_unit - Retrieves the units (kms or mtr) for the length of the journey. Use with journey_distance.
    status - Returns the status of the listing. Can be one of 3 states - ACTIVE, INACTIVE, EXPIRED. Please see delta for usage.
    next_occurrence - Retrieves the date of next occurrence of the event.
    product_update_date - Returns the last updated timestamp of the listing.
    DEFAULT :
    By default we return product_id, product_number, status, owning_organisation_id, owning_organisation_number, owning_organisation_name, product_name, product_description, product_category_id, product_image, boundary, addresses, next_occurrence, score, product_pixel_url

    Order (&order)

    You can use the order parameter to sort the results

    OPTIONS :
    The following sorting options are available along with the capability to post fix with "asc" to sort by ascending or "desc" to sort by descending order.
  • If post fix ('asc', 'desc') is not specified, the default ordering is ascending.
  • Post fix ('asc', 'desc') is not valid for random sorting (rnd) and seeded random search (rand_{seedvalue})

  • Parameter value
    Description
    dist
    sort by only the distance away from the specified latlong

    lang
    sort results by language. Results will be sorted by translations at the top followed by non-translated products. Should be used with &mv parameter, otherwise has no effect.

    rnd
    Sort results in random order on a single/current page only

    product_update_date
    Sort results based on the last updated timestamp of the listing

    rand_{seedvalue}

    'Random Seeded Search'. By specifying a seed value, you can ensure randomly ordered set of results are unique during pagination i.e., same set of results across different pages for the given session.

    Implementation guide:

  • An initial request to the server with the seed value contains “Set-Cookies” field in the response header with the cookie name: “b1pi” and a cookie value (eg: “vvM4QVn1FsuIOlIEwyRke/zj8vgyFT9ozES1XpqUWlc”)
  • Pass the same cookie in the subsequent requests via request header with different page numbers to obtain unique results sorted randomly
  • Additional information:
    • HTTP clients like ‘Guzzle’ has built-in cookie management that automatically tracks the cookies across sessions


    Note:
  • You can sort results by any of the fields highlighted in the Field List (&fl) parameter as long as the request contains those Field List parameters.
  • Polygon Search results cannot be sorted using "&order" parameter. Please see example in Additional Query Filter to sort Polygon Search results.

  • DEFAULT :
    By default, the results are sorted randomly (rnd) for the given page only.
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&cats=Attraction&latlong=-33.855035,151.216205&dist=10&order=dist desc
  • Return all Attraction listings within 10 KM radius of the given latlong (Sydney Opera House) sorting the result by descending order of the distance.
  • By default, the results will be sorted by ascending order of distance so, specifying the post fix 'asc' is optional

  • https://[host]/api/atlas/products?key=[key]&mv=CHINESE-T&order=rnd,lang
    Return all listings, first those with Chinese translations and then those without. Within those categories, order the products randomly.

    https://[host]/api/atlas/products?key=[key]&order=rnd
  • Return all listings sorting the results randomly for the given page only.
  • Random ordering with pagination (eg: &pge=2&order=rnd) might show duplicate products/listings from previous page as random order (rnd) is applicable for the given page only.

  • https://[host]/api/atlas/products?key=[key]&order=rand_2018-05-15
  • Return all listings sorting the results randomly ensuring the results are unique across all pages for the given session.
  • Note:
    • '2018-05-15' in the above example is the seed value which can be replaced with any value and must be constant during Pagination for the given seed value and session.
    • Clearing cookies and re-trying will return different set of results but those results will be unique and in random order across all pages for the given seed value and session.

    https://[host]/api/atlas/products?key=[key]&fl=starrating&order=starrating desc
  • Return all listings sorting the results by descending order of starrating.
  • By default, the results will be sorted by ascending order of starrating so, specifying the post fix 'asc' is optional

  • https://[host]/api/atlas/products?key=[key]&fl=next_occurrence&order=next_occurrence desc
    Return all listings sorting the results by descending order of the date value displayed within 'next_occurrence' field.

    https://[host]/api/atlas/products?key=[key]&order=product_update_date
    Return all listings sorting the results based on the last updated timestamp.

    Additional Query Filter (&additionalQuery)

    Additional query filter allows users to filter search results by using any fields associated with the listings/products.

    OPTIONS :
  • Valid field-value pair
  • Query parameter and field-value pair are case-sensitive
  • DEFAULT :
    -
    EXAMPLE :
    https://[host]/api/atlas/products?key=[key]&additionalQuery=owningOrganisationName:("DEWNR")
    Find all products owned by the organisation name: "DEWNR".

    https://[host]/api/atlas/products?key=[key]&additionalQuery=owningOrganisationNumber:("SAAS86")
    Find all products owned by the organisation number: "SAAS86" (Organisation Name: DEWNR).

    https://[host]/api/atlas/products?key=[key]&additionalQuery=owningOrganisationId:("56b1f48a44feca3df2e4ae5c")
    Find all products owned by the organisation ID: "56b1f48a44feca3df2e4ae5c" (Organisation Name: DEWNR).

    https://[host]/api/atlas/products?key=[key]&additionalQuery=productCategory:Attraction AND owningOrganisationName:("DEWNR","Tourism Barossa","City of Adelaide")
    Find all ATTRACTION products owned by the organisations: "DEWNR","Tourism Barossa","City of Adelaide".

    https://[host]/api/atlas/products?key=[key]&additionalQuery=productNumber:("AU0147955","AU0022815","AU0024549")
    Find all products by their respective product numbers.

    https://[host]/api/atlas/products?key=[key]&additionalQuery=productId:("56b249b9b042386245d51fa9","5a1cd3e820a80937204e6656","56b2481ed270154b45549dcf")
    Find all products by their respective product ID's.

    https://[host]/api/atlas/products?key=[key]&additionalQuery=-productId:("56b263fd2880253d74c4c8ff","58c0cd0d179149fb2665af70")
  • Filter search results by excluding product(s) using their ID's.
  • Note:This functionality can be used with any input parameters which precede with '-' indicating negate

  • https://[host]/api/atlas/products?key=[key]&order=next_occurrence asc&additionalQuery=productGeoCodeLocation:("Intersects(POLYGON((153.014875 -27.362723, 153.165198 -27.416181,153.192144 -27.522111, 152.935470 -27.537159, 152.956051 -27.444688, 153.014875 -27.362723)))")
  • Find all Event products using Polygon Search and sort the results by next occurrence date of the Event

  • https://[host]/api/atlas/products?key=[key]&additionalQuery=productPostcode:("4000","4870")
  • Filter search results by the postcodes: 4000 and 4870

  • https://[host]/api/atlas/products?key=[key]&additionalQuery=isConfirmed:true&cats=EVENT
  • Filter search results by Confirmed Events

  • https://[host]/api/atlas/products?key=[key]&additionalQuery=isConfirmed:false&cats=EVENT
  • Filter search results by Unconfirmed Events

  • https://[host]/api/atlas/products?key=[key]&additionalQuery=hasDeals:true
  • Filter search results by listings having Deals & Offers. Replace the value 'true' with 'false' to filter the results by listings that do not have Deals & Offers.