[ clawifi for llamaindex ]

Web search and page reading for LlamaIndex

Install llama-index-tools-clawifi and a LlamaIndex agent can search the web and read pages and PDFs as Markdown, or only the passages that answer a question, with sources.

What Clawifi gives LlamaIndex#

ClawifiToolSpec turns Clawifi search and page reading into LlamaIndex tools that return Documents, with the URL, title and rank in metadata, so results flow into the rest of your pipeline.

  • Search: search_free searches many engines as one and returns ranked results with their sources.
  • Read: fetch_url and scrape_url read pages and PDFs as Markdown; with a query, scrape_url returns only the passages that answer it.
  • Parse and discover: extract_url pulls structured fields from a page; map_site lists a site’s URLs; start_crawl and get_crawl read several pages.
  • Jobs, history and monitors: create_job, get_job, list_history and list_monitors for longer runs and scheduled checks.
  • Cost first: estimate prices a call before it runs, and the account tools show your credits.

Set it up#

  1. 1. Install the package

    llama-index-tools-clawifi is on PyPI (MIT); its source is ReARCLabs/clawifi-llamaindex. It uses the llama_index.tools.clawifi namespace. Install the LlamaIndex LLM package you use with it (here OpenAI).

    Terminal
    pip install -U llama-index-tools-clawifi llama-index-llms-openai
  2. 2. Add a key, or try it without one

    Set CLAWIFI_API_KEY from clawifi.dev/signup; the Free plan includes 1,000 credits a month. Without a key the package uses the hosted server’s keyless trial: 12 calls a minute and 50 a day per address, at most 3 search results (Remote MCP).

  3. 3. Give the tools to an agent

    The tool spec has search and fetch, each with an async version. Replace the model with the one you use.

    agent.py
    import asyncio
    
    from llama_index.core.agent.workflow import FunctionAgent
    from llama_index.llms.openai import OpenAI
    from llama_index.tools.clawifi import ClawifiToolSpec
    
    
    async def main():
        tools = ClawifiToolSpec(max_results=5).to_tool_list()
        agent = FunctionAgent(tools=tools, llm=OpenAI(model="your-model"))
        response = await agent.run("What changed in the latest MCP specification?")
        print(response)
    
    
    asyncio.run(main())

Sources for this setup: llama-index-tools-clawifi on GitHub · llama-index-tools-clawifi on PyPI · LlamaIndex contributing guide · Remote MCP. Clawifi works with LlamaIndex; it is not affiliated with its makers.

Reference: MCP tools lists every tool, the CLI checks a key and prints MCP config, and Rate limits and plans shows how many calls run at once on each plan.

Example prompts#

Agent prompt

Search for the three newest papers on long-context retrieval and read each abstract.

Agent prompt

Read https://docs.llamaindex.ai and return only the passages about agents.

Agent prompt

Search the web for the latest MCP specification changes and summarise them with links.

Questions#

How do I use Clawifi in LlamaIndex?

Install llama-index-tools-clawifi, build ClawifiToolSpec(), call to_tool_list() and pass the tools to an agent such as FunctionAgent.

What do the tools return?

search returns one Document per result, with the snippet as text and url, title and rank in metadata. fetch returns the page or PDF as Markdown, or only the passages that answer query.

Is it in the llama_index repository?

No. LlamaIndex no longer takes new integration packages in its repository, so this one is published on its own on PyPI, in the usual llama_index.tools.* namespace.

What does it cost?

Each tool call is billed like the API route it runs: most cost 1 credit and a browser render 3. Cache hits, failures on Clawifi’s side and answers with nothing to read (a blocked page, a JavaScript shell, a 404) cost 0. The Free plan includes 1,000 credits a month. See Pricing.

Related comparisons: Clawifi vs Brave Search API · Clawifi vs Exa · Clawifi vs Tavily.

Other agents and frameworks#

Next: Integrations · Docs · Pricing

This page as Markdown · llms.txt