langchain-spidra
This package contains the LangChain integration with Spidra, an AI-powered web scraping and crawling API. It lets you scrape, crawl, and batch-scrape the web — as a document loader for RAG pipelines or as agent tools.
Quick Install
pip install langchain-spidra
Get an API key from spidra.io and set it as the
SPIDRA_API_KEY environment variable (or pass api_key=...).
export SPIDRA_API_KEY="spd-your-api-key"
Document loader
SpidraLoader loads web content as LangChain Documents. Pick a mode:
scrape (one page), crawl (a whole site), or batch (many URLs in parallel).
from langchain_spidra import SpidraLoader
# Scrape a single page
loader = SpidraLoader(url="https://example.com", mode="scrape")
docs = loader.load()
print(docs[0].page_content[:200])
print(docs[0].metadata)
# Crawl an entire docs site
loader = SpidraLoader(url="https://docs.example.com", mode="crawl")
docs = loader.load()
# Batch scrape many URLs
loader = SpidraLoader(
urls=["https://a.com", "https://b.com", "https://c.com"],
mode="batch",
)
docs = loader.load()
Tools
Each Spidra capability is also available as a BaseTool you can bind to an
agent:
from langchain_spidra import SpidraScrape, SpidraCrawl, SpidraBatchScrape
scrape = SpidraScrape()
result = scrape.invoke({"url": "https://example.com"})
print(result["content"])
crawl = SpidraCrawl()
pages = crawl.invoke({"url": "https://docs.example.com", "max_pages": 20})
for page in pages:
print(page["url"], page["data"][:100])
batch = SpidraBatchScrape()
items = batch.invoke({"urls": ["https://a.com", "https://b.com"]})
Documentation
- Spidra docs: docs.spidra.io
- Spidra homepage: spidra.io
Metadata
Release files for langchain-spidra 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_spidra-0.1.2.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_spidra-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.4 kB
Release files / langchain_spidra-0.1.2.tar.gz
| Download URL | langchain_spidra-0.1.2.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b86e7ef073e47e3e227af5c9af55177aa40ec7f72e512713a89e533bfa2dcc8d
|
|
BLAKE2b-256 checksum How to use checksums |
62abd165ca9aeef2f64aa184c08e606616fc272b4d2f4256db26e35c8c6201e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / langchain_spidra-0.1.2-py3-none-any.whl
| Download URL | langchain_spidra-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdb0e93678bd2a85992fb85bbf72f702f59b194475aa12fe8a94ba4f4ef134c6
|
|
BLAKE2b-256 checksum How to use checksums |
68cece93d8c7ed36e3d04350d2072ba276878ebfdb11cfce984ecaa8d6e9e4e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|