filter object is shared by both the Search and Filter endpoints of the Bright Data Marketplace Dataset API: the same schema, the same operators and the same nesting rules.
What are the three filter shapes?
A filter is one of three shapes: a single field filter, a filter group that combines several filters, or a null check.Single field filter
Match one field against one value with an operator:Filter group
Combine multiple filters withand or or. Filter groups support a maximum nesting depth of 3 levels:
Null check
Useis_null or is_not_null to match on the presence of a value. These operators take no value:
Which operators are available?
The following operators can be used in a field filter.Which operators read CSV or JSON files?
These file-reference operators work only on the Filter endpoint in multipart mode. Pass a filename as the value to filter against thousands of values stored in a CSV or JSON file.
File references are not supported by the Search endpoint. Elasticsearch cannot read external files at query time.
How do I match within a single nested object?
For datasets where a field is an array of objects, setcombine_nested_fields: true on a filter group so that all filters in the group must match within a single object, not across different objects in the array:
combine_nested_fields, the two conditions could match in different objects inside the experience array.
Tips
- Use Get dataset metadata to confirm field names and types before building a filter.
- Keep nesting shallow when possible. The maximum depth is 3 levels.
- On the Search endpoint, prefer
includesover=on free-text fields, because Elasticsearch tokenizes them. - On the Filter endpoint, file references work only with the operators listed above.