> For the complete documentation index, see [llms.txt](https://doc.thordata.com/interface-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.thordata.com/interface-documentation/zh-hk/web-scraper-api/chuang-jian-ren-wu-shuo-ming.md).

# 創建任務說明

### 基礎信息

**接口說明：**&#x900F;過接口創建 Web Scraper API 的抓取任務。

**文本形式請求地址：<https://scraperapi.thordata.com/builder>**

**YouTube 音频/视频请求地址：<https://scraperapi.thordata.com/video\\_builder>**

**請求方式：**<mark style="color:orange;">POST</mark>

### 請求參數

**Headers：**

<table><thead><tr><th width="109">參數名稱</th><th width="90">參數类型</th><th width="81">是否必須</th><th>描述</th></tr></thead><tbody><tr><td><code>token</code></td><td>string</td><td>必須</td><td>請登入<a href="https://dashboard.thordata.com/api"><strong>儀表板 >> 菜單 >> 我的賬戶</strong></a>查看您的token參數值</td></tr><tr><td><code>Authorization</code></td><td>string</td><td>必須</td><td>請登入<a href="https://dashboard.thordata.com/zh/web-scraper/details/3/api"><strong>儀表板</strong></a>查看您的Authorization token參數值。示例："Authorization: Bearer *********************"</td></tr></tbody></table>

**Body:**

<table><thead><tr><th width="146.5555419921875">參數名稱</th><th width="76.5555419921875">參數类型</th><th width="87">是否必須</th><th width="435.030029296875">描述</th></tr></thead><tbody><tr><td><code>spider_name</code></td><td><sup>string</sup></td><td>必須</td><td><p>Facebook:</p><p><code>spider_name</code> facebook.com</p><p>Amazon:</p><p><code>spider_name</code> amazon.com</p><p>YouTube:</p><p><code>spider_name</code> youtube.com</p></td></tr><tr><td> <code>spider_id</code></td><td>string</td><td>必須</td><td><p>Amazon:</p><p><code>spider_id</code> amazon_product_by-url, amazon_product_by-best-sellers, etc.</p><p>YouTube:</p><p><code>spider_id</code> youtube_video_by-url, youtube_audio_by-url, etc. </p><p>更多id，請查看<a href="https://doc.thordata.com/doc/zh-hk/web-scraper-api/zhua-qu-can-shu-shuo-ming/youtube-xie-qu-can-shu">參數說明</a> </p></td></tr><tr><td><code>spider_parameters</code></td><td>text</td><td>必須</td><td><p>Amazon：</p><p><code>url</code> 抓取链接，<code>zip_code</code> 郵政編碼，<code>sort_by</code> 排序方式等。</p><p>YouTube：</p><p><code>url</code> 抓取链接。</p><p>更多參數請查看<a href="https://doc.thordata.com/doc/zh-hk/web-scraper-api/zhua-qu-can-shu-shuo-ming/youtube-xie-qu-can-shu">參數說明</a> </p></td></tr><tr><td><code>spider_errors</code></td><td>string</td><td>必須</td><td>true</td></tr><tr><td><code>file_name</code></td><td>string</td><td>必須</td><td>自定義下載文件名稱。 {{TasksID}}  、{{VideoID}}</td></tr></tbody></table>

### 響應示例

```json
{
    "code": 200,
    "data": {
        "task_id": "68a21d2e8f2645e39f3d62231ef6d829"
    }
}
```

{% hint style="info" %}
若返回的code值非200，請查閱[**錯誤碼說明**](/interface-documentation/zh-hk/cuo-wu-ma/cuo-wu-ma-shuo-ming.md)列表並進行修改
{% endhint %}

<table><thead><tr><th width="181">參數名稱</th><th>參數类型</th><th>是否必須</th><th width="310.36328125">描述</th></tr></thead><tbody><tr><td><code>code</code></td><td>number</td><td>必須</td><td>傳回的code值。</td></tr><tr><td><code>data</code></td><td>object</td><td>否</td><td>傳回的詳細資訊。</td></tr><tr><td>    <code>task_id</code></td><td>number</td><td>否</td><td>任務的ID。</td></tr></tbody></table>
