POST https://api.acedata.cloud/webextrator/tasks
The WebExtrator Task Query API is used to query the results of historical render / extract tasks. Common usages include:
- Callback to check the complete envelope after an asynchronous task is completed (besides
callback_urlpush or active polling). - Audit what has been submitted — task records store both the original
requestand the finalresponse. - Batch refill — pull multiple records at once by
idortrace_id.
Authentication
Request Parameters
The request body is a discriminative union based onaction, with two types of actions:
action: "retrieve" — Single Query
Either
id or trace_id must be provided.
action: "retrieve_batch" — Batch Query
Either
ids or trace_ids must be provided.
Single Response
{ "task": null } (HTTP 200, not 404).
The timing fields of the task object are described as follows.
created_at, task creation time, Unix timestamp (seconds, float).started_at, task execution start time, Unix timestamp (seconds, float). It isnullwhen the task has not started.finished_at, task completion time, Unix timestamp (seconds, float). It isnullwhen the task is not completed.elapsed, task execution duration, in seconds (float, rounded to 3 decimal places). It isnullwhen the task is not completed.
Batch Response
tasks.
Examples
Query Single by task_id
Query Single by trace_id
Batch Query
Python (requests) — Polling Until Completion
Node.js (fetch) — Pull Complete Envelope After Receiving Callback
Error Responses
Tips and Pitfalls
- If you can customize
trace_id, then do so. Upload it in the original render/extract request?trace_id=…(QueryString), aligning it with your own business ID (workflow run id, etc.), and then you can query tasks using the business ID. If not provided, the server will automatically generate a UUID. - Retention period is 7 days. Tasks older than this will return
task: null— if long-term archiving is needed, please store it in your own database. - Task queries are free. You can query as many times as you want; the fees for the original render/extract calls have already been paid.
- Prefer using asynchronous + callbacks instead of polling. If business allows, pass
callback_urlin the original request, allowing the platform to push the envelope to you, which is more efficient than polling every 2 seconds.

