WebExtrator Web Rendering API Integration Guide
POST https://api.acedata.cloud/webextrator/render
Provide a URL to the WebExtrator web rendering API, and it returns fully rendered HTML (including JS-injected content), plain text, the page title, and the final URL.
If you need structured extraction results (article body, product prices, recipe ingredients, etc.), please use
/webextrator/extract.
¶ Application Process
To use the WebExtrator service page, first go to the Ace Data Cloud Console to obtain your API Token for later use.

If you have not logged in or registered, you will be automatically redirected to the login page to register and log in, and will automatically return to the current page when finished.
A general application's API Key can be used for services enabled for the account; a dedicated application's Key is used within that application's service scope. Please check the Key's permissions, validity period, and limits, and confirm that the application balance is sufficient to pay for this request. Available trial credits are subject to what is shown in your account; if the balance is insufficient, click the "Recharge" button.
📘 Full documentation: WebExtrator Service Page →
¶ Authentication
All WebExtrator endpoints use standard Bearer Token authentication:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
¶ Request Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url |
string | ✅ | — | URL of the page to render; must be http(s)://. |
user_agent |
string | ❌ | Automatically selected | Custom User-Agent. |
timeout |
integer | ❌ | 30 |
Timeout for a single navigation (positive integer seconds). |
wait_until |
enum | ❌ | load |
Load completion event: load / domcontentloaded / networkidle / commit. |
delay |
integer | ❌ | 0 |
Additional wait time in seconds after wait_until is triggered (non-negative integer) (for secondary SPA rendering). |
wait_for_selector |
string | ❌ | — | Wait for this CSS selector to appear; more reliable than networkidle. |
block_resources |
string[] | ❌ | ["image","font","media"] |
Resource types to block; options: image / font / media / stylesheet / xhr / fetch. |
headers |
object | ❌ | — | Additional HTTP request headers (for example, {"Accept-Language": "en-US"}). |
cookies |
array | ❌ | — | Cookies injected before navigation; see the structure below. |
callback_url |
string | ❌ | — | Callback URL in asynchronous mode; the platform will POST the complete result to this URL when the task is completed. |
bypass_cache |
boolean | ❌ | false |
Skip reading from the cache (but still write this result back to the cache). |
cache_ttl_seconds |
integer | ❌ | 3600 |
Custom cache TTL for this write; pass 0 to avoid caching this response. |
async |
boolean | ❌ | false |
Set to true to immediately return a task_id; retrieve the result through callback_url or the Tasks API. |
Request parameters consistently use snake_case.
¶ Cookie Structure
{
"name": "string",
"value": "string",
"domain": "string",
"path": "/",
"expires": 1735689600,
"httpOnly": false,
"secure": true,
"sameSite": "Lax"
}
¶ Synchronous Response
{
"success": true,
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "550e8400-e29b-41d4-a716-446655440001",
"started_at": 1777717800.123,
"finished_at": 1777717801.234,
"elapsed": 1.111,
"data": {
"kind": "render",
"url": "https://example.com",
"finalUrl": "https://example.com/",
"title": "Example Domain",
"status": 200,
"html": "<!DOCTYPE html><html>...</html>",
"text": "Example Domain\nThis domain is for use in illustrative examples...",
"userAgent": "Mozilla/5.0 ...",
"elapsedMs": 1108
}
}
| Field | Type | Description |
|---|---|---|
data.kind |
string | Always "render". |
data.url |
string | The URL you submitted. |
data.finalUrl |
string | The final URL after following redirects. |
data.title |
string | The rendered document.title. |
data.status |
number | null | The HTTP status code of the main navigation. |
data.html |
string | The complete rendered HTML. |
data.text |
string | A snapshot of document.body.innerText (use Extract if you need a cleaner body). |
data.userAgent |
string | The UA actually used. |
data.elapsedMs |
number | Browser rendering time only. |
data.cached |
boolean? | true when the cache is hit. |
data.cacheStoredAt |
number? | The Unix timestamp in milliseconds when the cache entry was first written. |
¶ Asynchronous Response
When async=true (or callback_url is provided), the response is returned immediately (HTTP 200):
{
"success": true,
"task_id": "550e8400-...",
"trace_id": "6ba7b810-...",
"started_at": 1777717800.123
}
The result will be pushed via POST to callback_url (if configured), or queried directly through
/webextrator/tasks.
¶ Callback Structure
The platform POSTs an envelope identical to that in synchronous mode to callback_url,
with Content-Type: application/json. Any 2xx response is considered an acknowledgment; 5xx responses will be
retried with exponential backoff for approximately 5 minutes.
¶ Error Response
| HTTP | error.code |
Meaning |
|---|---|---|
| 400 | bad_request |
Invalid request parameters (e.g., missing url or incorrect type). |
| 401 | unauthorized |
Missing or invalid Authorization: Bearer …. |
| 402 | (x402) | Insufficient platform balance; returns an x402 payment requirement envelope. |
| 408 | timeout |
Navigation exceeded timeout. |
| 429 | queue_busy |
The synchronous queue is congested; retry or switch to async=true. |
| 500 | internal_error |
Service error; retry later. |
Error structure:
{
"success": false,
"task_id": "...",
"trace_id": "...",
"started_at": 1777717800.123,
"finished_at": 1777717800.135,
"elapsed": 0.012,
"error": { "code": "bad_request", "message": "url: Invalid url" }
}
¶ Examples
¶ cURL
curl -X POST https://api.acedata.cloud/webextrator/render \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"wait_until": "networkidle",
"block_resources": ["image", "media", "font"]
}'
¶ Python (requests)
import os, requests
API_KEY = os.environ["ACEDATA_API_KEY"]
resp = requests.post(
"https://api.acedata.cloud/webextrator/render",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={
"url": "https://example.com",
"wait_until": "networkidle",
"block_resources": ["image", "media", "font"],
},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
print(data["title"], data["status"], len(data["html"]))
¶ Node.js (fetch)
const apiKey = process.env.ACEDATA_API_KEY;
const res = await fetch('https://api.acedata.cloud/webextrator/render', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com',
wait_until: 'networkidle',
block_resources: ['image', 'media', 'font'],
}),
});
const { data } = await res.json();
console.log(data.title, data.status, data.html.length);
¶ Async + Callback
curl -X POST https://api.acedata.cloud/webextrator/render \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"async": true,
"callback_url": "https://your-app.example.com/hooks/webextrator"
}'
Immediately returns { "success": true, "task_id": "...", "trace_id": "...", "started_at": 1777717800.123 };
when the task completes, the platform will POST the complete result to your callback_url.
¶ Force Cache Bypass
curl -X POST https://api.acedata.cloud/webextrator/render \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"bypass_cache": true
}'
¶ Tips and Pitfalls
- Choosing the right
wait_untilis important.networkidleis the most reliable but the slowest;domcontentloadedis fast but may miss asynchronously injected content;loadis suitable for traditional static pages. - The cache key ignores
async. Synchronous and asynchronous requests for the same URL hit the same cache entry, so switching between them does not invalidate it. - The cache key ignores
bypass_cacheandcache_ttl_seconds. These two are operational switches and do not affect the response content. cookiesandheaderspartition the cache. Customizing these two will cause a cache miss the first time the same combination is used.- Heavy SPAs often exceed the default 30 seconds. We recommend
timeout: 60,wait_until: "domcontentloaded", anddelay: 4, combined withwait_for_selectorto wait for the elements you actually care about. block_resourcesis the fastest way to reduce latency. Images / fonts / media are blocked by default; if your extraction does not depend on CSS layout, addingstylesheetcan make it even faster.
