Olery Developer Portal logo Olery Developer Portal

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

Returns two key metrics, the review count and average overall rating (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
review_count Integer Total number of reviews
overall_rating_average Float Average of the main rating of each review

The data is found in the stats 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)
topics query String false Filter the output by list of comma-separated rating categories
sources query Array false Filter the data by list of comma-separated sources names
countries query Array false Filter the data by list of comma-separated countries codes
languages query Array false Filter the data by list of comma-separated languages codes
compositions query Array false Filter the data by list of comma-separated compositions codes
exclude_sources query Array false Filter out the data by list of comma-separated sources names
exclude_countries query Array false Filter out the data by list of comma-separated countries codes
exclude_languages query Array false Filter out the data by list of comma-separated languages codes
exclude_compositions query Array false Filter out the data by list of comma-separated compositions codes

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/stats?start_date=2020-01-01&end_date=2021-12-31&segment=composition&auth_token=XXX

Example Output

{
  "meta": {
    "per": null,
    "segment": "composition",
    "subsegment": null,
  },
  "data": [
    {
      "empty": true,
      "date": null,
      "segment": "Couples",
      "subsegment": null,
      "stats": {
        "review_count": 952,
        "overall_rating_average": 85.77205882352945
      }
    },
    {
      "empty": true,
      "date": null,
      "segment": "Business",
      "subsegment": null,
      "stats": {
        "review_count": 156,
        "overall_rating_average": 83.79487179487178
      }
    },
    {
      "empty": true,
      "date": null,
      "segment": "Families",
      "subsegment": null,
      "stats": {
        "review_count": 789,
        "overall_rating_average": 83.98986058301647
      }
    },
    {
      "empty": true,
      "date": null,
      "segment": "Friends",
      "subsegment": null,
      "stats": {
        "review_count": 279,
        "overall_rating_average": 87.62007168458783
      }
    },
    {
      "empty": true,
      "date": null,
      "segment": "Solo",
      "subsegment": null,
      "stats": {
        "review_count": 303,
        "overall_rating_average": 79.5874587458746
      }
    },
    {
      "empty": true,
      "date": null,
      "segment": "Group",
      "subsegment": null,
      "stats": {
        "review_count": 29,
        "overall_rating_average": 88.3103448275862
      }
    }
  ]
}

Response Statuses

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