> For the complete documentation index, see [llms.txt](https://docs.talordata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talordata.com/cn-tw/serp-api/integration/sdk-integration/how-to-integrate-talordata-with-dify.md).

# 如何將Talordata與Dify集成

一個由Talordata SERP API驅動的智能搜索數據挿件，幫助Dify工作流快速獲取來自Google、Bing、Yandex、DuckDuckGo等搜尋引擎的結構化搜索結果。 支持搜索結果、新聞、圖片、購物、本地結果等多種SERP數據類型，適用於SEO分析、AI Agent檢索、市場調研和內容研究等場景。

<figure><img src="/files/Cq98UT467zzRGdkL05rp" alt=""><figcaption></figcaption></figure>

### 可用工具

#### Search Engine Results

從主流搜索引擎獲取結構化搜索結果：

* Google Search
* Bing Search
* Yandex Search
* DuckDuckGo Search

#### SERP Data Modules

獲取不同類型的搜索結果數據：

* 新聞結果：Google News、Bing News
* 圖片結果：Google Images、Bing Images
* 視頻結果：Google Videos、Bing Videos
* 購物結果：Google Shopping、Bing Shopping
* 本地結果：Google Local、Google Maps
* 招聘結果：Google Jobs
* 飯店與班機結果：Google Hotels、Google Flights
* 趨勢與學術結果：Google Trends、Google Scholar

#### Search Result as Structured Data

將搜索結果轉換為乾淨、可供LLM直接處理的結構化數據，適用於：

* AI問答檢索
* RAG數據補充
* 競品信息分析
* 內容摘要生成
* 搜索結果對比
* SEO排名監控

### 使用場景

* SEO分析：跟踪關鍵字排名、競品頁面和搜索結果變化
* AI Agent檢索：讓智能體實时獲取搜尋引擎結果
* 內容研究：收集新聞、文章、博客和行業資料
* 市場調研：監控品牌、競品、產品和行業趨勢
* 本地SEO：分析不同城市的本地搜索結果
* 電商監控：獲取購物搜索結果、商品標題、價格和排名
* 輿情觀察：跟踪品牌詞、行業詞和熱點事件搜索結果

## 如何將Talordata與Dify集成

{% stepper %}
{% step %}

### 安裝挿件

從[Dify挿件市場](https://cloud.dify.ai/plugins?tab=discover\&q=talordata)安裝或進入dify，通過github連結安裝Talordata SERP API挿件。

安裝完成後，你可以在Dify Workflow中調用Talordata的搜索數據能力，將實时搜索結果接入到你的AI應用中。

{% endstep %}

{% step %}

### 獲取 Talordata API 密鑰

\- 登录你的 [Talordata 控制台](https://dashboard.talordata.com/)\
\- 進入 [SERP API API Token](https://dashboard.talordata.com/scraping/serp-api/api-token) 頁面\
\- 如果還沒有創建，請生成一個新的API 密鑰\
\- 複製該API Key，用於在Dify挿件中完成授權

{% endstep %}

{% step %}

### 創建你的第一個工作流

* 進入 Dify Studio → Workflow
* 新建一個工作流
* 添加任意 Talordata SERP API 工具，例如：

&#x20;     <kbd>Search Engine</kbd> — 從 Google、Bing、Yandex、DuckDuckGo 獲取搜索結果

* 在提示時輸入你的 <kbd>Talordata API Key</kbd>
* 連接一個LLM節點，用於總結、分析或重組搜索結果
* 最後連接END節點，輸出整理後的結果

{% endstep %}

{% step %}

### 示例工作流

示例用例：搜索某個關鍵詞，並讓LLM生成簡短分析報告。

#### Workflow 示例

1. START → 輸入：<kbd>關鍵詞</kbd>
2. Talordata Search Engine → 獲取搜索結果
3. LLM → 分析搜索結果，提取核心觀點、主要來源和排名情况
4. END → 輸出：結構化搜索分析報告
   {% endstep %}
   {% endstepper %}

{% hint style="info" %}

### 重要提示

* 工作流中的每一步都應引用上一步的輸出
* 如果輸入關鍵字較長，建議將輸入字段設定為 <kbd>short paragraph</kbd> 類型
* 如果需要分析多個關鍵字，可以使用循環節點或批量輸入
* 如果需要本地化搜索，請設定國家、語言、城市、設備等參數
  {% endhint %}

### 高級選項：使用Talordata MCP Server

除了在Dify中通過挿件或HTTP Request節點調用Talordata SERP API，高級用戶也可以使用 [Talordata MCP（Model Context Protocol）](/cn-tw/serp-api/mcp-server.md) 進行集成。

Talordata MCP將SERP API的搜索能力封裝為可被AI工具調用的MCP工具，讓Dify工作流或外部智能體可以更自然地調用搜索數據能力，例如實时搜索、結果分析、排名對比、競品監控等。

在Dify中，你可以通過自定義工具、HTTP請求節點或外部服務節點調用Talordata MCP，將MCP返回的數據繼續傳遞給LLM節點處理。


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.talordata.com/cn-tw/serp-api/integration/sdk-integration/how-to-integrate-talordata-with-dify.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
