# Yelp 抓取參數

Web Scraper API Yelp 抓取參數

使用 Thordata 的 Web Scraper API 配置 Yelp 抓取參數，包括包括搜尋URL、商家URL、類別、位置和其他參數。

**唯一标識：**

<details>

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

此參數用作 API 存取令牌，以確保抓取的合法性。

**請求範例：**

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

```
curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer ********************" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"new york\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**一、產品-抓取商家資訊：**

1\. Yelp - 透過搜尋過濾器抓取商家訊息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具 (必填)</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**

`spider_id=yelp_business-overview_by-search-filters`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"new york\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>category</code> ，<strong>類別（必填）</strong></summary>

此參數指定要抓取的類別。

**請求範例:**

`"category": "cafe"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"new york\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>location</code> ，<strong>地點（必填）</strong></summary>

此參數指定要抓取的位置。

**請求範例:**

`"location": "new york"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"new york\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>business_page_turning</code>，<strong>最多商家清單頁數（可選）</strong></summary>

此參數指定要收集的商家清單頁數。

**請求範例:**

`"business_page_turning": "1"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"new york\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

2\. Yelp - 透過搜尋網址抓取商業訊息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具 (必填)</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**

`spider_id=yelp_business-overview_by-search-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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-url" ^
  -d "spider_parameters=[{\"search_url\": \"https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>search_url</code> ，<strong>搜尋網址（必填）</strong></summary>

此参数指定要抓取的搜索网址。

**請求範例:**

`"search_url": "https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-url" ^
  -d "spider_parameters=[{\"search_url\": \"https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>business_page_turning</code>，<strong>最多商家清單頁數（可選）</strong></summary>

此參數指定要收集的商家清單頁數。

**請求範例:**

`"business_page_turning": "1"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-url" ^
  -d "spider_parameters=[{\"search_url\": \"https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

3\. Yelp - 透過商家URL抓取商業訊息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具 (必填)</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**

`spider_id=yelp_business-overview_by-business-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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>business_url</code> ，<strong>商家URL(必填)</strong></summary>

此參數指定要搜尋的商家網址。

**請求範例:**

`"business_url": "https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
```

</details>

**產品 - 抓取商家評論資訊：**

1\. Yelp - 透過搜尋篩選器抓取商家評論訊息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具 (必填)</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**

`spider_id=yelp_business-reviews_by-search-filters`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"Stowe, VT\",\"business_page_turning\": \"1\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary> <code>category</code>， <strong>類別（必填）</strong></summary>

此參數指定要抓取的業務類別。

**請求範例:**

`"category": "cafe"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"Stowe, VT\",\"business_page_turning\": \"1\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary> <code>location</code>，<strong>地點（必填）</strong></summary>

此參數指定要抓取特定位置的商家。

**請求範例:**

`"location": "Stowe, VT"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"Stowe, VT\",\"business_page_turning\": \"1\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary> <code>business_page_turning</code>，<strong>最多商家清單頁數（可選）</strong></summary>

此參數指定要收集的商家清單頁數。

**請求範例:**

`"business_page_turning": "1"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"Stowe, VT\",\"business_page_turning\": \"1\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary> <code>review_page_turning</code>，<strong>最多評論頁數（可選）</strong></summary>

此參數指定要抓取的最大評論頁數。

**請求範例:**

`"max review pages": "1"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-search-filters" ^
  -d "spider_parameters=[{\"category\": \"cafe\",\"location\": \"Stowe, VT\",\"business_page_turning\": \"1\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

2\. Yelp - 透過搜尋網址抓取商家評論訊息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具 (必填)</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**

`spider_id=yelp_business-overview_by-search-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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-url" ^
  -d "spider_parameters=[{\"search_url\": \"https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>search_url</code>，<strong>搜尋URL（必填）</strong></summary>

此參數指定要抓取的搜尋 URL。

**請求範例:**

`"search_url": "https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-search-url" ^
  -d "spider_parameters=[{\"search_url\": \"https://www.yelp.com/search?find_desc=Cafes%26find_loc=Stowe%2C%2BVT\",\"business_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

3\. Yelp - 透過商家網址抓取商家評論訊息

<details>

<summary><code>spider_id</code> ，<strong>所屬抓取工具 (必填)</strong></summary>

它定義了要使用的抓取工具。

**請求範例：**

`spider_id=yelp_business-overview_by-business-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=yelp.com" ^
  -d "spider_id=yelp_business-overview_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>business_url</code>，<strong>商家URL（必填）</strong></summary>

此參數指定要抓取的商家URL。

**請求範例:**

`"business_url": "https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\",\"unrecommended_reviews\": \"yes\",\"sort_by\": \"DATE_DESC\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>unrecommended_reviews</code>，<strong>不推薦評論（必填）</strong></summary>

此參數用於指定是否抓取不建議的評論。

**請求範例:**

`"unrecommended_reviews": "yes"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\",\"unrecommended_reviews\": \"yes\",\"sort_by\": \"DATE_DESC\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>sort_by</code>，<strong>排序方式（可選）</strong></summary>

此參數用於指定抓取評論結果的排序方法。

**請求範例:**

`"sort_by": "DATE_DESC"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\",\"unrecommended_reviews\": \"yes\",\"sort_by\": \"DATE_DESC\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

<details>

<summary><code>review_page_turning</code>，<strong>最多評論頁數（可選）</strong></summary>

此參數用於指定要收集的最大評論頁數。

**請求範例:**

`"review_page_turning": "1"`

```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=yelp.com" ^
  -d "spider_id=yelp_business-reviews_by-business-url" ^
  -d "spider_parameters=[{\"business_url\": \"https://www.yelp.com/biz/the-round-hearth-caf%C3%A9-and-marketplace-stowe?osq=Sandwiches\",\"unrecommended_reviews\": \"yes\",\"sort_by\": \"DATE_DESC\",\"review_page_turning\": \"1\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

```

</details>

​

​

如果您需要進一步的協助，請透過電子郵件聯繫 <support@thordata.com>。
