# Web

Semantic search across the open web, and full-page extraction to clean markdown — with server-side SSR/SPA rendering, PDF support, paywall detection and residential-proxy escalation when a site fights back.

## Tools & pricing

- `glim_web_search` / `POST /api/v1/web/search` — $0.01 per call. Semantic search (Exa): `query`, optional `include_domains` / `exclude_domains` / `published_within_days`.
- `glim_web_fetch` / `POST /api/v1/web/fetch` — $0.002 per call. `url` plus optional `format` (markdown | html | json) and `selector` to scope the result.

## Example

**request**

```
curl -X POST https://glim.sh/api/v1/web/fetch \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://modelcontextprotocol.io/docs/getting-started/intro"}'
```

**response (real call, content trimmed)**

```
{
  "status": 200,
  "content": [
    "Get started\n\n# What is the Model Context Protocol (MCP)?\n\nMCP (Model Context Protocol) is an open-source standard for connecting AI applications to external systems. …"
  ],
  "url": "https://modelcontextprotocol.io/docs/getting-started/intro",
  "outcome": "success",
  "title": "What is the Model Context Protocol (MCP)? - Model Context Protocol",
  "total_chars": 2493
}
```

## Good to know

- Read `outcome` to classify a fetch: `success`, `teaser`, `paywall`, `bot_challenge`, `login_wall`, `not_found` and more — your agent can branch on it.
- Fetch auto-detects SSR data (`__NEXT_DATA__` etc.) and SPA shells, escalating to browser rendering only when needed — you always pay the same flat price.
- Very large pages are truncated inline with a `download_full_url` to the complete extraction.

## Prompts to try

- "Search the web for recent embedding-model benchmarks, fetch the two best write-ups, and extract the numbers."
- "Fetch this article and give me the key claims with quotes."

---

## All docs pages


**Get started**

- [Introduction](https://glim.sh/docs.md?page=introduction)
- [MCP quickstart](https://glim.sh/docs.md?page=quickstart)
- [REST API quickstart](https://glim.sh/docs.md?page=quickstart-rest)
- [JavaScript quickstart](https://glim.sh/docs.md?page=quickstart-js)
- [Python quickstart](https://glim.sh/docs.md?page=quickstart-python)
- [Payments & auth](https://glim.sh/docs.md?page=payments)

**Tools**

- [Twitter / X](https://glim.sh/docs.md?page=twitter)
- [Reddit](https://glim.sh/docs.md?page=reddit)
- [Web](https://glim.sh/docs.md?page=web)
- [GitHub](https://glim.sh/docs.md?page=github)
- [Amazon](https://glim.sh/docs.md?page=amazon)
- [YouTube](https://glim.sh/docs.md?page=youtube)
- [Telegram](https://glim.sh/docs.md?page=telegram)

**Reference**

- [Changelog](https://glim.sh/docs.md?page=changelog)
- [API reference](https://glim.sh/docs-openapi)
- [OpenAPI spec](https://glim.sh/openapi.json)
