Skip to content

About

Scrapfly plugin for Dify: scrape web pages and take screenshots

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Scrapfly

Scrape any web page from your Dify apps with Scrapfly. Scrapfly gets past anti-bot protection, renders JavaScript, routes through proxies in the country you pick, and returns the page as Markdown, ready for an LLM.

Source: https://github.com/scrapfly/scrapfly-dify-plugin

Tools

  • Scrape web page: fetch a URL and return its content as Markdown, text, clean HTML or raw HTML. Options: render JavaScript, anti-bot bypass (on by default), proxy country. Text pages come back as text. Binary files such as PDFs or images come back as a file, and large responses are fetched automatically.
  • Screenshot web page: take a screenshot of the visible area or the full page.

Setup

  1. Create a Scrapfly account at https://scrapfly.io/register. The free plan includes credits to try it.
  2. Copy your API key from https://scrapfly.io/dashboard.
  3. In Dify, install the Scrapfly plugin, open Tools, select Scrapfly, click Authorize and paste the API key.

The plugin uses the official Scrapfly Python SDK to call https://api.scrapfly.io, so your Dify instance needs outbound HTTPS access to it.

Usage

Add Scrape web page to an agent or a workflow and give it a URL. In an agent, the model fills the URL and decides when to render JavaScript. In a workflow, the Markdown is in the tool's text output, and json holds the final URL, the HTTP status, the content_type, the format (text or binary) and, for text, its length. For binary content, the file is in the tool's files output and json holds the size instead of the content.

Each call uses Scrapfly credits. Anti-bot bypass and JavaScript rendering cost more credits than a plain request. See https://scrapfly.io/docs/scrape-api/billing.

When a call fails, the tool returns a message that says what went wrong and what to do next: fix the API key, check the plan, retry with JavaScript rendering, check the URL, or wait and retry.

Support

Open a ticket from the help desk in the Scrapfly dashboard at https://scrapfly.io/dashboard. Documentation: https://scrapfly.io/docs

About

Scrapfly plugin for Dify: scrape web pages and take screenshots

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages