SearchApi Tool
SearchApi Tool runs web searches through SearchApi, a service that gives access to several search engines’ results with a single key. You choose the search engine in the Engine field.
You can use it as a tool, connecting its Tool output to the Tools input of an agent: the agent decides when to search and what to type. You can also use it as a step in the flow, writing the search in Input and collecting the results from the Data output.
When to use it
- An assistant needs current information from the web to answer.
- You want an agent to search a specific engine offered by SearchApi.
- A flow searches every day for results about your brand and stores them for review.
- You already have a SearchApi account and want to use it in your flows.
Configuration
You need a Search API credential with your SearchApi key. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Search API credential used for searches. |
| Engine | The search engine to use, by the name SearchApi gives it, for example google. Always fill it in. |
| Input | The text to search for. Only used with the Data output; when you connect the Tool output the field is hidden, because the agent writes the search. |
Advanced options
| Field | What it does |
|---|---|
| Search parameters | Extra search options supported by SearchApi, as name and value pairs. For example, gl with value us for results from the United States. |
Output
- Tool: connects to an agent’s Tools input. The agent receives a text with the results of each search.
- Data: a list with one item per result, with its title, link and snippet.
When you connect one of the two outputs, the other one is hidden.
Example
An estate agency wants its assistant to look up public information about neighbourhoods.
- Add SearchApi Tool, pick the credential and write
googlein Engine. - In Search parameters, add
glwith valueukandhlwith valueen. - Connect the Tool output to the agent’s Tools input.
- A client asks “Which schools are near Islington?”. The agent searches and answers with what it finds.
Related components
- Google Serper API, Serp Search API and Bing Search API: other search services.