SpaceSerp icon

SpaceSerp

Interact with SpaceSerp API

Overview

This node integrates with the SpaceSerp API to perform Google search queries programmatically. It allows users to send a search query and retrieve results directly within an n8n workflow, which is useful for automating data gathering, monitoring search engine results, or integrating search data into other processes.

Common scenarios include:

  • Automatically fetching Google search results for SEO analysis.
  • Monitoring competitor rankings or news mentions.
  • Aggregating search results for content research or market intelligence.

For example, you can input a keyword like "best electric cars 2024" and get structured search results in JSON format, which can then be processed or stored downstream in your workflow.

Properties

Name Meaning
Query The search query string to execute on Google.
Additional Fields A collection of optional parameters to customize the search:
- Country Country code to specify the Google result page location (default: "us").
- Device Device type for the search results: Desktop, Mobile, or Tablet (default: Desktop).
- Domain Google domain to perform the search on (default: "google.com").
- Language Interface language for the search results (default: "en").
- Location Specific location where the query is executed (optional).
- Page Number Which page of results to return, starting at 1 (default: 1).
- Page Size Number of results per page, between 1 and 100 (default: 10).
- Result Format Format of the returned results: JSON, CSV, or HTML (default: JSON).

Output

The node outputs an array of items, each containing a json property with the search results returned by the SpaceSerp API.

  • When the result format is JSON (default), the json field contains structured search result data as provided by the API.
  • If CSV or HTML formats are requested, the output will contain the raw response in those formats inside the json field.
  • No binary data output is produced by this node.

Example output snippet (simplified):

{
  "json": {
    "results": [
      {
        "title": "Example Title",
        "link": "https://example.com",
        "snippet": "Description text from the search result..."
      },
      ...
    ],
    "searchInformation": {
      "totalResults": "1230000",
      "searchTime": 0.45
    }
  }
}

Dependencies

  • Requires an API key credential for the SpaceSerp API.
  • The node makes HTTP GET requests to https://api.spaceserp.com/google/search.
  • Network access to the SpaceSerp API endpoint must be available.
  • No additional environment variables or configurations are required beyond the API key.

Troubleshooting

  • Common issues:

    • Invalid or missing API key will cause authentication errors.
    • Exceeding API rate limits may result in error responses.
    • Providing invalid parameter values (e.g., page number less than 1) might cause request failures.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Errors from the API are caught and either thrown or returned as error objects in the output if "Continue On Fail" is enabled.
    • Typical error message: "Unknown error occurred" indicates an unexpected failure; check API key validity and network status.
  • Resolution tips:

    • Verify that the API key credential is correctly configured and active.
    • Ensure all required parameters, especially the search query, are provided.
    • Use valid values for optional fields according to their constraints.
    • Enable "Continue On Fail" to handle errors gracefully in workflows.

Links and References

Discussion