> For the complete documentation index, see [llms.txt](https://doc.thordata.com/doc/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/doc/zh-hk/web-scraper-api/zhua-qu-can-shu-shuo-ming/facebook-zhua-qu-can-shu.md).

# Facebook 抓取參數

Web Scraper API Facebook 抓取參數

使用 Thordata 的 Web Scraper API 配置 Facebook 抓取參數，包括貼文 URL、活動 URL、個人資料 URL等參數。

唯一標識：

<details>

<summary><code>token</code> <strong>，訪問令牌（必填）</strong></summary>

該參數用於確保爬取請求合法性的 API 訪問令牌。

**請求示例：**\
&#x20;`"Authorization: Bearer ********************************"`&#x20;

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer ********************************" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_post_by-posts-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/permalink.php?story_fbid=pfbid0gNjZBhqCxSqj9xJS5aygNwqFqNEM2fYbTFKKbsvvGdEfTgFyAYWSckvkEHPqAE7gl%26id=61574926580533%26rdid=86oaujwNGCCdPLfj#\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**產品-抓取 Facebook 貼文詳情**

Facebook -透過URL抓取貼文詳情

<details>

<summary><code>spider_id</code> ,<strong>所屬抓取工具（必填）</strong></summary>

此參數定義要使用的抓取工具。

**請求範例**

`spider_id=facebook_post_by-posts-url`

</details>

<details>

<summary><code>url</code> <strong>,貼文URL（必填）</strong></summary>

此參數用於指定抓取 Facebook 貼文時要使用的貼文 URL。

**請求範例**

`"url": "https://www.facebook.com/permalink.php?story_fbid=pfbid0gNjZBhqCxSqj9xJS5aygNwqFqNEM2fYbTFKKbsvvGdEfTgFyAYWSckvkEHPqAE7gl%26id=61574926580533%26rdid=86oaujwNGCCdPLfj#"`

</details>

<details>

<summary><strong>請求範例</strong></summary>

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_post_by-posts-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/permalink.php?story_fbid=pfbid0gNjZBhqCxSqj9xJS5aygNwqFqNEM2fYbTFKKbsvvGdEfTgFyAYWSckvkEHPqAE7gl%26id=61574926580533%26rdid=86oaujwNGCCdPLfj#\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**產品 - 抓取 Facebook 貼文評論**

Facebook - 透過 URL 抓取貼文評論

<details>

<summary><code>spider_id</code> ,<strong>所屬抓取工具（必填）</strong></summary>

此參數定義要使用的抓取工具。

**請求範例**

`spider_id=facebook_comment_by-comments-url`

</details>

<details>

<summary><code>url</code> <strong>,貼文URL（必填）</strong></summary>

此參數用於指定抓取 Facebook 貼文時要使用的貼文 URL。

**請求範例**

`"url": "https://www.facebook.com/permalink.php?story_fbid=pfbid0gNjZBhqCxSqj9xJS5aygNwqFqNEM2fYbTFKKbsvvGdEfTgFyAYWSckvkEHPqAE7gl%26id=61574926580533%26rdid=86oaujwNGCCdPLfj#"`

</details>

<details>

<summary><code>get_all_replies</code> <strong>, 所有回應（可選）</strong></summary>

此參數指定在檢索評論時是否取得所有回應。

**請求範例**

`"get_all_replies": "True"`

</details>

<details>

<summary><code>limit_records</code> <strong>,數量限制（可選）</strong></summary>

此參數指定評論數量的限制。

**請求範例**

`"limit_records": "10"`

</details>

<details>

<summary><code>comments_sort</code> <strong>,排序（可選）</strong></summary>

此參數指定評論的排序標準。

**請求範例**

`"comments_sort": "All comments"`

</details>

<details>

<summary><strong>請求範例</strong></summary>

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_comment_by-comments-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/share/p/1K6xfHFkrK/\",\"get_all_replies\": \"True\",\"limit_records\": \"10\",\"comments_sort\": \"All comments\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**產品 - 抓取 Facebook 個人資料訊息**

Facebook - 透過 URL 抓取個人資料

<details>

<summary><code>spider_id</code> , <strong>所屬抓取工具（必填）</strong></summary>

此參數定義要使用的抓取工具。

**請求範例**

`spider_id=facebook_profile_by-profiles-url`

</details>

<details>

<summary><code>url</code> <strong>,個人資料URL（必填）</strong></summary>

此參數用於指定要抓取的個人資料 URL。

**請求範例**

`"url": "https://www.facebook.com/permalink.php?story_fbid=pfbid0gNjZBhqCxSqj9xJS5aygNwqFqNEM2fYbTFKKbsvvGdEfTgFyAYWSckvkEHPqAE7gl%26id=61574926580533%26rdid=86oaujwNGCCdPLfj#"`

</details>

<details>

<summary><strong>請求範例</strong></summary>

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_profile_by-profiles-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/MayeMusk\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**產品 - 抓取活動訊息**

Facebook - 透過活動列表 URL 抓取活動訊息

<details>

<summary><code>spider_id</code> , <strong>所屬抓取工具（必填）</strong></summary>

此參數定義要使用的抓取工具。

**請求範例**

`spider_id=facebook_event_by-eventlist-url`

</details>

<details>

<summary><code>url</code> <strong>, 活動列表 URL（必填）</strong></summary>

此參數用於指定要抓取的活動列表 URL。

**請求範例**

`"url": "https://www.facebook.com/nohoclub/events"`

</details>

<details>

<summary><code>upcoming_events_only</code> <strong>, 僅抓取未來活動（可選）</strong></summary>

此參數用於指定是否僅抓取未來活動。

**請求範例**

`"upcoming_events_only": "false"`

</details>

<details>

<summary><strong>請求範例</strong></summary>

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_event_by-eventlist-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/nohoclub/events\",\"upcoming_events_only\": \"false\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

Facebook - 透過活動搜尋 URL 抓取活動訊息

<details>

<summary><code>spider_id</code> , <strong>所屬抓取工具（必填）</strong></summary>

此參數定義要使用的抓取工具。

**請求範例**

`spider_id=facebook_event_by-search-url`

</details>

<details>

<summary><code>url</code> <strong>, 活動搜尋URL（必填）</strong></summary>

此參數用於指定要抓取的活動搜尋 URL。

**請求範例**

`"url": "https://www.facebook.com/events/explore/us-atlanta/107991659233606"`

</details>

<details>

<summary><strong>請求範例</strong></summary>

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_event_by-search-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/events/explore/us-atlanta/107991659233606\"},{\"url\": \"https://www.facebook.com/events/search/?q=Linkin%20Park\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

Facebook - 透過活動 URL 抓取活動訊息

<details>

<summary><code>spider_id</code> , <strong>所屬抓取工具（必填）</strong></summary>

此參數定義要使用的抓取工具。

**請求範例**

`spider_id=facebook_event_by-events-url`

</details>

<details>

<summary><code>url</code> <strong>, 活動 URL（必填）</strong></summary>

此參數用於指定要抓取的活動URL。

**請求範例**

`"https://www.facebook.com/events/1546764716269782"`

</details>

<details>

<summary><strong>請求範例</strong></summary>

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=facebook.com" ^
  -d "spider_id=facebook_event_by-events-url" ^
  -d "spider_parameters=[{\"url\": \"https://www.facebook.com/events/1546764716269782\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

如果您需要更多幫助，請通過電子郵件 <support@thordata.com> 聯繫我們。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.thordata.com/doc/zh-hk/web-scraper-api/zhua-qu-can-shu-shuo-ming/facebook-zhua-qu-can-shu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
