WebExtrator Webpage Rendering API Integration Guide
POST https://api.acedata.cloud/webextrator/render
¶ Authentication
Add Authorization: Bearer <your API Key> in the request header.
¶ Request Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url |
string | ✅ | - | The URL of the page to render |
user_agent |
string | ❌ | System default | Custom User-Agent |
timeout |
number | ❌ | 30000 | Timeout for a single render (milliseconds), max 120000 |
wait_until |
string | ❌ | load |
Load completion event: load/domcontentloaded/networkidle |
delay |
number | ❌ | 0 | Additional wait time after load completion (milliseconds), max 30000 |
wait_for_selector |
string | ❌ | - | Wait for the specified CSS selector to appear |
block_resources |
string[] | ❌ | - | Block resource types: image/media/font/stylesheet, etc. |
headers |
object | ❌ | - | Additional HTTP headers |
cookies |
array | ❌ | - | List of cookies, elements like {name, value, domain, path} |
callback_url |
string | ❌ | - | Callback URL for async mode; if provided, returns task ID immediately, results via POST callback |
¶ Synchronous Response (without callback_url)
{
"success": true,
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "550e8400-e29b-41d4-a716-446655440001",
"started_at": "2026-05-02T10:30:00.123Z",
"finished_at": "2026-05-02T10:30:05.456Z",
"elapsed": 5.333,
"data": {
"kind": "render",
"url": "https://example.com",
"title": "Example Domain",
"html": "<!doctype html>...",
"text": "Example Domain ...",
"markdown": "# Example Domain\n...",
"screenshot": "data:image/png;base64,iVBORw0K...",
"links": ["https://www.iana.org/domains/example"]
}
}
¶ Asynchronous Mode (with callback_url)
Initial response:
{
"success": true,
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "550e8400-e29b-41d4-a716-446655440001",
"started_at": "2026-05-02T10:30:00.123Z"
}
The response header will include x-usage-exempt: true, indicating this synchronous handshake is free of charge. Once the task is completed, the platform will send a POST request to the callback_url. The request body contains the data field from the synchronous response plus the same task_id / trace_id / started_at / finished_at / elapsed fields.
¶ Error Response
{
"success": false,
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"trace_id": "550e8400-e29b-41d4-a716-446655440001",
"started_at": "2026-05-02T10:30:00.123Z",
"error": {
"code": "timeout",
"message": "page load timed out after 30000ms"
}
}
Error codes: bad_request / forbidden / too_many_requests / not_found / api_error / timeout / unknown / busy.
¶ Example
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"]
}'
