Skip to main content

Actor definition

Learn how to turn your arbitrary code into an Actor simply by adding an Actor definition directory.

A single isolated Actor consists of source code and various settings. You can think of an Actor as a cloud app or service that runs on the Apify platform. The run of an Actor is not limited to the lifetime of a single HTTP transaction. It can run for as long as necessary, even forever.

Basically, Actors are programs packaged as Docker images, which accept a well-defined JSON input, perform an action, and optionally produce an output.

Actors have the following elements:

  • The main actor.json file contains metadata such as the Actor name, description, author, version, and links pointing to the other definition files below.
  • Dockerfile which specifies where is the Actor's source code, how to build it, and run it.
  • Documentation in the form of a file.
  • Input and output schemas that describe what input the Actor requires and what results it produces.
  • Access to an out-of-box storage system for Actor data, results, and files.

The documentation and the input/output schemas make it possible for people to easily understand what the Actor does, enter the required inputs both in the user interface or API, and integrate the Actor's results with their other workflows. Actors can easily call and interact with each other, enabling building more complex systems on top of simple ones.

The Apify platform provides an open API, cron-style scheduler, webhooks, and integrations to services such as Zapier or Make, which make it easy for users to integrate Actors with their existing workflows. Anyone is welcome to publish Actors in Apify Store, and you can even monetize your Actors.

Actors can be developed and run locally and then easily deployed to the Apify platform using the Apify CLI or a GitHub integration. For more details, see the Deployment section.

To get a better idea of what Apify Actors are, visit Apify Store, and try out some of them!