Google Search API icon

Google Search API

Integrate with Google Search API (Serper.dev API) for search functionalities. Powered by CloudFly

Actions7

Overview

This node integrates with the Google Search API (via Serper.dev) to perform news article searches. It allows users to query for news articles based on a search term, with options to paginate results, specify the number of results, and filter by country and language. This node is useful for automating the retrieval of current news stories relevant to specific topics or regions.

Common scenarios:

  • Gathering recent news articles about a particular event or topic.
  • Monitoring news coverage in specific countries or languages.
  • Aggregating news data for analysis or reporting workflows.

Example use case:
A marketing team wants to track news mentions of their brand across different countries and languages. They can use this node to fetch news articles mentioning their brand name, specifying the country and language filters, and then process or store the results automatically.

Properties

Name Meaning
Page Page number for paginated results
Query The search query string to find relevant news articles
Results Number of results to return; options are 10, 20, 40, 60, 80, 100
Country Country code to localize the search (e.g., "us" for United States, "de" for Germany)
Language Language code to specify the language of the news articles (e.g., "en" for English)
Autocorrect Boolean flag to enable or disable autocorrect of the search query

Output

The node outputs an array of JSON objects representing news articles matching the search criteria. Each item corresponds to one news result returned by the API. The exact structure depends on the API response but typically includes fields such as title, snippet, source, date, and URL.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for the Serper.dev Google Search API.
  • The node makes authenticated HTTP POST requests to https://google.serper.dev/news.
  • Proper configuration of the API key credential in n8n is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication errors.
    • Exceeding API rate limits may result in request failures.
    • Incorrect country or language codes might yield no results or unexpected data.
    • Network connectivity problems can cause request timeouts or errors.
  • Error messages:

    • Errors from the API are caught and returned as error objects if "Continue On Fail" is enabled.
    • Typical error messages include authentication failures, invalid parameters, or server errors.
  • Resolution tips:

    • Verify that the API key credential is correctly set up and has sufficient permissions.
    • Check the spelling and validity of country and language codes.
    • Use smaller result counts or fewer pages to avoid hitting rate limits.
    • Enable "Continue On Fail" to handle errors gracefully in workflows.

Links and References

Discussion