Almost no text
Extract returned only a title, or a few hundred characters at most.
Comparison
Use Extract when a page's text is in the HTML the server sends, and use headless Render only when the content appears after JavaScript runs; both cost $0.005 per call, so the usual pattern is Extract first and one Render fallback, which costs $0.01 for a JavaScript page.
| Web Extract | Web Render (headless) | |
|---|---|---|
| Runs JavaScript | No: converts the HTML it receives | Yes: headless Chromium runs the page first |
| Use it for | Docs, blogs, news, most marketing pages | SPAs, dashboards, client-rendered lists, pages that need a screenshot |
| Returns | Final URL, title, markdown or text, up to 100 links, meta | Final URL, status, title, markdown, text, and on request HTML, links and a screenshot |
| Deadline | 4 s for the target fetch | 4.2 s render deadline; partial content can be returned |
| Price | $0.005 per call | $0.005 per call |
Extract returned only a title, or a few hundred characters at most.
The text says "enable JavaScript" or "requires JavaScript".
The page is a single-page app whose body is an empty <div id="root">, or content appears only after the page loads data in the browser.
Start with Extract, and call Render once only when the result is thin. Don't retry Extract on the same URL. Render honors robots.txt (token AgentSearchRender); a refusal is not charged. It never logs in, clicks or submits forms, and reports bot walls instead of bypassing them.
def needs_render(extract: dict, min_chars: int = 500) -> bool:
"""After an Extract call, decide whether the page needs Render.
`extract` is the Extract response body (the `data` object from the portal).
"""
if extract.get("error"):
return False # site failed (404, timeout, PDF...): try another URL
text = (extract.get("markdown") or extract.get("text") or "").strip()
if len(text) < min_chars: # only a title or a few hundred characters
return True
lowered = text.lower()
return "enable javascript" in lowered or "requires javascript" in lowered
# Examples
print(needs_render({"error": None, "markdown": "# My App\n\nYou need to enable JavaScript to run this app."})) # True
print(needs_render({"error": None, "markdown": "# Docs\n\n" + "Real content. " * 100})) # False// Extract: POST https://agent.pocket.network/v1/agentsearch-web-extract-v1/v1/extract
{"url": "https://example.com/", "formats": ["markdown"], "max_chars": 20000}
// Render: POST https://agent.pocket.network/v1/agentsearch-web-render-v1/v1/render
{"url": "https://example.com/", "formats": ["markdown"], "max_chars": 20000}From an MCP client, the AgentSearch MCP server exposes both as agentsearch_extract and agentsearch_render (wallet key required). Full Python fallback: read JavaScript pages from an AI agent.
Web Extract API · Web Render API · Web Search API to find URLs first · pricing.
Extract converts the HTML a server sends into markdown without running scripts. Render loads the page in headless Chromium, lets its JavaScript run, then returns markdown, text and optionally HTML and a screenshot.
When Extract returns almost no text, says to enable JavaScript, or the page is an empty single-page-app shell. Static pages don't need it.
$0.005 for a page Extract can read, and $0.01 (two calls) when Render is needed. A robots.txt refusal from Render is not charged.
No. It does not sign in, it honors robots.txt, and it reports bot walls as TARGET_BOT_WALL instead of bypassing them.
Web Search API · Web Extract API · Web Render API · Pricing · MCP server · Blog