Paste your API key into the authorization field. To get an API key, Create an account and learn how to generate an API key.
General Description
- This endpoint filters a dataset and creates a snapshot of the filtered data in your account.
- The job runs asynchronously and can take up to 5 minutes to complete. If it exceeds this time, it will be cancelled.
- Charges apply based on the size of the snapshot and per-record pricing.
- Filters can have up to 3 levels of nested filter groups.
- You can upload CSV or JSON files for efficient filtering when handling large sets of values.
File Format Requirements
- First line must be a header matching the field name in your filter.
- Each following line contains a single value.
Example: industries.csv
Filter Syntax with File References
When using file uploads, reference the filename in the filter’svalue
field.
Example
Supported Operators for File References
Operator | Field Types | Description |
---|---|---|
in | Any | Field value equals any value in file |
not_in | Any | Field value does not equal any value in file |
includes | Array, Text | Field value contains any value in file |
not_includes | Array, Text | Field value does not contain any value in file |
array_includes | Array | Any value in file exists in field value |
not_array_includes | Array | No values in file exist in field value |
Example: Filtering with Multiple Files
Troubleshooting
Issue | Possible Solution |
---|---|
”File not found” | Make sure the filename in your filter exactly matches the uploaded file name. |
”Invalid file format” | Check CSV header matches the filter field name, or ensure JSON is an array of objects. |
”Field not found” | Verify field exists in dataset. Use Get Dataset Metadata. |
Related Documentation
Authorizations
Use your Bright Data API Key as a Bearer token in the Authorization header.
Get API Key from: https://brightdata.com/cp/setting/users.
Example:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df
Query Parameters
ID of the dataset to filter (required in multipart/form-data mode)
Example:
"gd_l1viktl72bvl7bjuj0"
Limit the number of records to be included in the snapshot
Example:
1000
Body
multipart/form-data
Example:
{
"name": "name",
"operator": "=",
"value": "John"
}
Response
Job of creating the snapshot successfully started
ID of the snapshot