Skip to main content

Serp API Tool

The Serp API (Search Engine Results Page) allows developers to scrape results from search engines such as Google, Bing and Yahoo, and can be used as in Langflow through the Search component.


To use the Serp API, you first need to sign up Serp API for an API key on the provider's website.

Here, the ZeroShotPrompt component specifies a prompt template for the ZeroShotAgent. Set a Prefix and Suffix with rules for the agent to obey. In the example, we used default templates.

The LLMChain is a simple chain that takes in a prompt template, formats it with the user input, and returns the response from an LLM.


In this example, we used ChatOpenAI as the LLM, but feel free to experiment with other Language Models!

The ZeroShotAgent takes the LLMChain and the Search tool as inputs, using the tool to find information when necessary.


Learn more about the Serp API here.

⛓️ Langflow Example

Docusaurus themed imageDocusaurus themed image

Download Flow

LangChain Components 🦜🔗

Hi, how can I help you?