POST
/
datasets
/
filter

Paste your API token to the authorization field. To get a token, Create an account and learn how to generate a token

General Description

  • A call to this endpoint starts the async job of filtering the dataset and creating a snapshot with filtered data in your account.

  • The maximum amount of time for the job to finish is 5 minutes. If the job doesn’t finish in this timeframe it will be cancelled.

  • Creating the dataset snapshot is subject to charges based on the snapshot size and record price.

  • The maximum depth of nesting the filter groups is 3.

Filter Syntax

Operators

The following table shows operators that can be used in the field filter.

OperatorField TypesDescription
=AnyEqual to
!=AnyNot equal to
<Number, DateLower than
<=Number, DateLower than or equal
>Number, DateGreater than
>=Number, DateGreater than or equal
inAnyTests if field value is equal to any of the values provided in filter’s value
not_inAnyTests if field value is not equal to all of the values provided in filter’s value
includesArray, TextTests if the field value contains the filter value. If the filter value is a single string, it matches records where the field value contains that string. If the filter value is an array of strings, it matches records where the field value contains a least one string from the array.
not_includesArray, TextTests if the field value does not contain the filter value. If the filter value is a single string, it matches records where the field value does not contain that string. If the filter value is an array of strings, it matches records where the field value does not contain any of the strings from the array.
array_includesArrayTests if filter value is in field value (exact match)
not_array_includesArrayTests if filter value is not in field value (exact match)
is_nullAnyTests if the field value is equal to NULL. Operator does not accept any value.
is_not_nullAnyTests if the field value is not equal to NULL. Operator does not accept any value.

Combining Multiple Filters

Multiple field filters can be combined into the filter group using 2 logical operators: ‘and’, ‘or’. API supports filters with a maximum nesting depth of 3. Example of filter group:

{
    // operator can be one of ["and", "or"]
    "operator": "and",
    // an array of field filters
    "filters": [
        {
            "name": "reviews_count",
            "opeartor": ">",
            "value": "200"
        },
        {
            "name": "rating",
            "operator": ">",
            "value": "4.5"
        }
    ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
dataset_id
string
required

ID of the dataset to filter

filter
object
required
records_limit
integer

Response

200 - application/json
snapshot_id
string

ID of the snapshot