Skip to main content

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

Metadata

Release files for langchain-scrapingpros 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-scrapingpros 0.1.0
File Size Uploaded
langchain_scrapingpros-0.1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-scrapingpros 0.1.0
File Interpreter ABI Platform
langchain_scrapingpros-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / langchain_scrapingpros-0.1.0.tar.gz

Download URL langchain_scrapingpros-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cbc7cbf658cb375368680711d6105d2f63e1dc2766cb31ef92fb0654ed1344c8
BLAKE2b-256 checksum
How to use checksums
4b0d9dc2e3bbc164501fa6679df35afaf9905c2ed15ffe0e0504aa20c4ec9f7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / langchain_scrapingpros-0.1.0-py3-none-any.whl

Download URL langchain_scrapingpros-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ade9110327f1a93ec9320e46cf697c511aba98e17bf2d6c1e183c573fc491d24
BLAKE2b-256 checksum
How to use checksums
8be897e72c788e98a1fe74bb775c124a4eff1715a15fba9bdb904f333aab77c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page