0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Generate → HTML Scraping

AI-generated

Overview

The node "0CodeKit" provides a versatile toolbox of no-code utilities, including content generation, image processing, AI utilities, and more. Specifically, the Generate - HTML Scraping operation allows users to scrape HTML content from a specified URL using CSS selectors. This is useful for extracting specific elements or data from web pages without writing custom scraping scripts.

Common scenarios include:

  • Extracting product details or prices from e-commerce sites.
  • Gathering headlines or article snippets from news websites.
  • Collecting structured data like tables or lists from public web pages.

For example, you can input a URL of a blog post and use a CSS selector like .post-title to extract all titles on that page.

Properties

Name Meaning
URL The web address (URL) of the page to scrape.
Selector A CSS selector string to target specific HTML elements on the page (e.g., .class, #id, h1).
Wait for Element Boolean flag indicating whether the node should wait for the targeted element(s) to appear before scraping. Useful for pages with dynamic content loading.

Output

The node outputs JSON data containing the scraped HTML content matching the provided CSS selector from the specified URL. The structure typically includes an array or list of matched elements' content or attributes depending on the implementation of the scraping action.

If binary data were involved (e.g., images), it would be summarized accordingly, but this operation focuses on textual HTML content extraction.

Dependencies

  • Requires an API key credential for authentication with the external 0CodeKit service.
  • The node sends a POST request to the endpoint /generate/html-scrape on the 0CodeKit API base URL (https://prod.0codekit.com).
  • No additional environment variables are needed beyond the API key credential.

Troubleshooting

  • Empty or no results: Ensure the URL is correct and accessible. Verify the CSS selector matches elements on the page. If the page loads content dynamically, enable "Wait for Element".
  • Authentication errors: Confirm the API key credential is valid and correctly configured in n8n.
  • Timeouts or slow responses: Dynamic pages may require longer wait times; consider enabling "Wait for Element" or checking network connectivity.
  • Invalid URL format: Make sure the URL starts with http:// or https://.

Links and References

Discussion