Skip to main content

llama-index-tools-clawfetch

LlamaIndex tool spec for ClawFetch, a pay-per-call web intelligence API for AI agents. Each call is paid with an x402 micropayment in USDC on Base.

Install

pip install llama-index-tools-clawfetch

Wallet

You need a Base wallet private key that holds USDC. There is no API key and no signup. Payments are gasless EIP-3009 transfers signed locally by the clawfetch SDK, so the wallet does not need ETH. Use a dedicated wallet with a small balance.

export CLAWFETCH_PRIVATE_KEY=0x...

Quickstart

from llama_index.tools.clawfetch import ClawFetchToolSpec

spec = ClawFetchToolSpec()  # reads CLAWFETCH_PRIVATE_KEY
# or: ClawFetchToolSpec(private_key="0x...", max_chars=8000)

print(spec.fetch("https://example.com"))

tools = spec.to_tool_list()

To use the tools with an agent:

from llama_index.core.agent.workflow import FunctionAgent

agent = FunctionAgent(tools=tools, llm=llm)  # llm: any LlamaIndex LLM with tool calling
response = await agent.run("What's new on news.ycombinator.com?")

Tools

Function Price per call What it does
fetch(url) $0.001 URL to readable text (no JavaScript)
render(url, wait_for=None) $0.005 JavaScript-rendered page to text
extract(url, type=None) $0.008 Typed JSON from 17 supported sites
research(query, max_results=None) $0.02 Web search plus source texts for citations
parse(url, format=None) $0.005 Office document or PDF at a URL to Markdown (no OCR)
domains_check(domains) $0.003 Domain availability
domains_suggest(keywords, tlds=None, max_check=None) $0.003 Generate and check domain names from keywords

Supported extract sites: twitter, coingecko, github, news, npm, pypi, crates, hackernews, youtube, wikipedia, producthunt, imdb, amazon, crunchbase, sec-edgar, zillow, redfin.

Output and errors

Functions return a string. Fetch and render return the page title, URL and text. Parse returns Markdown. The other functions return the API response as JSON. Output is cut at max_chars (default 10,000).

SDK errors (PaymentError, RateLimitError, ApiError, NetworkError, all subclasses of clawfetch.ClawFetchError) are raised unchanged.

License

MIT

Metadata

Release files for llama-index-tools-clawfetch 0.1.0

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

Source distribution (sdist)

Source distribution for llama-index-tools-clawfetch 0.1.0
File Size Uploaded Provenance
llama_index_tools_clawfetch-0.1.0.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-tools-clawfetch 0.1.0
File Interpreter ABI Platform
llama_index_tools_clawfetch-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / llama_index_tools_clawfetch-0.1.0.tar.gz

Download URL llama_index_tools_clawfetch-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
df89f0d85de4fc0febbb39bada6fa48d6401f0ac52d0f7a63233015c8286d4bf
BLAKE2b-256 checksum
How to use checksums
72c37f40ed9f497d2a000fde9741962acb41028ca9cc2fe68b87564df35cc24d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / llama_index_tools_clawfetch-0.1.0-py3-none-any.whl

Download URL llama_index_tools_clawfetch-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8bc95c18412415e039dcdb897643a98abad1e1400a264e927cf0b6ecc1995d7
BLAKE2b-256 checksum
How to use checksums
832a82d5bcda98ff0673d2ad8fbec1bafcae289694ec6276917b5646e7893ad7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for llama-index-tools-clawfetch 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.

Release history Release notifications | RSS feed

This release

0.1.0 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