Try this endpoint in the Playground →
Fetch API
Fetch any URL and get back clean, AI-ready content. Supports markdown, text, and HTML output, with optional browser rendering, stealth mode, AI Q&A, and extractive summaries.
GET /v1/fetch
Fetch a URL via query parameters.
GET https://api.webpeel.dev/v1/fetch?url=https://example.com
Authorization: Bearer wp_live_xxxx
Basic Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | required | The URL to fetch |
format | string | markdown | Output format: markdown, text, or html |
render | boolean | false | Use browser rendering for JS-heavy pages |
stealth | boolean | false | Bypass bot detection (Cloudflare, etc.) |
readable | boolean | false | Apply reader mode — strips nav, ads, sidebars |
budget | number | — | Max token budget; trims content to fit |
Anti-Bot Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
stealth | boolean | false | Enable stealth mode: human-like headers + timing + auto-escalation through PeelTLS TLS fingerprinting, then browser if needed |
proxy | string | — | Proxy URL to route through: http://user:pass@host:port or socks5://... |
Automatic escalation: When
stealth=true, WebPeel automatically tries progressively more powerful bypass techniques until one succeeds. The method field in the response tells you which one worked (e.g. peeltls = TLS fingerprint spoofing, browser = full headless browser).
AI Parameters
| Parameter | Type | Description |
|---|---|---|
question | string | Ask a question about the page — returns an AI-generated answer field in the response |
summary | boolean | Return a concise extractive summary of the page content |
POST /v1/fetch
Same parameters as GET, but passed as a JSON body. Useful for long URLs or complex configurations.
POST https://api.webpeel.dev/v1/fetch
Authorization: Bearer wp_live_xxxx
Content-Type: application/json
{
"url": "https://example.com",
"format": "markdown",
"question": "What are the main features?"
}
Response Format
{
"content": "# Example Domain\n\nThis domain is for use in...",
"title": "Example Domain",
"url": "https://example.com",
"tokens": 142,
"elapsed": 312,
"tokenSavingsPercent": 73,
"method": "simple",
"answer": "The main features include..." // only if question= was set
}
| Field | Type | Description |
|---|---|---|
content | string | Extracted page content in requested format |
title | string | Page title |
url | string | Final URL after redirects |
tokens | number | Approximate token count of content |
elapsed | number | Request time in milliseconds |
tokenSavingsPercent | number | % reduction vs raw HTML token count |
method | string | Fetch strategy used: simple | peeltls | stealth | browser | cloaked | cf-worker | google-cache. Reflects automatic escalation — e.g. peeltls means PeelTLS TLS fingerprint spoofing was used to bypass bot detection. |
answer | string | AI answer to your question (if provided) |
Code Examples
curl — Basic fetch
curl "https://api.webpeel.dev/v1/fetch?url=https://news.ycombinator.com&format=markdown" \
-H "Authorization: Bearer wp_live_xxxx"
curl — Ask a question
curl "https://api.webpeel.dev/v1/fetch?url=https://example.com&question=What+is+this+site+about%3F" \
-H "Authorization: Bearer wp_live_xxxx"
Node.js — With summary
import { WebPeel } from 'webpeel';
const wp = new WebPeel({ apiKey: 'wp_live_xxxx' });
const result = await wp.fetch('https://techcrunch.com/article/example', {
summary: true,
readable: true
});
console.log(result.content); // Clean article text
console.log(result.tokens); // Token count
console.log(result.tokenSavingsPercent); // e.g. 71
Python — Browser rendering + question
import requests
response = requests.post(
'https://api.webpeel.dev/v1/fetch',
headers={'Authorization': 'Bearer wp_live_xxxx'},
json={
'url': 'https://twitter.com/example',
'render': True,
'question': 'What was the last tweet about?'
}
)
data = response.json()
print(data['answer'])
See Also
- Full API Reference — all parameters and error codes
- Screenshot API — capture page visuals
- Extract API — structured data extraction with schemas