I am unable to display the required “q” field in SerpAPI when I add it to my AI agent

Hello,

I’m having a problem with the SerpAPI node in n8n.

When I add it as a tool to my AI Agent, I don’t see the “q” field at all, even though n8n tells me it’s required to run a Google search.

As a result, I get this error:

Missing query q parameter.

I only have access to options like country, device, and language, but not to the “q” query.

I don’t know if this is a bug or if something is missing from my configuration.

Thanks for your help!

Hi @Nolame

As SerpAPI has a bug please use “SerpAPI Official Tool”

i’ve made a similar workflow to your and tested it.

Works well on my side.

I was testing SerpAPI and it returns same error as it was returned on your side.

I have the same problem.

@dkoryto Welcome in n8n community!

Could you send JSON code of your workflow?

Hi Piotr,

I have exactly the same issue, but i can’t seem to find “SerpAPI Official Tool” as an option. Where can i find it as an alternative?

Please try configuration below:

am getting the same error

Hello everyone. Not sure if it’s the right way or best way, I created a workaround using SerpAPI by using Google’s Programable web and a HTTP Request node as a tool. https://programmablesearchengine.google.com/
High level the steps I took are:

  1. Created a new programable search engine.
  2. Generated a key for it
  3. Copy my Key and my cx id (will need this to set up the request)
  4. In the HTTP Request node I created 3 parameters: Key=[YOUR API KEY FOR THAT Programable Search], cx=[Search engine ID] can be found in the Programable Search console and q for the query, I set up the value of q from the output of the agent.
  5. Set up the User prompt in the agent to clarify I want it to use the Google Search Tool it has access to and what topic I want it to search for.

This is the prompt I used for the User prompt (My system prompt deals with the format and steps I want it to take)

Using the GoogleProgramaticSearch tool you have access tool search for <topic>  for <date>

Hope this information helps someone else! Happy n8ning!