Actor definition file (actor.json)
Your main Actor configuration is in the .actor/actor.json file at the root of your Actor's directory. This file links your local development project to an Actor on the Apify platform. It should include details like the Actor's name, version, build tag, and environment variables. Make sure to commit this file to your Git repository.
For example, the .actor/actor.json file can look like this:
- Full actor.json
- Minimal actor.json
{
"actorSpecification": 1, // always 1
"name": "name-of-my-scraper",
"title": "My Web Scraper",
"description": "Extract data from example.com.",
"version": "0.0",
"buildTag": "latest",
"meta": {
"templateId": "ts-crawlee-playwright-chrome"
},
"defaultMemoryMbytes": "get(input, 'startUrls.length', 1) * 1024",
"minMemoryMbytes": 256,
"maxMemoryMbytes": 4096,
"environmentVariables": {
"MYSQL_USER": "my_username",
"MYSQL_PASSWORD": "@mySecretPassword"
},
"usesStandbyMode": false,
"dockerfile": "./Dockerfile",
"readme": "./ACTOR.md",
"input": "./input_schema.json",
"output": "./output_schema.json",
"storages": {
"dataset": "./dataset_schema.json",
"keyValueStore": "./key_value_store_schema.json"
},
"webServerSchema": "./web_server_openapi.json",
"webServerMcpPath": "/mcp"
}
{
"actorSpecification": 1, // always 1
"name": "name-of-my-scraper",
"version": "0.0"
}
Reference
Deployment metadata
Actor name, version, buildTag, and environmentVariables are currently only used when you deploy your Actor using the Apify CLI and not when deployed, for example, via GitHub integration. There, it serves for informative purposes only.
| Property | Type | Description |
|---|---|---|
actorSpecification | Required | The version of the Actor specification. This property must be set to 1, which is the only version available. |
name | Required | The name of the Actor. |
title | Optional | The title property defines the human-readable display title of the Actor, shown in Apify Console and Apify Store. If not specified, the name property is used as the title. |
description | Optional | The description of the Actor. |
version | Required | The version of the Actor, specified in the format [Number].[Number], e.g., 0.1, 0.3, 1.0, 1.3, etc. |
buildTag | Optional | The tag name to be applied to a successful build of the Actor. If not specified, defaults to latest. Refer to the builds for more information. |
meta | Optional | Metadata object containing additional information about the Actor. Currently supports templateId field to identify the template from which the Actor was created. |
environmentVariables | Optional | A map of environment variables to be used during local development. These variables will also be applied to the Actor when deployed on the Apify platform. For more details, see the environment variables section of the Apify CLI documentation. |
dockerfile | Optional | The path to the Dockerfile to be used for building the Actor on the platform. If not specified, the system will search for Dockerfiles in the .actor/Dockerfile and Dockerfile paths, in that order. Refer to the Dockerfile section for more information. |
dockerContextDir | Optional | The path to the directory to be used as the Docker context when building the Actor. The path is relative to the location of the actor.json file. This property is useful for monorepos containing multiple Actors. Refer to the Actor monorepos section for more details. |
readme | Optional | The path to the README file to be used on the platform. If not specified, the system will look for README files in the .actor/README.md and README.md paths, in that order of preference. For details, see Create an Actor README. |
input | Optional | You can embed your input schema object directly in actor.json under the input field. You can also provide a path to a custom input schema. If not provided, the input schema at .actor/INPUT_SCHEMA.json or INPUT_SCHEMA.json is used, in this order of preference. You can also use the inputSchema alias interchangeably. |
output | Optional | You can embed your output schema object directly in actor.json under the output field. You can also provide a path to a custom output schema. Read more about Actor output schemas. You can also use the outputSchema alias interchangeably. |
changelog | Optional | The path to the CHANGELOG file displayed in the Information tab of the Actor in Apify Console next to Readme. If not provided, the CHANGELOG at .actor/CHANGELOG.md or CHANGELOG.md is used, in this order of preference. Your Actor doesn't need to have a CHANGELOG but it is a good practice to keep it updated for published Actors. |
storages.dataset | Optional | The storages.dataset property defines the schema for the Actor's default dataset. Set the property to an embedded dataset schema object or a path to a dataset schema file. Read about Actor dataset schemas. |
storages.datasets | Optional | The storages.datasets property defines multiple datasets for the Actor. Set the property to an object that maps dataset aliases to embedded dataset schema objects or paths to dataset schema files. Read about multiple dataset schemas. |
storages.keyValueStore | Optional | The storages.keyValueStore property defines the schema for the Actor's default key-value store. Set the property to an embedded key-value store schema object or a path to a key-value store schema file. Read about Actor key-value store schemas. |
defaultMemoryMbytes | Optional | Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a dynamic memory expression string. |
minMemoryMbytes | Optional | Specifies the minimum amount of memory in megabytes required by the Actor to run. Requires an integer value. If both minMemoryMbytes and maxMemoryMbytes are set, then minMemoryMbytes must be equal or lower than maxMemoryMbytes. Refer to the Usage and resources for more details about memory allocation. |
maxMemoryMbytes | Optional | Specifies the maximum amount of memory in megabytes required by the Actor to run. It can be used to control the costs of run. Requires an integer value. Refer to the Usage and resources for more details about memory allocation. |
usesStandbyMode | Optional | Boolean specifying whether the Actor will have Standby mode enabled. |
webServerSchema | Optional | The webServerSchema property defines an OpenAPI v3 schema for the web server running in the Actor. Set the property to an embedded OpenAPI schema object or a path to a JSON schema file. Define the schema when your Actor starts its own HTTP server and you want to describe its interface. |
webServerMcpPath | Optional | The HTTP endpoint path where the Actor exposes its MCP (Model Context Protocol) server functionality. When set, the Actor is recognized as an MCP server. For example, setting "/mcp" designates the /mcp endpoint as the MCP interface. This path becomes part of the Actor's stable URL when Standby mode is enabled. |