langchain-outcrawl
LangChain tools and a document loader for Outcrawl, web infrastructure for AI agents.
OutcrawlSearchTool: web search through the Outcrawl search API. Returns results withurl,title,snippetandrank.OutcrawlScrapeTool: loads a page by URL through the Outcrawl scrape API and returns it as Markdown, with the page title and HTTP status code.OutcrawlLoader: aBaseLoaderthat does the same for a list of URLs and returns LangChainDocuments.
All three have async versions (ainvoke, alazy_load).
Installation
pip install langchain-outcrawl
You need an Outcrawl API key, which you create at outcrawl.ai/console. The free plan includes credits every month and needs no card (see pricing). Set it as an environment variable:
export OUTCRAWL_API_KEY="..."
or pass outcrawl_api_key= to the tool or loader.
Usage
Search
from langchain_outcrawl import OutcrawlSearchTool
search = OutcrawlSearchTool(limit=5)
results = search.invoke({"query": "Model Context Protocol specification"})
for r in results:
print(r["rank"], r["url"], r["title"])
Scrape a page
from langchain_outcrawl import OutcrawlScrapeTool
page = OutcrawlScrapeTool().invoke({"url": "https://example.com"})
print(page["status_code"], page["title"])
print(page["markdown"])
Load pages as documents
from langchain_outcrawl import OutcrawlLoader
docs = OutcrawlLoader(urls=["https://example.com"]).load()
print(docs[0].metadata["source"], docs[0].metadata["title"])
print(docs[0].page_content)
In an agent
The tools are ordinary LangChain tools, so you can hand them to any agent that takes a list of tools:
from langchain_outcrawl import OutcrawlScrapeTool, OutcrawlSearchTool
tools = [OutcrawlSearchTool(limit=5), OutcrawlScrapeTool()]
Options
timeout: request timeout in seconds (default 60).extra_params: a dict of extra request fields sent to the Outcrawl API as they are. See the Outcrawl docs for what the API accepts.- Errors: a rejected key (401), an empty balance (402) and other failures raise
OutcrawlErrorwith a readable message.
Development
pip install -e . pytest pytest-asyncio respx
pytest tests/unit_tests
The tests in tests/integration_tests call the real API and run only when OUTCRAWL_API_KEY is set.
License
Apache-2.0, see LICENSE.
Metadata
Release files for langchain-outcrawl 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_outcrawl-0.1.0.tar.gz | 10.4 kB | Without provenance | Details for langchain_outcrawl-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_outcrawl-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_outcrawl-0.1.0-py3-none-any.whl |
Total release size: 21.5 kB
Release files / langchain_outcrawl-0.1.0.tar.gz
| Download URL | langchain_outcrawl-0.1.0.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b349a7896c92bb8e111deee468db6a63852a81d11c502f5d741c1a82a716154
|
|
BLAKE2b-256 checksum How to use checksums |
9e15c11e3c377dd9e994cb6150edfa305c44ac11ef5af96176a088901e164f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / langchain_outcrawl-0.1.0-py3-none-any.whl
| Download URL | langchain_outcrawl-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cea479a7851f306259b199d2397c3b2e919647532713117a023d02ee4fb1e0f
|
|
BLAKE2b-256 checksum How to use checksums |
223f39b857f73c2534af6822718ff4b02eba0325a7857c96e0db71701e1da14e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for langchain-outcrawl 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.