# Facebook Scraping Parameters

Web Scraper API Facebook Scraping Parameters

Configure Facebook scraping parameters using Thordata's Web Scraper API, including parameters such as post URL, event URL, profile URL and more.

Unique :

<details>

<summary><code>token</code> ,<strong>Access Token (Required)</strong></summary>

This parameter is used to verify the legitimacy of the scraping request via an API access token.

**Request Example:**\
&#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>

**Product-Scrape Facebook Post Details**

Facebook - Scraping post details via URL

<details>

<summary><code>spider_id</code> ,<strong>Associated Scraping Tool (Required)</strong></summary>

This parameter defines which scraping tool to use.&#x20;

**Request Example:**\
`spider_id=facebook_post_by-posts-url`

</details>

<details>

<summary><code>url</code> <strong>,Post URL (Required)</strong></summary>

This parameter is used to specify the post URL to use when crawling Facebook posts.

**Request Example:**

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

</details>

<details>

<summary><strong>Request Example</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>

**Product-Scrape Facebook Post Comments**

Facebook - Scraping post  comments via URL

<details>

<summary><code>spider_id</code> ,<strong>Associated Scraping Tool (Required)</strong></summary>

This parameter defines which scraping tool to use.&#x20;

**Request Example:**\
`spider_id=facebook_comment_by-comments-url`

</details>

<details>

<summary><code>url</code> <strong>,Post URL (Required)</strong></summary>

This parameter is used to specify the post URL to use when crawling Facebook posts.

**Request Example:**

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

</details>

<details>

<summary><code>get_all_replies</code> <strong>, All Replies (Optional)</strong></summary>

This parameter specifies whether to fetch all replies when retrieving comments.

**Request Example:**

`"get_all_replies": "True"`

</details>

<details>

<summary><code>limit_records</code> <strong>, Quantity Limit (Optional)</strong></summary>

This parameter specifies the limit of the comment quantity.

**Request Example:**

`"limit_records": "10"`

</details>

<details>

<summary><code>comments_sort</code> <strong>, Sorting (Optional)</strong></summary>

This parameter specifies the sorting criteria for the comments.

**Request Example:**

`"comments_sort": "All comments"`

</details>

<details>

<summary><strong>Request Example</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>

**Product-Scrape Facebook profile information**

Facebook - Scraping profile via URL

<details>

<summary><code>spider_id</code> , <strong>Associated Scraping Tool (Required)</strong></summary>

This parameter defines which scraping tool to use.&#x20;

**Request Example:**\
`spider_id=facebook_profile_by-profiles-url`

</details>

<details>

<summary><code>url</code> <strong>, Profile URL (Required)</strong></summary>

This parameter is used to specify the profile URL to scrape.

**Request Example:**

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

</details>

<details>

<summary><strong>Request Example</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>

**Product-Scrape Events information**

Facebook - Scraping event information via Event List URL

<details>

<summary><code>spider_id</code> , <strong>Associated Scraping Tool (Required)</strong></summary>

This parameter defines which scraping tool to use.&#x20;

**Request Example:**\
`spider_id=facebook_event_by-eventlist-url`

</details>

<details>

<summary><code>url</code> <strong>, Event List URL (Required)</strong></summary>

This parameter is used to specify the Event List URL to scrape.

**Request Example:**

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

</details>

<details>

<summary><code>upcoming_events_only</code> <strong>, Only Scrape Future Events  (Optional)</strong></summary>

This parameter is used to specify whether to only scrape future events..

**Request Example:**

`"upcoming_events_only": "false"`

</details>

<details>

<summary><strong>Request Example</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 - Scraping event information via Event Search URL

<details>

<summary><code>spider_id</code> , <strong>Associated Scraping Tool (Required)</strong></summary>

This parameter defines which scraping tool to use.&#x20;

**Request Example:**\
`spider_id=facebook_event_by-search-url`

</details>

<details>

<summary><code>url</code> <strong>, Event Search URL (Required)</strong></summary>

This parameter is used to specify the Event Search URL to scrape.

**Request Example:**

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

</details>

<details>

<summary><strong>Request Example</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 - Scraping event information via Event URL

<details>

<summary><code>spider_id</code> , <strong>Associated Scraping Tool (Required)</strong></summary>

This parameter defines which scraping tool to use.&#x20;

**Request Example:**\
`spider_id=facebook_event_by-events-url`

</details>

<details>

<summary><code>url</code> <strong>, Event URL (Required)</strong></summary>

This parameter is used to specify the Event URL to scrape.

**Request Example:**

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

</details>

<details>

<summary><strong>Request Example</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>

If you need further assistance, please contact us via email at <support@thordata.com>.
