cURL
Marketplace Dataset API
Filter Dataset (JSON or File Uploads)
Use the Bright Data Marketplace Dataset API to filter Dataset (JSON or File Uploads). Spans 250+ domains in the Bright Data marketplace.
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.
File references work only with the operators
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-datamode 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_idto download once it completes.
How do I format the CSV or JSON file?
- CSV
- JSON
- 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’svalue field to the filename:
Example
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
| 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
- Dataset API overview
- Filter dataset (async)
- Filter syntax reference
- Get Dataset List
- Get Dataset Metadata
Authorizations
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
- Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
- Include the API Key in the Authorization header of your requests
- Format:
Authorization: Bearer YOUR_API_KEY
Example:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07dfLearn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
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
- Single field filter
- Filters group
- Single field filter w/out value
Example:
{
"name": "name",
"operator": "=",
"value": "John"
}Response
Job of creating the snapshot successfully started
ID of the snapshot