Skip to content

Serp Search API

Serp Search API runs Google searches through the SerpApi service and returns the results: the title, link and text snippet of each page found. Use it when a flow or an agent needs up-to-date information from the internet.

You can use it in two ways. As a step in a flow, you type the search in Input and get the results from the Data output. As a tool, you connect its Tool output to the Tools input of an agent: the agent decides when to search and what to type.

When to use it

  • A customer service agent needs recent public information, such as a supplier’s opening hours or news.
  • You want to keep an eye on what Google shows about your brand or a product.
  • You are preparing market reports and need to collect links and summaries from several pages.
  • You want to give an agent internet access without it having to browse pages.

Configuration

You need a SerpApi credential with your SerpApi account key. Choose it in the component’s credential field. See Credentials.

FieldWhat it does
SerpAPI API Key (required)Your SerpApi account key.
InputWhat you want to search for, for example Madrid post office opening hours. When the component is used as a tool, the agent writes the search.

Advanced options

FieldWhat it does
ParametersExtra search parameters supported by SerpApi, as name and value pairs. For example, hl with value en to get results in English, or gl with value us for results from the United States. Leave it empty if you don’t need them.

Output

  • Data: a list with one item per Google result. Each item includes, among other details, the title, the link and the page’s text snippet. You can connect it to components that format text, filter data, or to an agent that summarises them.
  • Tool: the search ready for an agent. Connect it to the agent’s Tools input. The agent receives the results as text.

Example

A travel agency wants its assistant to answer questions about events in destination cities.

  1. Add Serp Search API and choose the agency’s SerpApi credential.
  2. In Parameters, add hl with value en.
  3. Connect the Tool output to the agent’s Tools input.
  4. When a customer asks “Are there any concerts in Seville this weekend?”, the agent searches Google and answers with what it finds.

Good practices

  • SerpApi charges per search on your account. If the agent searches too often, tell it in its instructions when it should search.
  • Ask the agent to quote the link it took the information from so the user can check it.