Olery Developer Portal logo Olery Developer Portal

Method Path
GET https://agora.olery.com/v3/destination/:country_code/ratings

Returns per rating average and review count (as time series and/or grouped by traveler segment)

Output Format

The meta field contains general information about the API call.

The aggregated data is returned as an Array of JSON objects in the data field. Each object has the following fields:

Field Data Types Description
date Date Start date of each time period, if per parameter is used
segment String Segment, if segment parameter is used
subsegment String Segment, if subsegment parameter is used
value Float Rating value on a scale 0-100
topic String Topic of the rating
review_count Integer Count of reviews the ratings are from

The data is found in the ratings object for each group.

Parameters

Parameter Parameter Type Data Types Required Description
country_code path Integer true ISO alpha-2 country code
start_date query Date true Start date in ISO 8601 format
end_date query Date true End date in ISO 8601 format
per query String false Date grouping (day, week, month, quarter, year)
segment query String false Segment grouping (origin-country, composition, language and hotel fields, see below)
subsegment query String false Subsegment grouping (origin-country, composition, language and hotel fields, see below)

Segmentation

There are 3 segmentation possible. The first is a time series data grouping specified by the per parameter, which accepts the following values:

For the subsegment and the subsegment, review data or property fields can be used for per group analysis. Review data fields include:

Property fields are listed below

Example Call

https://agora.olery.com/v3/destination/NL/ratings?start_date=2020-01-01&end_date=2021-12-31&segment=composition&auth_token=XXX

Example Output

{
  "meta": {
    "per": null,
    "segment": "travel_composition",
    "subsegment": null
  },
  "data": [
    {
      "date": null,
      "segment": "Couples",
      "subsegment": null,
      "ratings": [
        {
          "value": 85.72090628218332,
          "topic": "overall",
          "review_count": 971
        },
        {
          "value": 80.37837837837836,
          "topic": "service",
          "review_count": 111
        },
        {
          "value": 90.95454545454545,
          "topic": "location",
          "review_count": 110
        },
        {
          "value": 84.16822429906541,
          "topic": "room",
          "review_count": 107
        },
        {
          "value": 86.66666666666667,
          "topic": "cleanliness",
          "review_count": 15
        },
        {
          "value": 84.0,
          "topic": "value",
          "review_count": 15
        },
        {
          "value": 88.33333333333333,
          "topic": "facilities",
          "review_count": 15
        },
        {
          "value": 80.69230769230771,
          "topic": "food",
          "review_count": 13
        }
      ]
    }
  ]
}

Response Statuses

Status Code Reason
200 OK
404 Company not found
403 No access, no authentication token
400 Missing or incorrect dates