SearchApi icon

SearchApi

Call this tool whenever the answer might require fresh, niche, or externally-verifiable information. Make sure to always cite the sources in the final reply.

Overview

This node integrates with SearchAPI.io to perform web searches using various supported search engines. It is designed to fetch fresh, niche, or externally verifiable information by querying a specified search engine and returning the results in JSON format. This node is useful when you need up-to-date search results embedded within your workflow, such as retrieving current news, finding local businesses, or gathering data from specialized search engines.

Practical examples include:

  • Searching for nearby restaurants or services dynamically.
  • Fetching recent articles or blog posts on a specific topic.
  • Querying specialized search engines for industry-specific data.

Properties

Name Meaning
Engine The search engine to use for the query. Options correspond to those supported by SearchAPI.io (e.g., "google"). Refer to https://www.searchapi.io/docs/google for available engines.
Parameters A collection of key-value pairs representing additional parameters for the search query. Each parameter has a "Name" (parameter name) and a "Value" (parameter value). These parameters customize the search request according to the selected engine's API specification.

Output

The node outputs JSON data containing the search results returned by the SearchAPI.io service. The structure of the JSON depends on the chosen search engine and the parameters provided but generally includes fields such as titles, snippets, URLs, and other metadata related to the search results.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for SearchAPI.io to authenticate requests.
  • The node sends HTTP GET requests to https://www.searchapi.io/api/v1/search.
  • Users must configure the API key credential in n8n before using this node.

Troubleshooting

  • Common issues:

    • Exceeding the free quota of 100 requests may result in errors or blocked requests. Consider upgrading the plan if needed.
    • Incorrect or missing API key will cause authentication failures.
    • Providing invalid or unsupported engine names or parameters can lead to empty or error responses.
  • Error messages:

    • Authentication errors typically indicate an invalid or missing API key; verify the credential configuration.
    • Parameter validation errors suggest that one or more parameters are not recognized by the selected search engine; consult the SearchAPI.io documentation for valid parameters.
    • Rate limit exceeded errors mean the request quota has been surpassed; wait or upgrade your plan.

Links and References

Discussion