Skip to main content

ghostcrawl-langchain

LangChain tool integration for the GhostCrawl web data API.

Exposes the GhostCrawl scrape / content / map / search / extract / crawl / usage / Google-vertical surfaces as LangChain BaseTool subclasses with shared Pydantic params validation.

Install

The current release is 2.3.8 (ghostcrawl-langchain==2.3.8):

pip install ghostcrawl-langchain==2.3.8

Publish = yes (public PyPI ghostcrawl-langchain).

First step: runtime setup

The tools talk to the GhostCrawl API (hosted cloud or your own machine). To run them locally, use the single unified terminal-install path — Docker, the three browser engines and your API key — documented at https://docs.ghostcrawl.io/self-host. One launcher covers Linux, macOS and Windows; no per-SDK installer is needed.

Quickstart

Each tool is a standard LangChain BaseTool. Call it synchronously with .invoke(...) — no await, no asyncio.run. Set GHOSTCRAWL_API_KEY (use your real gck_live_YOUR_KEY) in the environment first:

from ghostcrawl_langchain import GhostCrawlScrapeTool

# Reads GHOSTCRAWL_API_KEY from the environment (gck_live_YOUR_KEY).
tool = GhostCrawlScrapeTool()
result = tool.invoke({"url": "https://example.com", "output_format": "markdown"})
print(result)

Bind the tools to an agent/LLM exactly as you would any LangChain tool:

from ghostcrawl_langchain import GhostCrawlScrapeTool, GhostCrawlSearchTool

tools = [GhostCrawlScrapeTool(), GhostCrawlSearchTool()]
# llm.bind_tools(tools)  # your model of choice

Inside an async def (an async agent), use the awaitable twin await tool.ainvoke(...).

Framework-lane surface (idiomatic retrieval subset vs N/A)

ghostcrawl-langchain is a framework lane, not a full SDK: it wraps the idiomatic retrieval subset of the GhostCrawl API as LangChain tools an agent can call. Everything else is an explicit N/A — not a gap, just not idiomatic as an LC retrieval Tool/loader (zero blank cells, zero padded-green).

Capability Status Tool / rationale
scrape ✅ GREEN GhostCrawlScrapeTool → POST /v1/scrape
content ✅ GREEN GhostCrawlContentTool → POST /v1/content
extract ✅ GREEN GhostCrawlExtractTool → POST /v1/extract
map ✅ GREEN GhostCrawlMapTool → POST /v1/map
crawl ✅ GREEN GhostCrawlCrawlTool → POST /v1/crawl (seeds seed_urls)
search N/A (BYO) GhostCrawlSearchTool reaches /v1/search, which needs a user-supplied search-backend key (X-Provider-Authorization); a call without that search-backend key returns 401 search_backend_key_missing. The built-in ghostcrawl_google_search tool — GhostCrawl is the search provider, so no separate search key is needed — is the LC-idiomatic alternative.
crawl-runs, schedules, webhooks, recordings, kv, profiles, sessions, datasets, identity, me, storage-states N/A management / mutation — not a retrieval tool for an agent
pdf, screenshot N/A binary capture — not idiomatic as a text-returning LC tool/loader
agent N/A (BYO) agent is BYO/not-hosted (require_agent_enabled() 404); the developer supplies the LLM

Every tool is verified by a real-execution parity suite (transcripts record counts

  • variable names only); re-run with make -C sdks/python-langchain parity-e2e.

License

MIT — see LICENSE.

Metadata

Release files for ghostcrawl-langchain 2.3.8

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

Built distribution (wheel)

Table of built distributions (wheels) for ghostcrawl-langchain 2.3.8
File Interpreter ABI Platform Actions
ghostcrawl_langchain-2.3.8-py3-none-any.whl Python 3 none any Details for ghostcrawl_langchain-2.3.8-py3-none-any.whl

Release files / ghostcrawl_langchain-2.3.8-py3-none-any.whl

Download URL ghostcrawl_langchain-2.3.8-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7faa46e50b93848682d82eb886e72f56de0c2f635614f5c9b8482e10e75d9ab8
BLAKE2b-256 checksum
How to use checksums
cf1b667b1fa16c5e60e73e8b882d593e1c4bdba5a0d0f0cd765605e21fb78e51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for ghostcrawl-langchain 2.3.8

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.

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