This guide walks you through sending your first request to the Bright Data Scraper Studio API. By the end, you will trigger a published collector from your own code and receive structured JSON back. The Bright Data Scraper Studio API is built around two HTTP calls:Documentation Index
Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /dca/trigger, which queues one or more inputs and returns a snapshot ID.GET /dca/dataset?id=<snapshot_id>, which serves the snapshot once it is ready.
Prerequisites
- An active Bright Data account with a payment method on file
- An API token from Account Settings → API Tokens
- A Collector ID from Scraper Studio; the ID starts with
c_
Make your first request
Authenticate every call
Every Bright Data Scraper Studio API call uses bearer-token authentication. Add this header to every request:A missing or invalid token returns
401 Unauthorized.Trigger your collector
Send the inputs you want the collector to process as a JSON array in the request body. Each object in the array must match the input schema you defined when you built the collector. The default schema is a single The Bright Data Scraper Studio API responds with a single snapshot ID:Keep this ID. You will use it as the
url field.snapshot_id in step 3.queue_next=1 runs your inputs immediately. Omit it (or set 0) to enqueue them behind any in-flight work for the same collector.Poll until ready, then download
The same While the snapshot is building, the response is a status object:When the snapshot is ready, the response is a JSON array. One row per successful input by default:The exact field set depends on the output schema you defined when you built the collector.
/dca/dataset endpoint serves both the in-progress and ready responses. Poll it every five seconds until the response is a JSON array.How long does this take?
The first record usually arrives within a minute, but total time depends on the collector and the target site. Measured against a typical e-commerce product page collector:| Input count | Typical wall-clock time |
|---|---|
| 1 to 10 URLs | 30 to 90 seconds |
| 11 to 100 URLs | 2 to 5 minutes |
| 100+ URLs | 5+ minutes. Use push delivery instead of polling. |
What do the IDs mean?
Three identifiers appear in Bright Data Scraper Studio. They are easy to confuse because the trigger response uses one name for a value that another endpoint reads under a different name.| Term | Looks like | What it identifies |
|---|---|---|
| Collector ID | c_xxxxxxxxxxxxxxxx | The published scraper definition. Stable. You pass it as the collector query parameter on /dca/trigger. |
Collection ID (returned as collection_id) | j_xxxxxxxxxxxxxxxx | One run of the collector. The trigger response field is collection_id, but every other endpoint refers to the same value as snapshot_id. They are the same string. |
| Dataset | a JSON array | The result rows produced by one run. The /dca/dataset endpoint returns this when the run is finished. |
What errors might I see?
| Status | Meaning | Fix |
|---|---|---|
401 Unauthorized | Token missing, malformed or revoked | Re-copy from Account Settings → API Tokens |
404 Not Found | Collector ID does not exist or your account does not have access | Open the collector in Scraper Studio and re-copy the ID |
422 Unprocessable Entity | The objects in your request body do not match the collector’s input schema | Confirm field names against the Inputs tab of your collector |
5xx | Transient Bright Data API error | Retry with exponential backoff, for example 1s, 2s, 4s |
[] (empty array) | Snapshot has no rows, or the snapshot expired | Snapshots are retained for 90 days by default. See Specifications |
Use a production-grade starter template
These open-source repositories are exactly the calls above, hardened with environment-variable config, retry/backoff for transient failures, library helpers and a completeREADME. Fork either and you have a runnable client in 30 seconds.
Node.js starter
Node 18+, ES modules, dotenv, retry/backoff, ~150 LOC
Python starter
Python 3.8+,
requests, python-dotenv, retry/backoff, ~150 LOCNext steps
Choose a delivery type
Skip polling. Have Bright Data push results to a webhook, S3, GCS or email when the snapshot is ready.
Trigger a batch collection
Send hundreds or thousands of inputs in a single request and receive results in batches.
Run a synchronous real-time job
For low-input, latency-sensitive workloads. Trigger and receive results in a single HTTP call.
Build a new collector
Need a collector that does not exist yet? Build one with the AI Agent or the IDE.
Frequently asked questions
What is the difference between the Collection API and the AI Flow API?
What is the difference between the Collection API and the AI Flow API?
The Collection API (
/dca/*, this page) runs an existing collector to get data.
The AI Flow API runs the AI Agent to create or self-heal a collector.
Most developers integrating Bright Data Scraper Studio into a product use the Collection API.Can I send different input shapes in the same request?
Can I send different input shapes in the same request?
Yes, as long as every object in the array conforms to the collector’s input schema. If your collector accepts both
url and keyword as input fields, you can mix them in one request. Fields you do not include are treated as null.How do I retry failed inputs without re-running the successful ones?
How do I retry failed inputs without re-running the successful ones?
Open the snapshot in My Scrapers and click Last errors to see which inputs failed and why. Re-trigger just those inputs in a new
POST /dca/trigger call.Is there a rate limit?
Is there a rate limit?
Yes. Per-account concurrency limits apply per collector. See Specifications for current limits. The starter templates linked above already implement exponential backoff for transient
5xx responses.