Skip to main content
POST
cURL
The Filter endpoint of the Bright Data Marketplace Dataset API can filter a dataset against thousands of values stored in a CSV or JSON file. Upload one or more files in multipart mode and reference each filename in your filter.
Paste your API key into the authorization field. To get an API key, Create an account and learn how to generate an API key.

How does file-based filtering work?

Use file uploads when you need to filter against large value lists, such as including or excluding 100k+ company IDs:
  • Upload CSV or JSON files in multipart/form-data mode and reference each filename in your filter.
  • Each file holds up to 10,000 data rows, and the whole request can be up to 200 MiB.
  • The Filter job runs asynchronously and returns a snapshot_id to download once it completes.
For the async job flow, limits, pricing and error codes, see Filter dataset (async).

How do I format the CSV or JSON file?

  • First line must be a header matching the field name in your filter.
  • Each following line contains a single value.
Example: industries.csv

How do I reference a file in the filter?

When using file uploads, set the filter’s value field to the filename:
Example
File references work only with the operators in, not_in, includes, not_includes, array_includes and not_array_includes. For the full operator table and field types, see the filter syntax reference.

Filter with multiple files

Troubleshoot file uploads

Authorizations

Authorization
string
header
required

Use your Bright Data API Key as a Bearer token in the Authorization header.

How to authenticate:

  1. Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
  2. Include the API Key in the Authorization header of your requests
  3. Format: Authorization: Bearer YOUR_API_KEY

Example:

Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication

Query Parameters

dataset_id
string
required

ID of the dataset to filter (required in multipart/form-data mode)

Example:

"gd_l1viktl72bvl7bjuj0"

records_limit
integer

Limit the number of records to be included in the snapshot

Example:

1000

Body

multipart/form-data
filter
Single field filter · object
required
Example:

Response

Job of creating the snapshot successfully started

snapshot_id
string

ID of the snapshot