Skip to main content
Open on GitHub

ScrapeGraph AI

ScrapeGraph AI is a service that provides AI-powered web scraping capabilities. It offers tools for extracting structured data, converting webpages to markdown, and processing local HTML content using natural language prompts.

Installation and Setupโ€‹

Install the required packages:

pip install langchain-scrapegraph

Set up your API key:

export SGAI_API_KEY="your-scrapegraph-api-key"

Toolsโ€‹

See a usage example.

There are four tools available:

from langchain_scrapegraph.tools import (
SmartScraperTool, # Extract structured data from websites
MarkdownifyTool, # Convert webpages to markdown
LocalScraperTool, # Process local HTML content
GetCreditsTool, # Check remaining API credits
)

Each tool serves a specific purpose:

  • SmartScraperTool: Extract structured data from websites given a URL, prompt and optional output schema
  • MarkdownifyTool: Convert any webpage to clean markdown format
  • LocalScraperTool: Extract structured data from a local HTML file given a prompt and optional output schema
  • GetCreditsTool: Check your remaining ScrapeGraph AI credits

Was this page helpful?

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy