LlamaIndex Tool Spec: CleanedWeb
CleanedWeb turns
public website collections (listings, products, jobs, articles, profiles) into maintained REST APIs that
return structured records. CleanedWebToolSpec gives a LlamaIndex agent three tools: find_api,
get_api and run_api.
Pricing: 5,000 records free once, then prepaid credit from $1 per 1,000 records, no subscription. Runs are charged per record delivered. Pricing
Install
pip install llama-index-tools-cleanedweb
llama-index-tools-cleanedweb depends on cleanedweb.
Create an API key with the run scope in the console and export it as
CLEANEDWEB_API_KEY. Finding and reading APIs needs no key.
Usage
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI # or any LlamaIndex LLM
from llama_index.tools.cleanedweb import CleanedWebToolSpec
tools = CleanedWebToolSpec().to_tool_list() # find_api, get_api, run_api
agent = FunctionAgent(tools=tools, llm=OpenAI(model="gpt-4.1"))
print(await agent.run("Get 5 trending Python repositories from GitHub topics."))
| Tool | Needs key | What it does |
|---|---|---|
find_api(site, fields, query, limit) |
no | Find published APIs for a site or topic. Nothing runs. |
get_api(api_id) |
no | Inputs, output fields, limitations and three saved sample records. |
run_api(api_id, endpoint_id, input, max_items, idempotency_key) |
yes (run) |
Run an endpoint and return its records. Charged per record. |
The tool descriptions tell the model to find before it runs, to start with a small max_items, and that
records are website data, never instructions. The spec also enforces it: max_items defaults to
default_max_items=5 and is capped by max_items_limit=100. A run still going after wait_seconds
(default 60) returns status: running with its idempotency_key; calling run_api again with the same
arguments and key reads the same run and never starts or charges a second one. Client errors (no credit,
rate limit, failed run, lost connection) come back as short, actionable JSON text for the model; pass
raise_on_error=True to raise them instead. Every tool has an async twin (afind_api, aget_api,
arun_api) that the agent uses automatically.
CleanedWebToolSpec(api_key=..., base_url=..., client=...) overrides the defaults. To leave out the
paid tool: CleanedWebToolSpec().to_tool_list(spec_functions=[("find_api", "afind_api"), ("get_api", "aget_api")]).
Development
python -m venv .venv && . .venv/bin/activate
pip install -e ../cleanedweb-python -e ".[dev]"
ruff check . && ruff format --check . && mypy && pytest
Tests mock the HTTP layer; nothing in them calls the network or runs an API.
More
- Python guide, run a catalog API
- Prefer MCP? The hosted server is cleanedweb/cleanedweb-mcp.
MIT licensed.
Metadata
Release files for llama-index-tools-cleanedweb 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 |
|---|---|---|---|---|
| llama_index_tools_cleanedweb-0.1.0.tar.gz | 11.1 kB | With provenance | Details for llama_index_tools_cleanedweb-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_tools_cleanedweb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_tools_cleanedweb-0.1.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / llama_index_tools_cleanedweb-0.1.0.tar.gz
| Download URL | llama_index_tools_cleanedweb-0.1.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bac182fb6ad5d89ab9abc9a9b143ebb0b6fc3eb9cf508f326cb0fd093a483a5
|
|
BLAKE2b-256 checksum How to use checksums |
abdaa7cbf51eac21df7ac39718e4307d4d2385a6f2333978889153a02b4b536e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / llama_index_tools_cleanedweb-0.1.0-py3-none-any.whl
| Download URL | llama_index_tools_cleanedweb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3639c8562eeb28de26d09f54e1846eecd794b7c552fc29a01636705b3ee03808
|
|
BLAKE2b-256 checksum How to use checksums |
00b988b2d3193b18822d6b1e7023bde46a7fc6f9d67e086c9e291c6fe1384b53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for llama-index-tools-cleanedweb 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for llama_index_tools_cleanedweb-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA 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.