> ## 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.

# Trigger sync real-time scrape

> Use the Bright Data Scraper Studio real-time API to trigger a sync real-time scrape. POST /dca/crawl returns 200 OK with real-time scrape data as JSON.

<Warning>
  You can trigger only **single-input** APIs. Make sure the payload is **an object, not an array of objects**.
</Warning>


## OpenAPI

````yaml api-reference/web-scraper-ide-rest-api POST /dca/crawl
openapi: 3.1.0
info:
  title: Brightdata API
  description: API for interaction with datasets marketplace
  version: 1.0.0
servers:
  - url: https://api.brightdata.com
security:
  - bearerAuth: []
paths:
  /dca/crawl:
    post:
      description: Trigger a scraper for batch collection method
      parameters:
        - name: collector
          in: query
          required: true
          schema:
            type: string
          description: A unique identification of scraper
        - name: timeout
          in: query
          required: true
          schema:
            type: string
            example: 50s
          description: Request timeout duration. Must be between 25s and 50s.
        - name: version
          in: query
          schema:
            type: string
          description: Set to `dev` to trigger the development version of the scraper
        - name: name
          in: query
          schema:
            type: string
          description: '`human_name` - A human readable name for the batch'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
            examples:
              request:
                value:
                  url: https://www.ebay.com/itm/326972541236
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                response:
                  value:
                    - product_title: >-
                        Apple iPad 11th Gen, 128 GB, Wi-Fi + 5G, 11 in - Silver
                        - BRAND NEW SEALED
                      price:
                        value: 324.99
                        currency: USD
                        symbol: $
                      condition: >-
                        New: A brand-new, unused, unopened, undamaged item in
                        its original packaging (where packaging is ...
                      seller_feedback_percentage: 100% positive feedback
                      seller_items_sold: 173 items sold
                      seller_since: Joined Nov 2012
                      item_specifics:
                        brand: Apple
                        model: Apple iPad (11th generation)
                        processor_model: Apple A16 Bionic
                        operating_system: iPadOS
                      storage_options: []
                      seller_ratings:
                        accurate_description: '--'
                        shipping_cost: '--'
                        shipping_speed: '--'
                        communication: '4.9'
                      product_images:
                        - >-
                          https://i.ebayimg.com/images/g/4a8AAeSw7x5pboS0/s-l1600.webp
                        - >-
                          https://i.ebayimg.com/images/g/4a8AAeSw7x5pboS0/s-l1600.webp
                      feedback_count: 36
                      financing_options:
                        monthly_payment:
                          value: 13.99
                          currency: USD
                          symbol: $
                        payment_plan_duration: (12 monthly payment plan)
                        apr: 13.99%
                      input:
                        url: https://www.ebay.com/itm/326972541236
                      seller_namestest: jwc8109
        '202':
          description: Timeout waiting for crawl results
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code indicating the type of timeout
                  message:
                    type: string
                    description: >-
                      Detailed message about the timeout and instructions for
                      polling results
                  response_id:
                    type: string
                    description: >-
                      Unique identifier for the response to be used for polling
                      results
                required:
                  - error
                  - message
                  - response_id
              example:
                error: crawl_results_timeout
                message: >-
                  Timed out waiting for crawl results (timeout=NaNs). The page
                  crawl is continuing in the background, you can poll a GET
                  request to
                  https://api.brightdata.com/dca/get_result?response_id=ID until
                  the result is ready
                response_id: RESPONSE_ID
      x-codeSamples:
        - lang: shell
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://api.brightdata.com/dca/crawl?collector=c_abc123' \
              --header "Authorization: Bearer YOUR_API_KEY" \
              --header "Content-Type: application/json" \
              --data '{"url": "https://example.com/product/1"}'
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://api.brightdata.com/dca/crawl?collector=c_abc123"
            headers = {
                "Authorization": "Bearer YOUR_API_KEY",
                "Content-Type": "application/json",
            }
            payload = {
                "url": "https://example.com/product/1"
            }

            response = requests.post(url, headers=headers, json=payload)
            print(response.text)
        - lang: py
          label: Python SDK
          source: |-
            # Install: pip install brightdata-sdk
            from brightdata import BrightDataClient

            async with BrightDataClient(api_key="YOUR_API_KEY") as client:
                # Run and get results in one call (sync)
                data = await client.scraper_studio.run(
                    collector="c_abc123",
                    input={"url": "https://example.com/product/1"},
                )
                print(data)
        - lang: javascript
          label: JavaScript
          source: >-
            const response = await
            fetch("https://api.brightdata.com/dca/crawl?collector=c_abc123", {
              method: "POST",
              headers: {
                "Authorization": "Bearer YOUR_API_KEY",
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "url": "https://example.com/product/1"
            }),

            });


            const data = await response.text();

            console.log(data);
        - lang: js
          label: JavaScript SDK
          source: >-
            // Install: npm install @brightdata/sdk

            import { bdclient } from '@brightdata/sdk';


            const client = new bdclient({ apiKey: 'YOUR_API_KEY' });


            // Run and get results in one call (sync)

            const results = await
            client.scraperStudio.run('c_your_collector_id', {
              input: { url: 'https://example.com/product/1' },
            });


            console.log(results);


            await client.close();
        - lang: php
          label: PHP
          source: >-
            <?php

            $ch =
            curl_init("https://api.brightdata.com/dca/crawl?collector=c_abc123");

            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");

            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

            curl_setopt($ch, CURLOPT_HTTPHEADER, [
                "Authorization: Bearer YOUR_API_KEY",
                "Content-Type: application/json",
            ]);

            curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode({
                "url": "https://example.com/product/1"
            }));


            $response = curl_exec($ch);

            curl_close($ch);

            echo $response;
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tpayload := []byte(\"{\\\"url\\\": \\\"https://example.com/product/1\\\"}\")\n\treq, _ := http.NewRequest(\"POST\", \"https://api.brightdata.com/dca/crawl?collector=c_abc123\", bytes.NewBuffer(payload))\n\treq.Header.Set(\"Authorization\", \"Bearer YOUR_API_KEY\")\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil { panic(err) }\n\tdefer res.Body.Close()\n\n\tbody, _ := io.ReadAll(res.Body)\n\tfmt.Println(string(body))\n}"
        - lang: java
          label: Java
          source: |-
            import java.net.URI;
            import java.net.http.HttpClient;
            import java.net.http.HttpRequest;
            import java.net.http.HttpResponse;

            public class Main {
                public static void main(String[] args) throws Exception {
                    String body = "{\"url\": \"https://example.com/product/1\"}";
                    HttpRequest request = HttpRequest.newBuilder()
                        .uri(URI.create("https://api.brightdata.com/dca/crawl?collector=c_abc123"))
                        .header("Authorization", "Bearer YOUR_API_KEY")
                        .header("Content-Type", "application/json")
                        .method("POST", HttpRequest.BodyPublishers.ofString(body))
                        .build();

                    HttpResponse<String> response = HttpClient.newHttpClient()
                        .send(request, HttpResponse.BodyHandlers.ofString());
                    System.out.println(response.body());
                }
            }
        - lang: ruby
          label: Ruby
          source: >-
            require 'net/http'

            require 'json'

            require 'uri'


            uri =
            URI.parse("https://api.brightdata.com/dca/crawl?collector=c_abc123")

            request = Net::HTTP::Post.new(uri)

            request["Authorization"] = "Bearer YOUR_API_KEY"

            request["Content-Type"] = "application/json"

            request.body = {"url": "https://example.com/product/1"}.to_json


            response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {
            |http| http.request(request) }

            puts response.body
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        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:**

        ```

        Authorization: Bearer
        b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df

        ```


        Learn how to get your Bright Data API key:
        https://docs.brightdata.com/api-reference/authentication
      bearerFormat: API Key

````