Update Actor
Updates an Actor's settings with the values specified in an Actor object passed as JSON in the POST payload. Only the fields specified in the request body are updated.
Returns the full Actor object, the same as the Get Actor endpoint.
In the HTTP request, set the Content-Type header to application/json.
Authentication
To provide the authentication token, we recommend using the request's Authorization header, rather than the URL. For details, see Authentication.
Make an Actor public
To make your Actor public:
- Set isPublic to true.
- Provide title and categories. For reference, see constants from the apify-shared-js package
Update build tags
To change tags assigned to Actor builds, use the taggedBuilds object. It's a dictionary that maps tag names to specific builds, where:
- the key is the tag name, for example latest or beta
- the value is either null or an object with a build ID
Changing tags is a patch operation. Only the tags that you provide in this object are updated.
Note that you can assign multiple tags to a single build, but you can't assign the same tag to multiple builds.
- To create or reassign a tag, provide the tag name with a build ID. For example, to assign the latest tag to a build, use:
{
"latest": { "buildId": "z2EryhbfhgSyqj6Hn" }
}
- To remove a tag from a build, provide the tag name with a null value. For example, to remove the beta tag, use:
{
"beta": null
}
- You can perform multiple actions at once. The following example reassigns latest and removes beta, while preserving other existing tags:
{
"latest": { "buildId": "z2EryhbfhgSyqj6Hn" },
"beta": null
}
Path parameters
Actor ID or a tilde-separated owner's username and Actor name.
Request body
Example request
{
"name": "instagram-scraper",
"description": "This scraper extracts posts and comments from Instagram.",
"actorPermissionLevel": "LIMITED_PERMISSIONS",
"seoTitle": "Free Instagram scraper",
"seoDescription": "The best scraper for Instagram",
"title": "Instagram scraper",
"versions": [
{
"versionNumber": "1.6",
"envVars": [
{
"name": "MY_ENV_VAR",
"value": "my-value"
}
],
"buildTag": "latest",
"sourceFiles": [
{
"format": "TEXT",
"content": "console.log('This is the main.js file');",
"name": "src/main.js"
}
]
}
],
"categories": [
"SOCIAL_MEDIA"
],
"defaultRunOptions": {
"build": "latest",
"timeoutSecs": 3600,
"memoryMbytes": 2048,
"forcePermissionLevel": "LIMITED_PERMISSIONS"
},
"taggedBuilds": {
"latest": {
"buildId": "z2EryhbfhgSyqj6Hn"
},
"beta": null
},
"exampleRunInput": {
"body": "{ \"helloWorld\": 123 }",
"contentType": "application/json; charset=utf-8"
}
}Response
Example response
{
"data": {
"id": "zdc3Pyhyz3m8vjDeM",
"userId": "wRsJZtadYvn4mBZmm",
"name": "MyActor",
"username": "jane35",
"description": "My favourite actor!",
"actorPermissionLevel": "LIMITED_PERMISSIONS",
"createdAt": "2019-07-08T11:27:57.401Z",
"modifiedAt": "2019-07-08T14:01:05.546Z",
"stats": {
"totalBuilds": 9,
"totalRuns": 16,
"totalUsers": 6,
"totalUsers7Days": 2,
"totalUsers30Days": 6,
"totalUsers90Days": 6,
"totalMetamorphs": 2,
"lastRunStartedAt": "2019-07-08T14:01:05.546Z",
"actorReviewCount": 69,
"actorReviewRating": 4.7,
"bookmarkCount": 1269,
"publicActorRunStats30Days": {
"ABORTED": 2542,
"FAILED": 1234,
"SUCCEEDED": 732805,
"TIMED-OUT": 12556,
"TOTAL": 749137
}
},
"versions": [
{
"versionNumber": "0.0",
"envVars": [
{
"name": "MY_ENV_VAR",
"value": "my-value"
}
],
"buildTag": "latest",
"sourceFiles": [
{
"format": "TEXT",
"content": "console.log('This is the main.js file');",
"name": "src/main.js"
}
]
}
],
"defaultRunOptions": {
"build": "latest",
"timeoutSecs": 3600,
"memoryMbytes": 2048,
"forcePermissionLevel": "LIMITED_PERMISSIONS"
},
"exampleRunInput": {
"body": "{ \"helloWorld\": 123 }",
"contentType": "application/json; charset=utf-8"
},
"deploymentKey": "ssh-rsa AAAA ...",
"title": "My Actor",
"taggedBuilds": {
"latest": {
"buildId": "z2EryhbfhgSyqj6Hn",
"buildNumber": "0.0.2",
"finishedAt": "2019-06-10T11:15:49.286Z"
},
"beta": {
"buildId": "abc123def456",
"buildNumber": "1.0.5",
"finishedAt": "2019-07-15T14:30:00.000Z"
}
},
"seoTitle": "Web Scraper",
"seoDescription": "Crawls websites using Chrome and extracts data from pages using JavaScript.",
"pictureUrl": "https://apify-image-uploads-prod.s3.amazonaws.com/.../actor-picture.png",
"standbyUrl": "https://my-actor.apify.actor",
"notice": "NONE",
"categories": [
"DEVELOPER_TOOLS",
"OPEN_SOURCE"
]
}
}