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 Serper.dev Google Search API to perform image search operations. Specifically, for the "Image" resource and "Search Images" operation, it allows users to query Google Images programmatically, retrieving a list of images matching the search criteria.

Common scenarios where this node is beneficial include:

  • Automating image retrieval for content creation or marketing.
  • Gathering visual data for research or analysis.
  • Enhancing applications with dynamic image search capabilities.

For example, a user can input a search term like "sunset beaches," specify the number of results and language, and receive a curated list of relevant images from Google Images.

Properties

Name Meaning
Page Page number for paginated results (e.g., 1, 2, 3...)
Query The search query string to find images (required)
Results Number of results to return; options: 10, 20, 40, 60, 80, 100
Country Country code to localize the search (e.g., "us" for United States, "fr" for France)
Language Language code for the search interface and results (e.g., "en" for English, "fr" for French)
Autocorrect Boolean flag to enable or disable autocorrect on the search query

Output

The node outputs a JSON array containing the search results returned by the Serper.dev API. Each item in the array represents an image result with metadata as provided by the API. The exact structure depends on the API response but typically includes fields such as image URLs, titles, source links, and possibly thumbnails.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for the Serper.dev Google Search API.
  • The node uses HTTP POST requests to the Serper.dev endpoint https://google.serper.dev/images.
  • Proper configuration of the API key credential within n8n is necessary for authentication.

Troubleshooting

  • Common issues:

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

    • Errors thrown by the API are caught and returned as error objects in the output if "Continue On Fail" is enabled.
    • Typical error messages include authentication errors, invalid parameters, or server errors.
  • Resolutions:

    • Verify that the API key credential is correctly set up and valid.
    • Check the spelling and validity of country and language codes.
    • Use smaller result counts or fewer requests to avoid rate limiting.
    • Ensure stable internet connection.

Links and References


This summary focuses on the "Image" resource and "Search Images" operation as requested, based on static analysis of the provided source code and property definitions.

Discussion