> 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/scraping/web-scraper-api/parameter-description/twitter-scraping-parameters.md).

# Twitter Scraping Parameters

Web Scraper API Twitter Scraping Parameters

Configure Twitter Scraping Parameters using Thordata's Web Scraper API, including URL, username, start date, end date, and other parameters.

Unique Identifier:   &#x20;

<details>

<summary><code>token</code> ， <strong>Access token (required)</strong></summary>

This parameter is used as the API access token to ensure the legitimacy of the scraping request.

**Request examples:**

`Authorization: Bearer ********************`

```sh
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer ********************" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**Product - Scrape Twitter Profile information：**

1\. Twitter - Scrape Twitter profile information by URL

<details>

<summary><code>spider_id</code> ，<strong>Scraper tool (required)</strong></summary>

&#x20;Defines which scraper tool to use.

**Request examples:**&#x20;

`spider_id=twitter_profiles_by-url`

```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=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>url</code> ，<strong>Profile URL (required)</strong></summary>

This parameter specifies the Twitter profile URL to be scraped.

**Request examples:**&#x20;

`"url": "https://x.com/fabrizioromano"`

```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=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>max_number_of_posts</code>  ，<strong>max number of posts（optional）</strong></summary>

This parameter specifies the max number of posts to scrape.

**Request examples:**&#x20;

`"max_number_of_posts": "10"`

```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=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

2\. Twitter -  Scrape Twitter profile information by username

<details>

<summary><code>spider_id</code> ，<strong>Scraper tool (required)</strong></summary>

&#x20;Defines which scraper tool to use.

**Request examples:**

`spider_id=twitter_profiles_by-username`

```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=x.com" ^
  -d "spider_id=twitter_profiles_by-username" ^
  -d "spider_parameters=[{\"user_name\": \"elonmusk\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>user_name</code> ，<strong>Twitter username（required）</strong></summary>

This parameter specifies the profile username of posts to scrape.

**Request examples:**

`"user_name": "elonmusk"`

```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=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**Product - Scrape Twitter Post information**

1\. Twitter -  Scrape Twitter post information by url

<details>

<summary><code>spider_id</code> ，<strong>Scraper tool (required)</strong></summary>

Defines which scraper tool to use.

**Request examples:**

`spider_id=twitter_by-posturl_by-url`

```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=x.com" ^
  -d "spider_id=twitter_by-posturl_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/FabrizioRomano/status/1683559267524136962\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>url</code> ，<strong>URL (required)</strong></summary>

This parameter specifies the URL of posts to scrape.

**Request examples:**

`"url": "https://x.com/FabrizioRomano/status/1683559267524136962"`

```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=x.com" ^
  -d "spider_id=twitter_by-posturl_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/FabrizioRomano/status/1683559267524136962\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

2\. Twitter - Scrape Twitter post information by profile url

<details>

<summary><code>spider_id</code> ，<strong>Scraper tool (required)</strong></summary>

Defines which scraper tool to use.

**Request examples:**

`spider_id=twitter_by-posturl_by-profileurl`

```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=x.com" ^
  -d "spider_id=twitter_by-posturl_by-profileurl" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/elonmusk\",\"start_date\": \"2023-01-15T16:31:04.000Z\",\"end_date\": \"2024-01-01\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>url</code> ，<strong>Profile URL (required)</strong></summary>

This parameter specifies the profile url of posts to scrape.

**Request examples:**

`"url": "https://x.com/elonmusk"`

```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=x.com" ^
  -d "spider_id=twitter_by-posturl_by-profileurl" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/elonmusk\",\"start_date\": \"2023-01-15T16:31:04.000Z\",\"end_date\": \"2024-01-01\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>start_date</code> ，<strong>start date（optional）</strong></summary>

This parameter specifies the start date of post publication, in the format mm-dd-yyyy, and should be earlier than "end\_date".

**Request examples:**

`"start_date": "2023-01-15T16:31:04.000Z"`

```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=x.com" ^
  -d "spider_id=twitter_by-posturl_by-profileurl" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/elonmusk\",\"start_date\": \"2023-01-15T16:31:04.000Z\",\"end_date\": \"2024-01-01\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

<details>

<summary><code>end_date</code> ，<strong>end date（optional）</strong></summary>

This parameter specifies the end date of post publication, in the format mm-dd-yyyy, and should be later than "start\_date".

**Request examples:**

`"end_date": "2024-01-01"`

```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=x.com" ^
  -d "spider_id=twitter_by-posturl_by-profileurl" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/elonmusk\",\"start_date\": \"2023-01-15T16:31:04.000Z\",\"end_date\": \"2024-01-01\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

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