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.9 (ghostcrawl-langchain==2.3.9):

pip install ghostcrawl-langchain==2.3.9

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.9

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

Source distribution (sdist)

Source distribution for ghostcrawl-langchain 2.3.9
File Size Uploaded Provenance Actions
ghostcrawl_langchain-2.3.9.tar.gz 51.7 kB Without provenance Details for ghostcrawl_langchain-2.3.9.tar.gz

Built distribution (wheel)

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

Total release size: 69.1 kB

Release files / ghostcrawl_langchain-2.3.9.tar.gz

Download URL ghostcrawl_langchain-2.3.9.tar.gz
Size 51.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9f7d4e71a2c97b35e31fa22106428b6cf1c967f2b08293d4f41919a7f3316905
BLAKE2b-256 checksum
How to use checksums
150834778a079501ac8c2134607c0bf57f1740b39018c39fee6672262617a2a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

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

Download URL ghostcrawl_langchain-2.3.9-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d6e1d5ba0a30b0d14d409a8b15111a3fba9571939ab6878d451b28c8a4d6684
BLAKE2b-256 checksum
How to use checksums
02a7bf5489307790f3bf4e6ad3e0d28adc1a8a918781cfaacbc075f287f347a1
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.9

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