SerpAPI Tool Failing in Stable (1.117.3)

Describe the problem/error/question

Agent is failing to be able to properly query the SerpAPI tool. Appears that agents generally are unable to provide the proper query parameter to the tool. Occurs with just a basic agent with only SerpAPI, no specialized prompting.

What is the error message (if any)?

Got error from serpAPI: Missing query `q` parameter.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.117.3
  • Database (default: SQLite): N/A (cloud)
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Windows, Linux, Mac

Yes indeed, there is a bug,

i feel that the issue in this functon

Have posted a bug report for it: SerpAPI Tool Failing in Stable · Issue #21353 · n8n-io/n8n · GitHub

Did find a resolution on our self-host with the following changes to ToolSerpApi.node.ts

Also updates to the ToolSerpApi.node.test.ts

It looks like AI Agent v2.2 is working as Jon’s reply on github

Yep, we were able to make it work with 2.2 for the moment. Will use that for now till it can be patched in a future agent node version.

1 Like

Hi all,
I’ve opened a PR for that actually.

Strict string validation is used to prevent unintended inputs; no automatic conversion of numbers or booleans. Please let me know if you think differently so I can adjust.

Link To PR

The SerpAPI Tool node currently appears to only have version 1 available in the n8n system.
Can you kindly explain how to update to 2.2 node from a beginner’s viewpoint?

It’s not the Serp node itself, its the AI Agent node that needs to be downgraded from 2.2 to 3.

For future reference, you’ll want to ask questions like that in the Discord or as their own question.

just ctrl+C and ctrl+v

You can use the official SerpApi tool instead. This should work well. Although I can confirm some people don’t see it when searching tools, I’m not sure why. Anecdotally, both people who couldn’t see it were based in Spain, and people who could see it were in Poland (all on trial accounts).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.