Integration · Agent framework
CleanedWeb for LlamaIndex
CleanedWebToolSpec gives a LlamaIndex agent find_api, get_api and run_api, each with an async version, so it can find a website API in the catalog, check its sample records and get structured records back.
Install and run an agent
pip install llama-index-tools-cleanedweb
Create an API key with the run scope under API keys in the console and export it as CLEANEDWEB_API_KEY. Finding and reading APIs needs no key.
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
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."))
Tools
find_api(site, fields, query, limit)Find published APIs for a site or topic. No key; nothing runs.get_api(api_id)Inputs, output fields, limitations and three saved sample records.run_api(...)Run an endpoint and return its records. Needs therunscope; charged per record.
To give an agent read-only access, leave out the run tool: to_tool_list(spec_functions=[("find_api", "afind_api"), ("get_api", "aget_api")]).
Links
- llama-index-tools-cleanedweb on PyPI The package.
- Source on GitHub README and options.
More integrations
-
LangChain
langchain-cleanedweb: three tools and a toolkit for LangChain agents.
-
Vercel AI SDK
cleanedweb/ai-sdk: findApi, getApi and runApi for AI SDK agents.
Every integration calls the same APIs
Pick an API in the catalog, or ask for a site it does not cover yet. 5,000 records are free once; after that you pay per record delivered.