Adzuna Intelligence API
HomeKnowledge BaseAbout
HomeKnowledge BaseAbout
  1. Complex Queries
  • Introduction
  • Access and Authentication
  • Taxonomies
  • Core Demand Data
    • Overview
    • Get the total number of postings
      GET
    • Get the total number of postings over time
      GET
    • Get the number of new postings
      GET
    • Get the number of new postings over time
      GET
    • Get posting duration data
      GET
    • Get time to fill data
      GET
  • Interest Quotient Data
    • Overview
    • Get interest quotient
      GET
    • Get interest quotient over time
      GET
  • Compensation Data
    • List job benefits
      GET
    • Search job benefits
      GET
    • Get mean and median salary
      GET
    • Get mean and median salary over time
      GET
    • Get salary distribution data
      GET
    • Get benefits offered
      GET
  • Location Data
    • List countries
    • List location (statistical area) types
    • List locations (statistical areas)
    • Search locations (statistical areas)
    • Get location quotient
    • Compare job demand acrosss geographic areas
    • Compare interest quotient across geographic areas
    • Compare location quotient across geographic areas
    • Compare median salary across geographic areas
  • Occupation Data
    • List occupation taxonomies
    • List occupation sectors (categories)
    • Search occupation sectors (categories)
    • List occupations
    • Search occupations
    • Get occupation sectors (categories) in demand
    • Get occupations in demand
    • Get popular occupation sectors (categories)
    • Get popular occupations
  • Industry Data
    • List industries
    • Search industries
    • Get industries hiring
    • Get popular industries
  • Skill Data
    • List skill taxonomies
    • List skill tags
    • Search skill tags
    • List skills
    • Search skills
    • Get requested skills
  • Education Data
    • List education levels
    • Search education levels
    • List education qualifications
    • Search education qualifications
    • Get requested education attainment
  • Apprenticeship Data
    • List apprenticeship levels
    • Search apprenticeship levels
    • List apprenticeship types
    • Search apprenticeship types
    • Get requested apprenticeship levels
  • Company and Employer Data
    • List companies
    • Search companies
    • Get companies hiring
    • Get popular employers
  • Public data
    • Claimant count
    • Gender pay gap
    • Job Density
  • Complex Queries
    • Overview
    • Defining a query
    • Specifying the primary metric
    • Specifying a date range
    • Supported dimensions
    • Specifying filters
    • Specifying a breakdown
    • Example queries
    • Performing a complex boolean query
      POST
  1. Complex Queries

Specifying filters

Filters can be added to your query using a combination of rules and combined rules as described below.

Rules#

The Rule object defines a simple rule that does not form part of a combined rule. In boolean terms, it would not form a parenthesed group.
Rule
type
enum<string> 
required
Specifies that this is a rule.
Allowed value:
rule
dimension
enum<string> 
required
The dimension (facet) on which to filter.
Allowed values:
apprenticeship_levelapprenticeship_typecategorycompanycontract_hourscontract_typeeducation_levelindustrylocationoccupationqualificationsalaryseniorityskillskill_tagworkplace_modelyears_of_experience
operator
enum<string> 
required
The operator to apply when filtering.
Allowed values:
eqneqgteltegtltanynone
target
required
The filter target type. The type of target depends on the selected dimension.
One of
type
enum<string> 
required
Specifies that this is an object filter target.
Allowed value:
object
id
integer 
required
The unique identifier of the taxonomy object.
name
string 
required
The name of the taxonomy object.
taxonomy_id
integer 
optional
If the dimension is occupation or skill, a taxonomy ID is required.

Example#

A simple filter rule to limit data to Adzuna Occupation Sector (category) 2 (IT Jobs):
"filter": {
    "type": "rule",
    "dimension": "category",
    "operator": "eq",
    "target": {
        "type": "object",
        "id": 2,
        "name": "IT Jobs"
    }
}

Combined rules#

For complex filtering, Rule objects can be combined with boolean AND or OR logic by defining a CombinedRule object.
Combined rules can also contain nested combined rules.
CombinedRule
type
enum<string> 
required
Specifies that this is a combined rule.
Allowed value:
combined_rule
logic
enum<string> 
required
Specifies whether to use AND or OR logic.
Allowed values:
andor
groups
array [anyOf] 
required
The rules or (nested) combined rules to combine.
object (Rule) 
optional
object (CombinedRule) 
optional

Example#

A combined filter rule that includes postings for Adzuna Occupation Sector/Category 2 (IT Jobs) but excludes apprenticeships:
"filter": {
    "type": "combined_rule",
    "logic": "and",
    "groups": [
        {
            "type": "rule",
            "dimension": "category",
            "operator": "eq",
            "target": {
                "type": "object",
                "id": 2,
                "name": "IT Jobs"
            }
        },
        {
            "type": "rule",
            "dimension": "apprenticeship_level",
            "operator": "none"
        }
    ]
}

Any and None operators#

Some dimensions allow filtering using the operators any or none. When there operators are used, the target property must be omitted from the rule definition.
"filter": {
    "type": "rule",
    "dimension": "apprenticeship_level",
    "operator": "any"
}

Filter targets#

When defining a filter rule, a filter target must be specified (unless using the any or none operator).
The type of target depends on the dimension being used in the rule.

ObjectFilterTarget#

An ObjectFilterTarget is used when the target dimension is an object defined in one of our taxonomies eg. occupation, skill, location, company etc.
ObjectFilterTarget
type
enum<string> 
required
Specifies that this is an object filter target.
Allowed value:
object
id
integer 
required
The unique identifier of the taxonomy object.
name
string 
required
The name of the taxonomy object.

Example#

Using an ObjectFilterTarget to filter a query by a specific Adzuna Occupation Sector (Category):
"filter": {
    "type": "rule",
    "dimension": "category",
    "operator": "eq",
    "target": {
        "type": "object",
        "id": 2,
        "name": "IT Jobs"
    }
}

StringFilterTarget#

A StringFilterTarget is used when the target dimension is filtered by defined string values.
StringFilterTarget
type
enum<string> 
required
Specifies this is a string filter target.
Allowed value:
string
value
string 
required
The target string value.

Example#

Using a StringFilterTarget to filter a query by a specific apprenticeship level:
"filter": {
    "type": "rule",
    "dimension": "apprenticeship_level",
    "operator": "eq",
    "target": {
        "type": "string",
        "value": "level_2"
    }
}

ScalarFilterTarget#

A ScalarTargetValue is used when the target dimension is a scalar value eg. salary.
ScalarFilterTarget
type
enum<string> 
required
Specifies that this is a scalar filter target.
Allowed value:
scalar
value
number 
required
The target scalar value.

Example#

Using a ScalarFilterTarget to limit a query to postings advertising a salary greater than or equal to £30,000:
"filter": {
    "type": "rule",
    "dimension": "salary",
    "operator": "gte",
    "target": {
        "type": "scalar",
        "value": 30000
    }
}
Previous
Supported dimensions
Next
Specifying a breakdown
Built with