Instead of creating duplicate collectors for each delivery type, you can choose a delivery type per job using API.

mceclip0.png

1

Update your Collector

Ensure that your collector is updated to the latest version to improve success rate

mceclip1.png

2

Set a delivery type to Batch

mceclip2.png mceclip3.png

Following error message will be returned from Batch API when delivery type is set to Realtime.

Error
"error": "Cannot trigger a batch job with a real-time collector." \
         "Use /trigger_immediate endpoint instead"
3

Trigger the collector using a preferred API

  • Initiate a Batch job

  • Initiate a Realtime job

dca/trigger

Trigger a collector for batch collection method

curl "https://api.brightdata.com/dca/trigger?collector=ID_COLLECTOR&queue_next=1" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer API_TOKEN" \
    -d '[{"url":"https://targetwebsite.com/product_id/"}]'

Batch responses begin with j_**** and real-time responses begin with z****

4

Receive data