> 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/pa-qu/serp-api/pei-zhi.md).

# 配置

了解如何使用 Thordata 的 SERP API 獲取您的第一段爬取代碼。

導航至“[**配置**](https://dashboard.thordata.com/zh-hk/serp-api/configuration)”

<div align="left"><figure><img src="/files/V2bJMVzT2oF1jLGStwMt" alt="" width="563"><figcaption></figcaption></figure></div>

**1、Thordata 提供兩種方式來使用SERP API：**

* 直接 API 訪問
* 基於本機的代理訪問

<div align="left"><figure><img src="/files/Cvvial3boAFV0A5q7L4B" alt="" width="563"><figcaption></figcaption></figure></div>

在 “直接 API 訪問” 時，您需要 API 憑證。\
在 “基於本機的代理訪問” 時，您需要用戶名、密碼。\
該信息您可以在“配置頁面”的詳細信息中找到，想要修改用戶信息，您可以通過 “帳戶” 進行操作。

**2、SSL 證書：**\
為確保SERP API 請求的安全性，請使用我們的 SSL 證書或者忽略 SSL 錯誤。

{% hint style="info" %}
[**點擊此處**](https://doc.thordata.com/doc/zh-hk/pa-qu/serp-api/ssl-zheng-shu)了解更多關於 SERP API SSL 證書的教程。
{% endhint %}

<div align="left"><figure><img src="/files/UdfUOyh2QBUVwLMwmM0s" alt="" width="563"><figcaption></figcaption></figure></div>

3、代碼示例\
獲得 API 憑證或用戶名、密碼後，請使用以下代碼發送您的請求：

```sh
curl https://scraperapi.thordata.com/request -H "Content-Type: application/json" -H "Authorization: Bearer APIKEY" -d '{"url": "https://www.google.com/search?q=pizza"}'
```

```sh
curl -k "https://www.bing.com/search?q=pizza&json=1" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
```

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