Skip to main content

Develop Actors in the web IDE

With the web IDE in Apify Console, you can write, build, and run your code entirely in a browser. It's a great way to get familiar with the platform and see the full lifecycle of an Actor, without using any local development tools.

Before you start

To complete this tutorial, you need an Apify account. Sign up for free.

1. Create your Actor

To create an Actor from a code template:

  1. Log in to Apify Console.

  2. In the left-side panel, go to Development > My Actors.

  3. Select Develop new, then Get started.

  4. In the first step, choose a type of Actor you want to create: web scraper, AI agent, API and data pipeline, or browser automation. Let's select web scraper.

  5. In the second step, choose the programming language: TypeScript, JavaScript, or Python. Let's select JavaScript.

  6. Based on your choice, Apify suggests Actor templates. For this tutorial, let's use the recommended Crawlee + Cheerio.

    Explore Actor templates

    To find a template that best suits your needs, browse the full list of templates.

  7. In the last step, choose where to host your Actor code. Let's select Host on Apify.

Once done, your Actor is automatically named and you're redirected to its page.

2. Explore the Actor

The Crawlee + Cheerio template that you selected uses the Apify SDK combined with Crawlee, Apify's popular open-source Node.js web scraping library. By default, the code crawls the apify.com website.

To explore the structure and contents of the template, go to the Source tab > Code.

Source code of an Actor in the web IDE in Apify Console

Crawlee

Crawlee is an open-source Node.js library designed for web scraping and browser automation. It helps you build reliable crawlers quickly and efficiently.

3. Build the Actor

By building the Actor, you package the code and its dependencies into a Docker image that the Apify platform can run. Each build is versioned.

To build the Actor:

  1. Go to Source tab > Code.
  2. Select Build.

When the build starts, you're redirected to the Last build tab. Here, you can check the build progress and view Docker build logs.

Web IDE in Apify Console with the Last build tab and Build button highlighted

4. Run the Actor

Once your Actor is built, run it:

  1. Go to Source tab > Input.
  2. Set the Start URL to the URL you want to crawl or use the default value.
  3. (Optional) To customize the run, expand the Run options section. You can adjust the following options:
    • Build – select the build version to run.
    • Timeout – set the timeout for the run in seconds.
    • Memory limit – allocate the memory for the run. For details, see Usage and resources.
    • Maximum cost per run.
  4. Select Start.

When the run starts, you can monitor its progress and view the logs in real time. To view the results of the Actor's execution, go to the Output tab.

Actor run options in the web IDE in Apify Console

5. Iterate

Now it's time to iterate. Each change follows the same cycle: edit the code, build a new version of the Actor, and run it to check the result.

Next steps