# Web Page to Markdown (`web.markdown`)

Fetch a public page and return its main content as clean Markdown for LLMs: headings, lists, links, tables and code, without navigation or scripts.

- **Route:** `POST /v1/run/web.markdown`
- **Price:** $0.001 per request ($1.00 per 1,000) · `cost_usd` on every response
- **Source:** GetAllAPIs fetcher (`web`) · failover: no
- **Measured latency:** p50 180 ms · p95 295 ms · p99 295 ms (3 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `url` | string | yes |  | Public http(s) URL |
| `main_only` | boolean | no | true | Keep only <main>/<article> and drop nav, header, footer and forms |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `title` | Page title. |
| `markdown` | Main content as Markdown. |
| `words` | Word count. |
| `final_url` | URL after redirects. |
| `status` | HTTP status. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/web.markdown \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('web.markdown', {'url': 'https://example.com'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run web.markdown '{"url":"https://example.com"}'
```

Quote first (free, validates input): `POST /v1/quote/web.markdown` with the same body.
