> ## Documentation Index
> Fetch the complete documentation index at: https://brightdata-ipv6-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger a scraper for batch collection method

**API Endpoint:** `POST` `/dca/trigger?collector={ID_COLLECTOR}`

## `POST` Body

<ParamField body="Authorization" type="string" required>
  raw JSON `-d '[{"url":"https://targetwebsite.com/product_id/"}]'`
</ParamField>

## Query Parameters

<ParamField query="collector" type="string" required>
  A unique identification of scraper
</ParamField>

<ParamField query="version" type="string">
  Set to `dev` to trigger the development version of the scraper
</ParamField>

<ParamField query="name" type="string">
  `human_name` - A human readable name for the batch
</ParamField>

### Choose `trigger_behavior` parameters:

<ParamField query="queue_next" type="int" default="1">
  If there's already something in the crawl queue, push this job into the queue
</ParamField>

<ParamField query="queue" type="string">
  Send another batch of requests that will start after the last one is finished
</ParamField>

<ParamField query="confirm_cancel" type="int" default="1">
  Cancel running job and run instead, submit the request and cancel running one
</ParamField>

<ParamField query="no_downloads" type="int" default="1">
  Disable media file download
</ParamField>

<ParamField query="deadline" type="string" placeholder="1h">
  Set job time deadline, job will be terminated after specified time

  * h : hours
  * m : minutes
  * s : seconds
</ParamField>

## Headers

<ParamField header="Authorization" type="string" required>
  Authorization Bearer Key `-H "Authorization: Bearer API_TOKEN"`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  JSON/CSV/Multipart `-H "Content-Type: application/json"`
</ParamField>

<ResponseExample>
  ```json Sample Response theme={null}
  {
   "collection_id": "ID_DATASET",
   "start_eta": "2021-11-07T13:26:22.702Z"
  }
  ```
</ResponseExample>

<RequestExample>
  ```sh Shell theme={null}
  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/"}]'
  ```

  ```js NodeJS theme={null}
  #!/usr/bin/env node
  require('request-promise')({
   method: 'POST',
   url: 'https://api.brightdata.com/dca/trigger?collector=ID_COLLECTOR&queue_next=1',
   json: [{'url': 'https://targetwebsite.com/product_id/'}],
   headers: {'Authorization': 'Bearer API_TOKEN'},
  }).then(function(data){ console.log(data); },
   function(err){ console.error(err); });
  ```

  ```java Java theme={null}
  package example;
  import org.apache.http.HttpHost;
  import org.apache.http.client.fluent.\*;
  public class Example {
   public static void main(String[] args) throws Exception {  
   String body = "[{\"url\":\"https://targetwebsite.com/product_id/\"}]";
   String res = Executor.newInstance()
   .addHeader("Authorization", "Bearer API_TOKEN")  
   .execute(Request.Post("https://api.brightdata.com/dca/trigger?collector=ID_COLLECTOR&queue_next=1"))  
   .bodyString(body, ContentType.APPLICATION_JSON))  
   .returnContent().asString();  
   System.out.println(res)
   }  
  }
  ```

  ```cs C# theme={null}
  using System;
  using System.Net;
  using System.Net.Http;
  using System.Net.Http.Headers;
  public class Program {
   public static async Task Main() {
   var client = new HttpClient();
   var requestMessage = new HttpRequestMessage {
   Method = HttpMethod.Post,  
   RequestUri = new Uri("https://api.brightdata.com/dca/trigger?collector=ID_COLLECTOR&queue_next=1"),
   Headers = {
   {"Authorization", "Bearer API_TOKEN"}
   },  
   Content = new StringContent(JsonConvert.SerializeObject([  
   new {  
   url = "https://targetwebsite.com/product_id/"  
   }  
   ]), Encoding.UTF8, "application/json"))
   };
   var response = await client.SendAsync(requestMessage);
   var responseString = await response.Content.ReadAsStringAsync();
   Console.WriteLine(responseString);
   }
  }
  ```

  ```python Python theme={null}
  #!/usr/bin/env python
  print('If you get error "ImportError: No module named requests", please install it:\n$ sudo pip install requests');
  import requests
    
  data = [{'url': 'https://targetwebsite.com/product_id/'}]
  headers = {'Content-Type': 'application/json','Authorization': 'Bearer API_TOKEN'}
  r = requests.post('https://api.brightdata.com/dca/trigger?collector=ID_COLLECTOR&queue_next=1', data=data, headers=headers)
  print(r.content)
  ```
</RequestExample>
