Skip to main content

Update task

PUT 

/v2/actor-tasks/:actorTaskId

Update settings of a task using values specified by an object passed as JSON in the POST payload.

If the object does not define a specific property, its value is not updated.

The publicConfig field carries the display configuration of the task's public landing page, and isPublic publishes or unpublishes the task itself. Both require write permission to the task's Actor.

To publish a task, its Actor must be public, publicConfig.inputSchemaFields and publicConfig.datasetView must be set, and the Actor must have fewer than 50 published tasks. If the task isn't ready to be published, the whole update fails and none of it is applied.

Publishing lists the task among the Actor's examples and makes its input public, so anyone can view and copy it. The landing page itself is shown only while publicConfig still validates against the Actor's current build, so a new build can stop the page from being offered while the task stays published and copyable.

The response is the full task object as returned by the Get task endpoint.

The request needs to specify the Content-Type: application/json HTTP header!

When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL.

Request

Path Parameters

    actorTaskId string required

    Task ID or a tilde-separated owner's username and task's name.


    Example: janedoe~my-task

Bodyrequired

  • name string
    Example: my-task
  • options object
      anyOf
    • build string | null nullable
      Example: latest
    • timeoutSecs integer | null nullable
      Example: 300
    • memoryMbytes integer | null nullable
      Example: 1024
    • maxItems integer | null nullable
      Example: 1000
    • maxTotalChargeUsd number | null nullable
      Example: 5
    • restartOnError boolean | null nullable
      Example: false
  • input object
      anyOf
    • object

      The input configuration for the Actor task. This is a user-defined JSON object that will be passed to the Actor when the task is run.


      Example: {"startUrls":[{"url":"https://example.com"}],"maxRequestsPerCrawl":100}
  • title string | null nullable
  • actorStandby object
      anyOf
    • isEnabled boolean | null nullable

      Whether standby mode is enabled for the Actor.

    • desiredRequestsPerActorRun integer | null nullable

      Target number of concurrent HTTP requests a single run is configured to handle.

    • maxRequestsPerActorRun integer | null nullable

      Maximum number of concurrent HTTP requests that can be routed to a single run.

    • idleTimeoutSecs integer | null nullable

      In seconds, how long a run can stay idle without incoming requests before it's terminated.

    • build string | null nullable

      Which build to run in standby mode. Either a build tag or a version number.

    • memoryMbytes integer | null nullable

      In MB, the amount of memory allocated to the run.

    • disableStandbyFieldsOverride boolean | null nullable

      If true, prevents the standby mode configuration from being overridden elsewhere.

    • shouldPassActorInput boolean | null nullable

      Whether to pass the Actor's input to the standby run. If false, the standby runs start with no input.

  • publicConfig object

    Public-facing configuration of a published task, used by the task's public landing page. The task's publication state is determined by publishedAt - a task is published when publishedAt is set and unpublished when it is null.

    • seoTitle string | null nullable

      Name of the Actor task to display by search engines such as Google. Defaults to the task title. At most 60 characters.

      Possible values: <= 60 characters


      Example: Scrape data from a website
    • seoDescription string | null nullable

      Description of the Actor task to display by search engines such as Google. Defaults to the task description. At most 160 characters.

      Possible values: <= 160 characters

    • inputSchemaFields string[] nullable

      Names of the task input fields displayed on the public task page.

    • datasetName string | null nullable

      Name of the dataset from the Actor's dataset schema whose results are displayed. When null, the Actor's default dataset is used. That is, the only dataset the Actor declares, or the one named default when it declares several.

    • datasetView string | null nullable

      Key of the dataset view from the Actor's dataset schema used to display results. Must be one of the views declared on the resolved dataset. You can't publish a task without it.

  • isPublic boolean

    Set to true to publish the task on its public landing page, or false to unpublish it. Sending the value the task already has does nothing.


    Example: true

Status 200

Response Headers
    {
    "data": {
    "id": "zdc3Pyhyz3m8vjDeM",
    "userId": "wRsJZtadYvn4mBZmm",
    "actId": "asADASadYvn4mBZmm",
    "name": "my-task",
    "username": "janedoe",
    "createdAt": "2018-10-26T07:23:14.855Z",
    "modifiedAt": "2018-10-26T13:30:49.578Z",
    "removedAt": "2024-07-29T15:51:28.071Z",
    "stats": {
    "totalRuns": 15
    },
    "options": {
    "build": "latest",
    "timeoutSecs": 300,
    "memoryMbytes": 1024,
    "maxItems": 1000,
    "maxTotalChargeUsd": 5,
    "restartOnError": false
    },
    "input": {
    "startUrls": [
    {
    "url": "https://example.com"
    }
    ],
    "maxRequestsPerCrawl": 100
    },
    "title": "string",
    "actorStandby": {
    "isEnabled": true,
    "desiredRequestsPerActorRun": 0,
    "maxRequestsPerActorRun": 0,
    "idleTimeoutSecs": 0,
    "build": "string",
    "memoryMbytes": 0,
    "disableStandbyFieldsOverride": true,
    "shouldPassActorInput": true
    },
    "standbyUrl": "string",
    "isPublic": false,
    "publicConfig": {
    "publishedAt": "2025-06-16T09:20:45.777Z",
    "seoTitle": "Scrape data from a website",
    "seoDescription": "string",
    "inputSchemaFields": "Unknown Type: array,null",
    "datasetName": "string",
    "datasetView": "string"
    }
    }
    }