💡 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

ParameterTypeDefaultDescription
urlstringrequiredThe URL to fetch
formatstringmarkdownOutput format: markdown, text, or html
renderbooleanfalseUse browser rendering for JS-heavy pages
stealthbooleanfalseBypass bot detection (Cloudflare, etc.)
readablebooleanfalseApply reader mode — strips nav, ads, sidebars
budgetnumberMax token budget; trims content to fit

Anti-Bot Parameters

ParameterTypeDefaultDescription
stealthbooleanfalseEnable stealth mode: human-like headers + timing + auto-escalation through PeelTLS TLS fingerprinting, then browser if needed
proxystringProxy 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

ParameterTypeDescription
questionstringAsk a question about the page — returns an AI-generated answer field in the response
summarybooleanReturn 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
}
FieldTypeDescription
contentstringExtracted page content in requested format
titlestringPage title
urlstringFinal URL after redirects
tokensnumberApproximate token count of content
elapsednumberRequest time in milliseconds
tokenSavingsPercentnumber% reduction vs raw HTML token count
methodstringFetch 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.
answerstringAI 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