Skip to main content
POST
The Filter endpoint of the Bright Data Marketplace Dataset API runs a large or file-based filter job against any of 250+ Marketplace datasets and returns a snapshot_id you can download once the job completes.
Paste your API key into the authorization field. To get an API key, create an account and learn how to generate an API key.

When should I use Filter?

Use Filter for bulk or file-driven jobs where asynchronous processing is acceptable:
  • Bulk exports of more than 1,000 records.
  • Filtering against large value lists from CSV or JSON files, such as excluding 100k+ company IDs.
  • Datasets not yet supported by Search.
  • Scheduled or background pipelines where async is fine.
For sub-second real-time lookups on supported datasets, use Search instead.

How does Filter work?

  • A call to the Filter endpoint starts an async job and creates a snapshot of the filtered data in your account.
  • The maximum job time is 5 minutes. Jobs that run longer are cancelled.
  • Charges apply per record in the snapshot, at the standard Marketplace rate of $2.5 CPM.
  • Filter works on all 250+ Marketplace datasets.
  • Filter groups support a maximum nesting depth of 3 levels.

How do I authenticate?

Filter uses Bearer token authentication. Pass your API key in the Authorization header:
Get your key from account settings.

Limits

How do I call Filter?

Filter has two modes: JSON for plain filters and multipart for file uploads.

JSON mode (no file uploads)

Send all parameters (dataset_id, records_limit and filter) in the JSON body. Set Content-Type to application/json:
Filter returns a snapshot_id:

Multipart mode (file uploads)

Send dataset_id and records_limit as query parameters, and send filter and the uploaded files in the form-data body. Set Content-Type to multipart/form-data:
To exclude 100k+ values, split them into files of up to 10,000 rows each and attach them all in a single request:
For CSV and JSON file format rules, file references and upload troubleshooting, see Filter dataset with CSV/JSON files.

What does Filter return?

Filter returns a snapshot_id. Use it to download the filtered records via the snapshot API once the job completes:

How much does Filter cost?

Filter costs $2.5 CPM (per 1,000 records returned), the same rate as the Marketplace. There is no charge when the filter returns 0 records.

What errors can Filter return?

Filter syntax

The filter object, its operators, filter groups and nesting rules are shared with the Search endpoint and documented in one place. See the filter syntax reference for the full operator list, filter groups, up to three levels of nesting and CSV/JSON file references.

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

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

dataset_id
string
required

ID of the dataset to filter

Example:

"gd_l1viktl72bvl7bjuj0"

filter
Single field filter · object
required
Example:
records_limit
integer

Limit the number of records to be included in the snapshot

Example:

1000

Response

Job of creating the snapshot successfully started

snapshot_id
string

ID of the snapshot