> 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/serp-api/integration/sdk-integration/how-to-integrate-thordata-with-n8n.md).

# How to integrate ThorData with n8n

This tutorial will guide you through installing the ThorData n8n node, configuring SERP API credentials, and running your first search workflow.

You can integrate ThorData into n8n using the `n8n-nodes-thordata-serp` community node. Once configured, you can directly call the ThorData SERP API within your n8n workflows to retrieve structured search results from search engines such as Google, Bing, DuckDuckGo, and Yandex.

#### Overview

n8n is a workflow automation platform that allows you to visually connect applications, APIs, and AI agents. ThorData provides SERP API capabilities suitable for real-time search result retrieval, localized search analysis, SEO monitoring, market research, and agent-driven web data workflows.<br>

**With the ThorData n8n integration, you can:**

* Execute SERP searches on Google, Bing, DuckDuckGo, Yandex, and more directly within n8n.
* Utilize localized search parameters such as country/region, language, device, and market.
* Integrate search results into workflows involving AI agents, reporting pipelines, alerts, data enrichment, and more.
* Pass advanced SERP parameters via raw request mode for scenarios requiring greater control.

#### Preparations

Before you begin, please ensure you have:

* A working n8n instance.
* Permissions for installing n8n community nodes.
* A [**ThorData SERP API key**](https://dashboard.thordata.com/serp-api/get-started) starting with <mark style="color:pink;">**`sk_`**</mark>.

#### Specific steps

{% stepper %}
{% step %}
**Installation**

Install the ThorData node in the Community Nodes panel of n8n:

* Start your n8n instance.
* Create a new workflow or open an existing one for editing, and search for thordata.
* Click on the "Install Node" option.

**After installation, n8n will add:**

* A credential type named <kbd><mark style="color:pink;">Thordata SERP API.<mark style="color:pink;"></kbd>
* A workflow node named <kbd><mark style="color:pink;">Thordata SERP<mark style="color:pink;"></kbd>.
  {% endstep %}

{% step %}
**Configure Credentials**

Before adding nodes to the production workflow, it is recommended to create ThorData credentials:

* Open <kbd>Credentials</kbd> in n8n.
* Create new credentials and select <kbd>Thordata SERP API</kbd>.
* Paste your <kbd>ThorData SERP API Key</kbd>.
* Unless you are testing an internal development environment, keep the default endpoint.
* Save or test the credential.

{% hint style="success" icon="filter" %}
Both credential testing requests and workflow execution requests send the following source identifier to ThorData for platform usage statistics:
{% endhint %}

```
Origin: n8n
```

{% endstep %}

{% step %}
**Create Your First Workflow**

Run a ThorData search in n8n:

* Create a new workflow or open an existing one.
* Add the <kbd>Thordata SERP</kbd> node.
* Select your <kbd>Thordata SERP API</kbd> credentials.
* Select an <kbd>operation</kbd>, such as <kbd>Google Search</kbd>.
* Fill in the fields displayed for the operation.
* Execute the node.

The node returns the <kbd>ThorData SERP JSON</kbd> response along with request metadata for the selected operation. You can pass the output to downstream n8n nodes, such as AI Agents, Code nodes, databases, spreadsheets, notification services, or reporting tools.
{% endstep %}
{% endstepper %}

#### Example: Google Search

You can use this action when you need to retrieve standard web search results from Google.

```
Operation: Google Search
Search Query: coffee
Country/Region: United States
Language: English
Number of results: 10
```

{% hint style="info" icon="sliders-simple" %}
Typical use cases include market research, SEO monitoring, competitor analysis, and retrieval-augmented AI workflows.
{% endhint %}

#### Example: Bing Image Search

This action can be used when the workflow needs to retrieve image search results from Bing.

```
Operation: Bing Image Search
Search Query: coffee
Country/Region: United States
Market: en-US
Result count: 10
```

#### Example: Google Lens Search

Google Lens Search can be used when the workflow takes an image URL as input.

```
Operation: Google Lens Search
Image URL: https://example.com/image.png
```

#### Example: Yandex Search

Yandex Search can be used when a workflow requires Yandex SERP results.

```
Operation: Yandex Search
Search Query: coffee
```

#### Advanced Usage: Raw SERP Request

You can use a <kbd>Raw SERP Request</kbd> when you want to select a pre-generated SERP action while manually passing advanced parameters.

```
Operation: Raw SERP Request
Raw Action: Google Lens Search
Raw Query: https://example.com/image.png
Extra Parameters JSON: {"hl":"en"}
```

The node automatically uses the correct query field based on the selected action—such as `q`、`text`、`url`、`product_id`、`patent_id`、`author_id` or `trend`。

{% hint style="warning" %}
The <kbd>Extra Parameters JSON</kbd>must be a valid JSON object. This field is merged into the request after the visible form fields. The node controls the `engine` and the default `json=2` value, so extra parameters cannot override the selected search engine.
{% endhint %}

#### Supported operations

<kbd>Thordata SERP</kbd> nodes expose SERP actions generated from ThorData metadata. The list of actions includes:

<table data-search="false"><thead><tr><th width="367">Sort</th><th>Supported operations</th></tr></thead><tbody><tr><td>Web Search</td><td>Google Search、Bing Search、DuckDuckGo Search、Yandex Search</td></tr><tr><td>Image</td><td>Google Images、Bing Images、Google Lens</td></tr><tr><td>News</td><td>Google News、Bing News</td></tr><tr><td>E-commerce</td><td>Google Shopping、Google Play</td></tr><tr><td>Research</td><td>Google Scholar、Google Patents</td></tr><tr><td>Local &#x26; Travel</td><td>Google Maps、Google Hotels、Google Flights</td></tr><tr><td>Market and Trend Data</td><td>Google Finance、Google Trends</td></tr></tbody></table>

{% hint style="info" %}
Each explicit action displays only the parameters it supports. To pass advanced parameters not shown in the form, use the <kbd>Extra Parameters JSON</kbd> field.
{% endhint %}

#### Troubleshooting

**401 or 403 error**

Please check:

* Does the API key start with <kbd><mark style="color:pink;">sk\_<mark style="color:pink;"></kbd>?
* Is the credential type <kbd><mark style="color:pink;">Thordata SERP API<mark style="color:pink;"></kbd>?
* Has the API key expired or been disabled?

> If necessary, please generate a new SERP API Key in ThorData and update the n8n credentials.

**400 error**

Please check:

* Whether the required query or URL fields have been filled in for the selected operation.
* Whether the <kbd>Extra Parameters JSON</kbd> is valid JSON.
* Whether the parameters match the selected SERP operation.

**429 error**

If the workflow triggers rate limiting, you can try:

* Reduce n8n workflow concurrency.
* Add batching or delay nodes between requests.
* Check your ThorData quotas and rate limits.

**Network error**

If n8n cannot access ThorData, please check:

* Check if the n8n runtime environment can access [<kbd>https://serpapi.thordata.net</kbd>](https://dashboard.thordata.com/serp-api/get-started).
* If your environment requires an outbound proxy, configure the proxy at the n8n runtime environment level.
* Check for firewall, DNS, or regional network restrictions in the deployment environment.

#### Next step

Once the node configuration is complete, you can connect the ThorData SERP results to:

* AI Agent node: provides real-time search context to the model.
* Database or table node: used for periodic SERP tracking.
* Notification node: used for alerts regarding news, rankings, or competitor changes.
* Code node: used for custom logic for filtering, sorting, extraction, or data augmentation.
