# Shotlane

> Shotlane turns any URL or HTML into a screenshot (PNG, JPEG, WebP), a PDF, or clean Markdown, using real Chromium (JavaScript runs, cookie banners can be hidden). It works as an HTTP API, as a remote MCP server for agents, and without a key via URL prefixes. Use it alongside a text fetch tool: fetch for reading, Shotlane screenshots for visual questions (layout, mobile view, charts, images, whether a page rendered). Pricing: prepaid credits that never expire, 1 credit per successful render ($9 for 2,000, $29 for 10,000, $79 for 40,000); new accounts get 100 free.

## Quickstart for agents
- Read a page as Markdown, no key: `GET https://shotlane.dev/md/<url>` (e.g. https://shotlane.dev/md/https://example.com). 20 requests per IP per day.
- Screenshot a page, no key: `GET https://shotlane.dev/shot/<url>` returns a 1280x800 PNG with cookie banners hidden. Same daily limit.
- Get an API key without a browser: `POST https://shotlane.dev/v1/signup` with JSON {"email": "..."} returns {"api_key": "sl_...", "credits": 100}. Ask the user for their email; the key is also emailed to them.
- With a key, send `Authorization: Bearer <key>`: the /md/ and /shot/ URLs then have no daily limit, and all /v1 endpoints work.
- MCP server (Streamable HTTP, OAuth 2.1 or API key): https://shotlane.dev/mcp. Tools: screenshot, read_page, html_to_pdf, credits. Claude Code: `claude mcp add --transport http shotlane https://shotlane.dev/mcp`

## Docs
- [Full reference for LLMs](https://shotlane.dev/llms-full.txt): every endpoint and parameter in one Markdown file
- [Pairing fetch with screenshots](https://shotlane.dev/guides/give-your-agent-eyes): when an agent should use a screenshot
- [Agent skill](https://shotlane.dev/SKILL.md): when to screenshot vs read, tips, errors (zip: https://shotlane.dev/static/skills/shotlane.zip)
- [OpenAPI spec](https://shotlane.dev/openapi.json)
- [MCP and client setup](https://shotlane.dev/integrations): ChatGPT, Claude, Cursor, VS Code, Gemini CLI
- [API reference (HTML)](https://shotlane.dev/docs)

## Optional
- [Pricing](https://shotlane.dev/pricing)
- [Guides](https://shotlane.dev/guides)
- [Status](https://shotlane.dev/status)

## API reference

Base URL: https://shotlane.dev
Auth: `Authorization: Bearer <key>`, or header `X-API-Key: <key>`, or query `?access_key=<key>`.
Every endpoint accepts GET with query parameters, or POST with a JSON or form body.
Successful responses are the raw file (image/png, application/pdf, text/markdown...) with headers
`X-Credits-Remaining` and `X-Render-Time-Ms`. Errors are JSON: {"error": "..."}.

### GET|POST /v1/screenshot
- `url` or `html` (one is required; html up to 2 MB)
- `format`: png (default), jpeg, webp, pdf
- `width` (240-3840, default 1280), `height` (default 800), `scale` (1-3), `device`: desktop, desktop_hd, laptop, ipad, iphone, iphone_se, pixel, galaxy
- `full_page` (true/false): scrolls first so lazy-loaded images appear
- `selector`: capture one element (CSS selector)
- `dark_mode`, `hide_cookie_banners`, `block_ads` (true/false)
- `delay` (ms), `wait_until` (load, domcontentloaded, networkidle; `load` also waits up to 2 s for network idle), `wait_for_selector`
- `quality` (jpeg/webp, 1-100), `omit_background` (png), `user_agent`
- `cache_ttl` (seconds): repeat requests within the TTL are free; `download=true` sets Content-Disposition

### GET|POST /v1/pdf
Same parameters as /v1/screenshot plus `paper` (A3, A4, A5, Letter, Legal, Tabloid), `landscape`, `print_background`.

### GET|POST /v1/markdown and /v1/extract
Renders the page with JavaScript, then returns the main content. /v1/markdown returns text/markdown;
/v1/extract returns JSON {url, title, description, author, published, markdown, word_count}.
- `url` or `html`; `main_content` (default true; false converts the whole page), `selector`, `include_links` (default true), `include_images` (default false)

### Page options (all endpoints)
`css`, `js` (run before capture), `hide_selectors` (comma-separated), `click` (selector to click first),
`headers` (JSON object, sent only to the target host), `cookies` ("a=1; b=2").

### GET /v1/account
Returns {"email": "...", "credits": N}.

### POST /v1/signup
JSON {"email": "..."} → 201 {"api_key", "credits"}. 409 if the email already has an account (log in at https://shotlane.dev/login). Max 3 signups per network per day.

### Keyless URL prefixes
`GET https://shotlane.dev/md/<url>` → Markdown; `GET https://shotlane.dev/shot/<url>` → PNG. The target's own query string is kept.
Without a key: 20 per IP per day, results cached for 10 minutes (cache hits don't count). With a Bearer key: 1 credit each, no daily limit.

### Signed URLs for <img> tags
Sort the parameters, form-encode them, HMAC-SHA256 with your secret key, and append `key=<public key>&signature=<hex>`. The public key is on your dashboard. Signed requests are cached for 24 h by default.

### Errors
400 invalid parameters · 401 missing/invalid key · 402 out of credits (top up at https://shotlane.dev/pricing) · 413 html too large · 422 page could not be loaded or selector not found · 429 concurrency or daily limit · failed renders are not charged.
Only public URLs work: private, loopback and cloud-metadata addresses are refused, including via redirects.

## MCP server
URL: https://shotlane.dev/mcp (Streamable HTTP). Auth: OAuth 2.1 (discovery at /.well-known/oauth-protected-resource, PKCE, dynamic client registration and client ID metadata documents), or header `X-API-Key: <key>`.
Tools:
- `screenshot(url, full_page?, width?, height?, dark_mode?, selector?, delay?)`: image plus a 24 h link; renders an inline viewer in clients that support MCP Apps
- `read_page(url, main_content?, selector?, include_links?, wait_for_selector?)`: page as Markdown
- `html_to_pdf(html? | url?, paper?, landscape?)`: PDF, returns a 24 h download link
- `credits()`: remaining credits
Setup:
- Claude Code: `claude mcp add --transport http shotlane https://shotlane.dev/mcp` (add `--header "X-API-Key: sl_..."` to skip OAuth)
- Cursor (`~/.cursor/mcp.json`): {"mcpServers": {"shotlane": {"url": "https://shotlane.dev/mcp"}}}
- VS Code (`.vscode/mcp.json`): {"servers": {"shotlane": {"type": "http", "url": "https://shotlane.dev/mcp"}}}
- ChatGPT and Claude.ai: add a custom connector with URL https://shotlane.dev/mcp and sign in.
- Custom GPTs: Actions from https://shotlane.dev/gpt/openapi.json with OAuth.
