Skip to main content

ClearFetch Python SDK (clearfetch)

Official Python Client for ClearFetch (clearfetch.dev)
Unblocked web access, residential Cloudflare Turnstile / DataDome bypass, and clean Markdown / structured JSON extraction for autonomous AI agents, LangChain, and LlamaIndex.


⚡ Installation

pip install clearfetch

(Optional integrations)

pip install "clearfetch[langchain]"
pip install "clearfetch[llamaindex]"

🚀 Quick Start

1. Read Any Webpage as Clean Markdown

from clearfetch import ClearFetch

# Initialize client (uses CLEARFETCH_API_KEY env var by default)
client = ClearFetch(api_key="cf_live_your_key_here")

# Automatically bypasses Turnstile & DataDome and returns clean Markdown
doc = client.read("https://www.bloomberg.com/markets")

print("Title:", doc.title)
print("Tokens:", doc.metadata.estimated_tokens)
print("Content:\n", doc.markdown)

2. Async Client for High-Concurrency Multi-Agent Frameworks

import asyncio
from clearfetch import AsyncClearFetch

async def main():
    client = AsyncClearFetch(api_key="cf_live_your_key_here")
    doc = await client.read("https://news.ycombinator.com")
    print(doc.markdown)

asyncio.run(main())

3. Extract Typed Structured JSON (LLM Schema Enforcement)

schema = {
    "type": "object",
    "properties": {
        "headline": {"type": "string"},
        "market_index": {"type": "string"},
        "points_change": {"type": "number"}
    },
    "required": ["headline"]
}

result = client.extract(
    url="https://www.bloomberg.com/markets",
    json_schema=schema,
    prompt="Extract top market index status"
)

print(result.data)

4. LangChain Integration

from clearfetch import ClearFetchLoader

loader = ClearFetchLoader(
    urls=["https://www.reddit.com/r/technology"],
    api_key="cf_live_your_key_here"
)

docs = loader.load()
print(docs[0].page_content)

5. CLI Terminal Usage

# Export your key
export CLEARFETCH_API_KEY="cf_live_..."

# Scrape to Markdown
clearfetch read https://example.com

# Live search and bundle
clearfetch search "Autonomous AI agents" --limit 3

📄 License

MIT License. Developed by ClearFetch Team (clearfetch.dev).

Metadata

Release files for clearfetch 1.0.1

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

Source distribution (sdist)

Source distribution for clearfetch 1.0.1
File Size Uploaded Provenance Actions
clearfetch-1.0.1.tar.gz 8.9 kB Without provenance Details for clearfetch-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clearfetch 1.0.1
File Interpreter ABI Platform Actions
clearfetch-1.0.1-py3-none-any.whl Python 3 none any Details for clearfetch-1.0.1-py3-none-any.whl

Total release size: 17.6 kB

Release files / clearfetch-1.0.1.tar.gz

Download URL clearfetch-1.0.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1f2094340ebf0d484f042c4e7af3419ce5955a3d51e6be74f02ca5c3896add0a
BLAKE2b-256 checksum
How to use checksums
f6841e86b5c46ec1ea4c814c41bcc6f7d7b709d5950f58d63a47526925a00a0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / clearfetch-1.0.1-py3-none-any.whl

Download URL clearfetch-1.0.1-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56a3ad017068727f8e2789ab149a4669b936e2867bccf1d0d31eec50d5436775
BLAKE2b-256 checksum
How to use checksums
aec2d9d640fbc9d38d0be171deec98741be4d788f00c1c62ba19035c96c83a2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for clearfetch 1.0.1

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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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