Snap Kit icon

Snap Kit

Consume Snap Kit API

Overview

This node integrates with the Snap Kit API to perform web content capture operations. It supports two main operations:

  • Take Snapshot: Captures a screenshot of a specified URL with customizable viewport size, quality, and full-page options.
  • Crawl Content: Extracts the content from a specified URL by crawling it.

Common scenarios for this node include:

  • Automatically capturing website screenshots for monitoring or documentation.
  • Extracting webpage content for data analysis, archiving, or further processing.
  • Using the synchronous option to wait for the operation to complete before continuing workflow execution.

For example, you could use the "Crawl Content" operation to fetch the latest news article content from a URL, or use "Take Snapshot" to generate a thumbnail image of a webpage.

Properties

Name Meaning
URL The URL to capture (must be a valid URI).
Operation Timeout Timeout in seconds for the operation to complete; valid range is 10 to 120 seconds.
Sync Whether to wait for the capture or crawl operation to complete before responding (true or false).

Note: The above properties are specific to the "Crawl Content" operation as requested.

Output

The node outputs an array of JSON objects representing the result of the operation:

  • For Crawl Content, the output JSON contains the crawled content data returned by the Snap Kit API.
  • If the operation fails and "Continue On Fail" is enabled, the output will contain an error object with an error field describing the failure message.

The node does not output binary data for the "Crawl Content" operation.

Dependencies

  • Requires an API key credential for authenticating with the Snap Kit API.
  • The node uses an internal helper function to make HTTP POST requests to Snap Kit endpoints /api/crawl.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Timeouts: If the operation times out, consider increasing the "Operation Timeout" property up to 120 seconds.
  • Invalid URL: Ensure the URL provided is a valid and accessible URI; otherwise, the API may return errors.
  • API Authentication Errors: Verify that the API key credential is correctly configured and has necessary permissions.
  • Error Handling: If the node throws errors, enabling "Continue On Fail" allows the workflow to continue and returns error details in the output for debugging.

Links and References

Discussion