Skip to content

Retry a Task

POST https://maxaeo.ai/geoapi/geodata/developer/task/retry

Retries a task whose crawl failed. The task keeps its task_id and goes back to the queue to run again. It’s charged only on success, at the price set when it was submitted, once.

Parameter Type Required Description
task_id string Yes The task ID returned by Submit a task or List tasks, up to 64 characters

The body has task_id only; any extra field returns 1001. Which tasks you can act on follows the same rule as Cancel a task.

A task can be retried only if all three of these hold:

  • status is failed;
  • error_code is crawl_failed (the platform crawl failed);
  • it was submitted no more than 7 days ago.

Other failures (such as a rejected submission or an invalid API key) return 1032 — submit a new task instead. In rare cases a task that meets all three conditions also returns 1032 because it can no longer be found on the platform side; submit a new task then too. A canceled task can’t be retried either.

Calling retry on a task that is unfinished, succeeded, or canceled returns it unchanged, without an error. So if you lose the response to a retry call, calling it again is safe.

Terminal window
curl -X POST "https://maxaeo.ai/geoapi/geodata/developer/task/retry" \
-H "Authorization: Bearer $MAXAEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"task_id": "task_9b2e4f60-1c3d-4e8a-b7f5-2d6c8a0e4b19"}'

data.ent is the task object, the same structure as Retrieve a task.

When the retry succeeds, status is usually pending, running, or dispatching; keep polling it with Retrieve a task. If an earlier retry has already finished (for example, its response was lost), you may get succeeded right away. Always go by the status returned.

  • task_id, created_at, monitor_date, and the price set at submission don’t change; the old answer and error are cleared.
  • When status is dispatching, error_code is retry_uncertain: the retry is being confirmed. This usually takes under a second and isn’t a failure — keep polling. error_message and similar fields may still hold the previous failure at that point, so go by status.

Example response:

{
"ret": 1,
"data": {
"ent": {
"thinking": false,
"task_id": "task_9b2e4f60-1c3d-4e8a-b7f5-2d6c8a0e4b19",
"platform": "deepseek",
"query": "跑步新手应该怎么选第一双跑鞋?",
"status": "pending",
"answer": "",
"result_json": "",
"share_link": "",
"error_code": "",
"error_message": "",
"started_at": 0,
"finished_at": 0,
"created_at": 1793006882,
"updated_at": 1793093300,
"monitor_date": "2026-10-26",
"priority": 2,
"country": "",
"credits": 3
}
}
}

A retry reserves credits again, so — like a submission — it can be rejected with 1022 (billing not enabled), 1023 (insufficient credits), 1024 (too many tasks waiting or running), 1025 (too many submissions), or 1029 (platform unsupported or under maintenance).

Credits are charged only on success, at the price set when the task was submitted, once; a retry that fails again isn’t charged. See Billing & Credits.

ret Cause
1001 task_id is missing or longer than 64 characters, or the body contains undefined fields
1030 API key missing or invalid
1031 The task doesn’t exist or doesn’t belong to the current user
1032 The task can’t be retried; submit a new task
1022 / 1023 / 1024 / 1025 / 1029 Rejected while reserving credits again — same meaning as in Submit a task
-1 Service temporarily unavailable — the task is left unchanged, so you can call again