Performing a complex boolean query
POST
/api/v1.1/{country_code}/query-builder/run-query/Supports running complex boolean queries on our dataset.
Queries can be based around a demand or salary primary metric, contain one or more filter rules, and an optional breakdown.
Request
A two character code that specifies which country dataset to query.
The metric to be reported.
The date range to be used for the report.
Specifies the date range as absolute.
The start date for the date range in ISO8601 format (YYYY-MM-DD).
The end date for the date range in ISO8601 format (YYYY-MM-DD).
Specifies the filtering to apply to the query.
Specifies that this is a rule.
The dimension (facet) on which to filter.
The operator to apply when filtering.
The filter target type. The type of target depends on the selected dimension.
If the dimension is occupation or skill, a taxonomy ID is required.
Specifies whether the output should be broken down by a specific dimension.
The dimension (facet) by which to breakdown the results..
If the breakdown dimension is occupation or skill, a taxonomy ID is required.
If the breakdown dimension is location, a location type ID must be provided.
{
"metric": "demand",
"date_range": {
"type": "absolute",
"start": "2023-07-19",
"end": "2024-07-22"
},
"filter": {
"type": "rule",
"dimension": "apprenticeship_level",
"operator": "eq",
"target": {
"type": "object",
"id": 0,
"name": "string"
},
"taxonomy_id": 0
},
"breakdown": {
"dimension": "apprenticeship_level",
"taxonomy_id": 0,
"location_type_id": 0
}
}
Request samples
Responses
Specifies which metric (demand or salary) the query was based on.
The aggregated value of the selected metric over the selected date range and filtered by the given rules. Only present if no breakdown dimension was specified in the query.
An object containing the type and value of the metric.
The dimension (facet) by which the results have been broken down.
Each object in the array represents the aggregated value of the selected metric, for each result in a breakdown. Only present if a breakdown dimension was specified in the query.
An object containing the type and value of the metric.
An object specifying the a single instance of the breakdown facet.
Each object in the array represents the metric value at a (weekly) point in time in the selected date range. If a breakdown dimension was specified in the query, there may be multiple RawDataObjects for each date, one for each result in the breakdown. The data in this field can be used to plot time series charts.
A date-time in ISO 8601 format.
The value of the metric.
The instance of the breakdown dimension (if specified).