LangChain integration for Scraping Pros — web scraping tools for AI agents.
Project description
langchain-scrapingpros
LangChain integration for Scraping Pros — web scraping tools for AI agents.
Installation
pip install langchain-scrapingpros
Quick Start
from langchain_scrapingpros import ScrapingProsScraper
# Use demo token (5,000 credits/month, no signup)
tool = ScrapingProsScraper(api_key="demo_6x595maoA6GdOdVb")
result = tool.invoke({"url": "https://example.com"})
print(result)
Tools
ScrapingProsScraper
Scrape a web page and return clean markdown text. Ideal for RAG pipelines and LLM consumption.
from langchain_scrapingpros import ScrapingProsScraper
tool = ScrapingProsScraper() # uses SCRAPINGPROS_API_KEY env var
# Simple scrape
result = tool.invoke({"url": "https://example.com"})
# JavaScript-heavy site
result = tool.invoke({"url": "https://spa-site.com", "browser": True})
ScrapingProsExtractor
Extract structured data using CSS selectors. Returns JSON.
from langchain_scrapingpros import ScrapingProsExtractor
tool = ScrapingProsExtractor()
result = tool.invoke({
"url": "https://quotes.toscrape.com/",
"fields": {
"quotes": "css:.text",
"authors": "css:.author",
},
})
Use with LangChain Agents
from langchain_scrapingpros import ScrapingProsScraper, ScrapingProsExtractor
tools = [ScrapingProsScraper(), ScrapingProsExtractor()]
# Pass tools to your LangChain agent
Authentication
Set SCRAPINGPROS_API_KEY environment variable, or pass api_key= explicitly.
Demo token for quick testing: demo_6x595maoA6GdOdVb (5,000 credits/month).
Get a dedicated token at scrapingpros.com.
Features
- Clean markdown output for AI/LLM consumption
- Automatic proxy rotation (950+ proxies, 200+ countries)
- Headless browser rendering for JavaScript sites
- CSS/XPath data extraction
- Anti-bot bypass (Camoufox anti-detection)
- CAPTCHA detection with clear error messages
- Sync and async support
Links
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_scrapingpros-0.1.0.tar.gz.
File metadata
- Download URL: langchain_scrapingpros-0.1.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbc7cbf658cb375368680711d6105d2f63e1dc2766cb31ef92fb0654ed1344c8
|
|
| MD5 |
62e518d723a516c8154c07f8f90dfdca
|
|
| BLAKE2b-256 |
4b0d9dc2e3bbc164501fa6679df35afaf9905c2ed15ffe0e0504aa20c4ec9f7d
|
File details
Details for the file langchain_scrapingpros-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_scrapingpros-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ade9110327f1a93ec9320e46cf697c511aba98e17bf2d6c1e183c573fc491d24
|
|
| MD5 |
7843c826e5223f921cef56f580a88260
|
|
| BLAKE2b-256 |
8be897e72c788e98a1fe74bb775c124a4eff1715a15fba9bdb904f333aab77c8
|