Context for AI
Read a page
Give your model live web context. Hand the API a URL and get back clean, LLM-ready markdown — hardened sites that block bots are handled automatically, and you only pay for pages we successfully return.
Scrape a URL
Fetches a single page, strips navigation and boilerplate, and returns the main content as markdown, HTML, or plain text.
/v1/scrapeParameters
urlstringrequiredThe absolute http(s) URL to fetch. Private, loopback, and internal addresses are rejected.
formatstringOutput format: markdown (default), html, or text.
stealthboolean | "auto"Controls the anti-bot rail. false (default) uses the fast standard rail only. "auto" starts standard and automatically escalates to the stealth rail if the site blocks the request or returns no content. true goes straight to stealth.
timeout_msintegerStandard-rail timeout in milliseconds (1000–60000, default 30000). Stealth unlocking is allowed longer since it renders the full page.
Request
curl https://api.apexapi.dev/v1/scrape \
-H "Authorization: Bearer ak-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/pricing",
"format": "markdown",
"stealth": "auto"
}'Response
{
"url": "https://example.com/pricing",
"final_url": "https://example.com/pricing",
"status": 200,
"format": "markdown",
"content": "# Pricing\n\nSimple pricing for every team...",
"metadata": {
"title": "Pricing — Example",
"description": "Simple pricing for every team.",
"language": "en"
},
"tier": "standard",
"cost": 0.002
}The tier field tells you which rail served the page and therefore what you were charged. The response also carries X-ApexApi-Cost and X-ApexApi-Credits-Remaining headers.
Pricing
Billed per successfully returned page. Failed fetches are free — if a page is blocked, times out, or has no extractable content, you are not charged.
| Tier | When | Price / page |
|---|---|---|
| Standard | Plain fetch — most sites | $0.002 |
| Stealth | Anti-bot / JS render — hardened sites | $0.008 |
With stealth: "auto" you pay the standard price whenever the fast rail succeeds, and only pay the stealth price on pages that actually required unlocking.
Notes & limits
- • Requests to private, loopback, or internal network addresses are rejected with a
400. - • The API respects each site's
robots.txtby default; disallowed URLs return a403. - • Use of this endpoint is subject to our Acceptable Use Policy. You are responsible for the URLs you submit and how you use the results.
- • Need a whole site instead of one page? Use
/v1/crawlto crawl a domain into markdown asynchronously.