From b4622ff75f560baab9471ef1095da3ef0d42b843 Mon Sep 17 00:00:00 2001 From: Sebastjan Prachovskij Date: Wed, 11 Sep 2024 12:57:38 +0300 Subject: [PATCH 1/2] Add SearchApi tool documentation --- docs/advanced-ai/langchain/langchain-n8n.md | 1 + .../n8n-nodes-langchain.toolsearchapi.md | 40 +++++++++++++++++++ .../builtin/credentials/searchapi.md | 36 +++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md create mode 100644 docs/integrations/builtin/credentials/searchapi.md diff --git a/docs/advanced-ai/langchain/langchain-n8n.md b/docs/advanced-ai/langchain/langchain-n8n.md index 0635691abf8..cf7784c1cf5 100644 --- a/docs/advanced-ai/langchain/langchain-n8n.md +++ b/docs/advanced-ai/langchain/langchain-n8n.md @@ -156,6 +156,7 @@ Utility tools. * [Calculator](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolcalculator/) * [Code Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolcode/) +* [SearchApi](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi/) * [SerpAPI](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/) * [Vector Store Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolvectorstore/) * [Wikipedia](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwikipedia/) diff --git a/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md new file mode 100644 index 00000000000..265ae30c359 --- /dev/null +++ b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md @@ -0,0 +1,40 @@ +--- +#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 +title: SearchApi +description: Documentation for the SearchApi node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information. +priority: high +--- + +# SearchApi + +The SearchApi node allows an agent in your workflow to call Google, Bing, Baidu, Google News, YouTube APIs. + +On this page, you'll find the node parameters for the SearchApi node, and links to more resources. + +/// note | Credentials +You can find authentication information for this node [here](/integrations/builtin/credentials/searchapi/). +/// + +--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md" + +## Node options + +* **Engine**: defines an engine that will be used to retrieve real-time data. Refer to [documentation](https://www.searchapi.io/docs/google) for all available engines. +* **Country**: refer to [Google GL Parameter: Supported Google Countries](https://www.searchapi.io/docs/parameters/google/gl){:target=_blank .external-link} for supported countries and country codes. +* **Device**: the device to use to get the search results. +* **Google Domain**: refer to [Supported Google Domains](https://www.searchapi.io/docs/parameters/google/domain) for supported domains. +* **Language**: refer to [Google HL Parameter: Supported Google Languages](https://www.searchapi.io/docs/parameters/google/hl){:target=_blank .external-link} for supported languages and language codes. +* **Video ID**: defines the video you want to search. Usable only with `youtube_transcripts` engine. +* **Lang**: defines language for transcripts. Usable only with `youtube_transcripts` engine. + +## Templates and examples + + +[[ templatesWidget(title, 'searchapi') ]] + +## Related resources + +Refer to [SearchApi's documentation](https://www.searchapi.io/){:target=_blank .external-link} for more information about the service. You can also view [LangChain's documentation on integration](https://js.langchain.com/v0.2/docs/integrations/tools/searchapi/){:target=_blank .external-link}. + +--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" +--8<-- "_glossary/ai-glossary.md" diff --git a/docs/integrations/builtin/credentials/searchapi.md b/docs/integrations/builtin/credentials/searchapi.md new file mode 100644 index 00000000000..ed416fe513d --- /dev/null +++ b/docs/integrations/builtin/credentials/searchapi.md @@ -0,0 +1,36 @@ +--- +#https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4 +title: SearchApi credentials +description: Documentation for the SearchApi credentials. Use these credentials to authenticate SearchApi in n8n, a workflow automation platform. +contentType: integration +priority: high +--- + +# SearchApi credentials + +You can use these credentials to authenticate the following nodes: + +* [SearchApi](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi/) + +## Prerequisites + +Create a [SearchApi](https://www.searchapi.io/){:target=_blank .external-link} account. + +## Supported authentication methods + +- API key + +## Related resources + +Refer to [SearchApi's API documentation](https://www.searchapi.io/docs/google){:target=_blank .external-link} for more information about the service. + +## Using API key + +To configure this credential, you'll need: + +- An **API Key** + +To get your API key: + +1. Go to **Your Account >** [**API Key**](https://www.searchapi.io/api_tokens){:target=_blank .external-link}. +2. Copy **Your Private API Key** and enter it as the **API Key** in your n8n credential. From 36879930572fb89f06361755c203f19fa9aee4d9 Mon Sep 17 00:00:00 2001 From: Sebastjan Prachovskij Date: Tue, 17 Sep 2024 16:24:32 +0300 Subject: [PATCH 2/2] Update LangChain link, add SearchApi to AI tools --- docs/advanced-ai/examples/understand-tools.md | 2 +- .../sub-nodes/n8n-nodes-langchain.toolsearchapi.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced-ai/examples/understand-tools.md b/docs/advanced-ai/examples/understand-tools.md index 16a73ec1cf2..f2af1d1ccf5 100644 --- a/docs/advanced-ai/examples/understand-tools.md +++ b/docs/advanced-ai/examples/understand-tools.md @@ -19,7 +19,7 @@ Here are a couple of other ways of expressing it: ## AI tools in n8n -n8n provides tool sub-nodes that you can connect to your AI agent. As well as providing some popular tools, such as [Wikipedia](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwikipedia/) and [SerpAPI](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/), n8n provides three especially powerful tools: +n8n provides tool sub-nodes that you can connect to your AI agent. As well as providing some popular tools, such as [Wikipedia](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolwikipedia/),[SearchApi](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi/), and [SerpAPI](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolserpapi/), n8n provides three especially powerful tools: * [Custom n8n Workflow Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolworkflow/): use this to load any n8n workflow as a tool. * [Custom Code Tool](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolcode/): write code that your agent can run. diff --git a/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md index 265ae30c359..6452974f460 100644 --- a/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md +++ b/docs/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.toolsearchapi.md @@ -34,7 +34,7 @@ You can find authentication information for this node [here](/integrations/built ## Related resources -Refer to [SearchApi's documentation](https://www.searchapi.io/){:target=_blank .external-link} for more information about the service. You can also view [LangChain's documentation on integration](https://js.langchain.com/v0.2/docs/integrations/tools/searchapi/){:target=_blank .external-link}. +Refer to [SearchApi's documentation](https://www.searchapi.io/){:target=_blank .external-link} for more information about the service. You can also view [LangChain's documentation on integration](https://js.langchain.com/docs/integrations/tools/searchapi/){:target=_blank .external-link}. --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" --8<-- "_glossary/ai-glossary.md"