# Company data and web search for AI agents

Give your agent company lookups and web search as tools, over MCP or plain HTTP. JSON in and out, a fixed price per call, and no subscription.

## The tools your agent gets

| Tool | What it does |
|---|---|
| `company_lookup` | The company profile behind a LinkedIn company URL, slug or numeric id |
| `domain_lookup` | The company behind a website |
| `web_search` | Web results as JSON: a title, URL and snippet for every hit |
| `cache_check` | How old our copy of a company is, and what a lookup would cost now. Free |
| `get_pricing` | The current price of every call |

## Connect over MCP

Connect your agent to our MCP server with your API key. Apps that only take a server address, like
Claude's connectors, can carry the key in the address; keep that address private, because it holds your
key. Every call your agent makes shows up in your ledger like any other.

In Claude (web, desktop and mobile): **Settings > Connectors > Add custom connector**, with this URL. Create a key just for the connector:

```text title="Claude: custom connector URL"
https://api.happyfetch.net/mcp?apiKey=YOUR_API_KEY
```

```bash title="Claude Code"
claude mcp add --transport http happyfetch https://api.happyfetch.net/mcp \
  --header "Authorization: Bearer $HAPPYFETCH_API_KEY"
```

```json title="Cursor: .cursor/mcp.json"
{
  "mcpServers": {
    "happyfetch": {
      "url": "https://api.happyfetch.net/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Any other client that speaks MCP over Streamable HTTP connects to `https://api.happyfetch.net/mcp` with the same `Authorization` header, or with `?apiKey=` in the URL when it takes only a URL. The [MCP docs](/docs/mcp) cover every client and list every tool.

## Or define the tools yourself

Any framework with tool calling works. This is the domain lookup as a tool definition, in the format of
Anthropic's Messages API. OpenAI's function calling takes the same schema.

```json
{
  "name": "domain_lookup",
  "description": "Look up the company behind a website. Returns its name, industry, size, headquarters and more as JSON.",
  "input_schema": {
    "type": "object",
    "properties": {
      "domain": { "type": "string", "description": "A website domain or any URL on it, such as stripe.com" }
    },
    "required": ["domain"]
  }
}
```

When the model calls the tool, send the input to the API and hand the JSON back to the model, errors
included:

```python
import os

import requests

API = "https://api.happyfetch.net"


def domain_lookup(domain: str) -> dict:
    res = requests.post(
        f"{API}/v1/domain",
        headers={"Authorization": f"Bearer {os.environ['HAPPYFETCH_API_KEY']}"},
        json={"domain": domain},
        timeout=120,
    )
    return res.json()  # errors are JSON too, with a code and whether retrying helps
```

## Why it suits agents

- **No missing fields.** Every field is always there, and empty when a value isn't known, so the model
  never trips over one that's missing.
- **Errors a model can act on.** Each error has a stable code and a plain message, and says whether
  trying again helps.
- **One key, one bill.** Company data and web search on the same key and the same ledger.
- **A spending cap built in.** Credits are prepaid, so an agent stuck in a loop can never spend more than
  your balance. When it runs low we email you, and you choose the level in the console.
- **Repeat questions cost less.** Agents ask about the same companies again and again. Lookups from our
  cache cost half.

## What it costs

### Company lookups by LinkedIn company URL

| Lookups a month | Smallest pack (Starter) | Biggest pack (Business) |
|---|---|---|
| 1,000 lookups by LinkedIn URL | $1.00 | $0.50 |
| 10,000 lookups by LinkedIn URL | $10.00 | $5.00 |
| 100,000 lookups by LinkedIn URL | $100.00 | $50.00 |

Every lookup fetched fresh, at 2 credits each. Lookups our cache answers cost half. A confirmed not-found costs 1 credit, and nothing from our cache. Starter: $10 for 20,000 credits. Business: $500 for 2,000,000 credits. Credits never expire.

### Company lookups by website domain

| Lookups a month | Smallest pack (Starter) | Biggest pack (Business) |
|---|---|---|
| 1,000 lookups by website domain | $2.00 | $1.00 |
| 10,000 lookups by website domain | $20.00 | $10.00 |
| 100,000 lookups by website domain | $200.00 | $100.00 |

Every lookup fetched fresh, at 4 credits each. Lookups our cache answers cost half. A confirmed not-found costs the same, and nothing from our cache. Starter: $10 for 20,000 credits. Business: $500 for 2,000,000 credits. Credits never expire.

### Web searches

| Searches a month | Smallest pack (Starter) | Biggest pack (Business) |
|---|---|---|
| 1,000 searches | $0.50 | $0.25 |
| 10,000 searches | $5.00 | $2.50 |
| 100,000 searches | $50.00 | $25.00 |

1 credit each, fresh or from our cache. Starter: $10 for 20,000 credits. Business: $500 for 2,000,000 credits. Credits never expire.

New accounts get 200 credits, enough to wire up a tool and watch your agent use it.
