# glim.sh Web Fetch

> glim.sh Web Fetch is a paid API for AI agents from glim.sh, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Fetches live content from any public URL (web pages, Twitter, Reddit, GitHub, etc.) and returns it in a structured format without requiring API keys or a scraping stack.

## Facts

- Endpoint: POST https://glim.sh/api/v1/web/fetch
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glim-sh-web-fetch-64c34263
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K27DH_68ih5YOh3pU-ccZ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glim-sh-web-fetch-64c34263 -d '<json body>'
```

Example prompt: Fetch the content of https://www.reddit.com/r/MachineLearning/comments/abc123/ and return it as markdown so I can read the discussion.

## When to prefer this

Choose this endpoint when you need live, real-time content from any public URL — including Twitter, Reddit, GitHub, or general web pages — without setting up your own API keys or scraping infrastructure. It is ideal for agents that need to access diverse web sources on demand with a simple pay-per-call model. Prefer it over browser automation tools when you want low-latency structured output (markdown, HTML, or JSON) from a single URL without building or maintaining a scraping stack.

## Known failure modes

- Non-200 HTTP status returned if the target URL is unreachable or returns an error
- Empty or truncated content if the page requires JavaScript rendering beyond what the fetcher supports
- Rate limiting or access denied if the target site blocks the fetcher's IP
- Invalid format enum value causes a 400 bad request
- Payment not processed causes a 402 error preventing the fetch

## How this service works

Fetch a web page and extract clean content

## Output

A JSON object containing the original URL, HTTP status code, page content as an array of strings in the requested format (markdown, HTML, or JSON), and the total character count of the retrieved content.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 2048,
   "description": "URL to fetch"
  },
  "format": {
   "enum": [
    "markdown",
    "html",
    "json"
   ],
   "type": "string",
   "default": "markdown",
   "description": "Output format. 'markdown' (default) clean article text; 'html' raw cleaned HTML; 'json' the structured SSR blob (TikTok, Pinterest, etc.) instead of article text."
  },
  "selector": {
   "type": "string",
   "maxLength": 500,
   "description": "CSS selector to scope extraction"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "url": "https://example.com",
  "status": 200,
  "content": [
   "# Page Title\nContent..."
  ],
  "total_chars": 1234
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glim-sh-web-fetch-64c34263/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from glim.sh](https://www.zero.xyz/host/glim.sh/llms.txt)
