# 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.

Canonical page: https://clawifi.dev/for/llamaindex

## 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. Install the package

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

**Terminal**

```sh
pip install -U llama-index-tools-clawifi llama-index-llms-openai
```

### 2. Add a key, or try it without one

Set `CLAWIFI_API_KEY` from [clawifi.dev/signup](https://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](https://clawifi.dev/docs/remote-mcp)).

### 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**

```python
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](https://github.com/ReARCLabs/clawifi-llamaindex) · [llama-index-tools-clawifi on PyPI](https://pypi.org/project/llama-index-tools-clawifi/) · [LlamaIndex contributing guide](https://github.com/run-llama/llama_index/blob/main/CONTRIBUTING.md) · [Remote MCP](https://clawifi.dev/docs/remote-mcp). Clawifi works with LlamaIndex; it is not affiliated with its makers.

Reference: [MCP tools](https://clawifi.dev/docs/mcp-tools) lists every tool, the [CLI](https://clawifi.dev/docs/cli) checks a key and prints MCP config, and [Rate limits and plans](https://clawifi.dev/docs/rate-limits) shows how many calls run at once on each plan.

## Example prompts

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

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

> 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](https://clawifi.dev/pricing).

Related comparisons: [Clawifi vs Brave Search API](https://clawifi.dev/compare/brave-search-api) · [Clawifi vs Exa](https://clawifi.dev/compare/exa) · [Clawifi vs Tavily](https://clawifi.dev/compare/tavily).

## Other agents and frameworks

- [Clawifi for CrewAI](https://clawifi.dev/for/crewai): Add Clawifi’s hosted MCP server to a CrewAI agent and it can search the web, read pages and PDFs, and get only the passages that answer each question, with sources.
- [Clawifi for Open WebUI](https://clawifi.dev/for/open-webui): Add Clawifi to Open WebUI as an MCP tool server, and your models can search the web, read pages and PDFs, and get back the passages that answer each question, with sources.
- [Clawifi for Pydantic AI](https://clawifi.dev/for/pydantic-ai): Give a Pydantic AI agent Clawifi’s MCP tools in a few lines, and it can search the web, read pages and PDFs, and get back the passages that answer each question, with sources.
- [All agent guides](https://clawifi.dev/for): Every client and framework.

Next: [Integrations](https://clawifi.dev/integrations) · [Docs](https://clawifi.dev/docs) · [Pricing](https://clawifi.dev/pricing)
