> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# How do I use BeatAPI Web Search tools in Claude Code or Codex MCP, and why does Python urllib return 403 (1010)?

> BeatAPI MCP exposes web_search, web_read, web_map, and web_research directly alongside capabilities_*; in Python urllib, set a custom User-Agent header to avoid edge 403 error code 1010.

Unlike SEO tools (which run through `capabilities_run`), BeatAPI MCP (`https://beatapi.io/mcp`) exposes **`web_search`**, **`web_read`**, **`web_map`**, and **`web_research`** as direct top-level MCP tools with the exact same JSON arguments and prices as REST. If your Python script gets `403` with body `error code: 1010` before hitting BeatAPI, you are using `urllib` with its default `Python-urllib/*` User-Agent—set a custom `User-Agent` header to fix it immediately.

## Direct MCP tool limits in Claude Code, Cursor, and Codex

Once connected to `https://beatapi.io/mcp` with `Authorization: Bearer <BEATAPI_API_KEY>`, the four tools appear directly in your client's tool list:

| MCP tool       | Per-call timeout        | Notes                                                                           |
| -------------- | ----------------------- | ------------------------------------------------------------------------------- |
| `web_search`   | 30 seconds              | Synchronous; returns JSON + `structuredContent`                                 |
| `web_read`     | 75 seconds              | Synchronous; reduce URL count or `max_chars` if a slow site times out           |
| `web_map`      | 60 seconds              | Synchronous; use `select_paths` to stay fast                                    |
| `web_research` | 45 seconds initial wait | Runs as a task; if still running after 45s, returns `next` to poll every 10–15s |

A timeout returns `processing_timeout` (`retryable: true`) at `$0` cost. See client setup configs on [BeatAPI Integrations](https://beatapi.io/integrations) and [Web Search API](/web-search#mcp).

## Fixing Python `urllib` `403 error code: 1010`

The edge network in front of `api.beatapi.io` blocks Python `urllib`'s default `Python-urllib/*` header (`curl`, `requests`, `httpx`, and Node.js are unaffected). Always include a custom `User-Agent` with `urllib`:

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://api.beatapi.io/v1/web/search",
    data=json.dumps({"query": "OpenAPI 3.1 webhooks", "max_results": 3}).encode(),
    headers={
        "Authorization": f"Bearer {os.environ['BEATAPI_API_KEY']}",
        "Content-Type": "application/json",
        "User-Agent": "my-agent/1.0",
    },
)
with urllib.request.urlopen(req, timeout=30) as resp:
    print(json.load(resp))
```

Explore all four tools on [BeatAPI Web Search API](https://beatapi.io/web-search-api).

## Related

* [Research vs Search + Read](/faq/web-research-vs-search-read) · [Map a documentation site into Markdown](/guides/web-map-and-read-docs)

[Back to Web Search questions](/faq/web).