---
title: "Run a task directly"
method: POST
path: "/tasks/run"
tags: ["Tasks"]
---

# Run a task directly

`POST /tasks/run`

## Request body

- object
  - `spider_id` string, required — MongoDB ObjectId represented as a hexadecimal string
  - `priority` integer
  - `param` object

## Response `200`

Task started successfully

- Success
  - `code` integer
  - `message` string
  - `data` object

## Changes

- **2025-03-02** `526e5bdf6dee` — 4 breaking, 6 warning, 5 info
  - request body became required
  - added the pattern `^[0-9a-fA-F]{24}$` to the request property `spider_id`
  - the `param` request property type/format changed from `string`/`` to `object`/``
  - the `data` response's property type/format changed from `array`/`` to `object`/`` for status `200`
  - …11 more

[Change history](https://skmtc.dev/crawlab-team/apis/crawlab-api/changes/tasks/run/post.md)

---

[API](https://skmtc.dev/crawlab-team/apis/crawlab-api.md) · [All operations](https://skmtc.dev/crawlab-team/apis/crawlab-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crawlab-team/crawlab-api/revisions/526e5bdf6dee/schema)
