FetchSERP

Interact with the FetchSERP API

Overview

This node integrates with the FetchSERP API to perform various web data retrieval operations, including scraping webpages that require JavaScript execution. The "Scrape Webpage JS" operation specifically allows users to scrape dynamic content from webpages by sending a POST request to the API endpoint designed for JavaScript-rendered pages.

Common scenarios where this node is beneficial include:

  • Extracting data from modern websites that rely heavily on client-side JavaScript for rendering content.
  • Automating data collection from pages that cannot be scraped using simple HTTP GET requests.
  • Gathering SEO or competitive intelligence data from dynamically generated web content.

For example, you might use this node to scrape product details from an e-commerce site that loads information via JavaScript or to collect search engine results rendered dynamically.

Properties

Name Meaning
Query Parameters (JSON) JSON object specifying query parameters for the API call (e.g., {"domain":"example.com"}). Used as URL query string for GET requests but still required here for consistency.
Request Body (JSON) JSON object representing the POST request body sent to the API when scraping JavaScript-rendered webpages. Contains parameters such as the target URL and any additional options needed by the API.

Output

The node outputs an array of items, each containing a json field with the parsed response from the FetchSERP API. For the "Scrape Webpage JS" operation, the JSON typically includes the scraped webpage content after JavaScript execution, structured according to the API's response format.

If the API returns binary data (not indicated in this code), it would be included accordingly, but this node primarily handles JSON responses.

Dependencies

  • Requires an active FetchSERP API key credential configured in n8n.
  • The node makes HTTP requests to the FetchSERP service base URL (https://www.fetchserp.com by default).
  • Network access to the FetchSERP API endpoints is necessary.
  • No other external dependencies are required.

Troubleshooting

  • Unknown operation error: If an unsupported operation name is provided, the node throws an error indicating the unknown operation. Ensure the operation parameter matches one of the supported values.
  • Invalid JSON input: The node expects valid JSON strings or objects for the "Query Parameters" and "Request Body" fields. Malformed JSON will cause parsing errors.
  • API authentication errors: If the API token is missing or invalid, requests will fail. Verify that the API key credential is correctly set up.
  • HTTP request failures: Network issues or API downtime can cause request errors. The node supports continuing on failure if enabled, returning error messages in the output JSON.
  • Empty or unexpected API responses: Check that the query parameters and request body contain all required fields expected by the FetchSERP API for the chosen operation.

Links and References

Discussion