mirror of
https://github.com/hwchase17/langchain.git
synced 2026-04-26 09:53:41 +00:00
Hi Langchain team! I'm the co-founder and mantainer at [ScrapeGraphAI](https://scrapegraphai.com/). By following the integration [guide](https://python.langchain.com/docs/contributing/how_to/integrations/publish/) on your site, I have created a new lib called [langchain-scrapegraph](https://github.com/ScrapeGraphAI/langchain-scrapegraph). With this PR I would like to integrate Scrapegraph as provider in Langchain, adding the required documentation files. Let me know if there are some changes to be made to be properly integrated both in the lib and in the documentation. Thank you 🕷️🦜 If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
# ScrapeGraph AI
|
|
|
|
>[ScrapeGraph AI](https://scrapegraphai.com) 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:
|
|
|
|
```bash
|
|
pip install langchain-scrapegraph
|
|
```
|
|
|
|
Set up your API key:
|
|
|
|
```bash
|
|
export SGAI_API_KEY="your-scrapegraph-api-key"
|
|
```
|
|
|
|
## Tools
|
|
|
|
See a [usage example](/docs/integrations/tools/scrapegraph).
|
|
|
|
There are four tools available:
|
|
|
|
```python
|
|
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
|