Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ properties:
anyOf:
- $ref: ../actors/ActorStandby.yaml
- type: "null"
publicConfig:
description: |
Comment thread
Janjiran marked this conversation as resolved.
Configuration that controls how the published task appears on its public landing page.
Editing this object requires write permission to the Actor that the task belongs to.
$ref: ./TaskPublicConfig.yaml
9 changes: 9 additions & 0 deletions apify-api/openapi/components/schemas/actor-tasks/Task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,12 @@ properties:
standbyUrl:
type: [string, "null"]
format: uri
isPublic:
type: boolean
description: |
Comment thread
Janjiran marked this conversation as resolved.
Whether the task is published. Based on the `publicConfig.publishedAt` field.
examples: [false]
publicConfig:
anyOf:
- $ref: ./TaskPublicConfig.yaml
- type: "null"
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
title: TaskPublicConfig
type: object
description: |
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`.
properties:
publishedAt:
type: [string, "null"]
format: date-time
readOnly: true
description: |
Time when the task was published, or `null` if the task isn't published.
This field is server-controlled. To publish or unpublish a task, use the
[Update task](/api/v2/actor-task-put) endpoint and set `isPublic`.
examples: ["2025-06-16T09:20:45.777Z"]
seoTitle:
type: [string, "null"]
maxLength: 60
description: |
Name of the Actor task to display by search engines such as Google. Defaults to the task
title. At most 60 characters.
examples: [Scrape data from a website]
seoDescription:
type: [string, "null"]
maxLength: 160
description: |
Description of the Actor task to display by search engines such as Google. Defaults to the
task description. At most 160 characters.
inputSchemaFields:
type: [array, "null"]
description: Names of the task input fields displayed on the public task page.
items:
type: string
datasetName:
type: [string, "null"]
description: |
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:
type: [string, "null"]
description: |
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.
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@ properties:
anyOf:
- $ref: ../actors/ActorStandby.yaml
- type: "null"
publicConfig:
description: |
Configuration that controls how the published task appears on its public landing page.
Editing this object requires write permission to the Actor that the task belongs to.

The fields you send are merged into the stored configuration, so you only need to include
the ones you're changing. To clear a field, set it to `null`. Sending `publicConfig: null`
is rejected, so the object as a whole can't be cleared.
$ref: ./TaskPublicConfig.yaml
isPublic:
type: boolean
description: |
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.
examples: [true]
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ put:

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](/api/v2/actor-task-get) endpoint.

Expand Down
Loading