Quick start

Learn how to run any actor in Apify Store or create your own. A step-by-step guide through your first steps on the Apify platform.

In this article, you will find the very basics of using the Apify platform. It shows you the principles of running any actor in Apify Store and the basics of making them using the in-app code editor.

Once you get to grips with this, go through our Apify scrapers tutorials to learn about how our main tools work. If you're comfortable getting your hands into some JavaScript, check out the Apify SDK, which has plenty of tutorials to get you going.

You will need an Apify account to complete this tutorial. If you don't have one, complete the sign-up process first.

Run an actor

1. Navigate to apify.com/store and pick any actor you like the look of. We'll pick the Google Search Results Scraper.

Apify store

2. On the actor's page, click the Try for free button.

Try for free

3. This will take you to the Apify console, where you will see the screen below.

Actor input view

4. Don't be put off by all the boxes - the actor is pre-configured to run without any extra input. Just click the Run button in the bottom-left corner and it will start.

Alternatively, you can play around with the settings to make the results more interesting for you.

5. Wait for the actor to run...

6. Get your results!

Click on the flashing Results button.

Actor successful run view

Then, choose which format you want your data in and check it out.

Choose the data format

Here is a preview of the actor's output as a table.

Dataset preview

Create an actor

1. Go to the Actors section in the Apify console and click on the Create new button.

Create a new actor

2. Go to the Source tab and paste the Node.js code below into the Source code editor.

const Apify = require('apify');

Apify.main(async () => {
    console.log('Hello world from Actor!');

3. Click ▷ Run in the Developer console below to build and run your actor. After the run is finished, you should see something like:

Apify actor run log

Congratulations, you have successfully created and run your first actor!

Accepting input

Let's try something little more advanced. We will enable the actor to accept input and generate output (for more details, see the Input article).

1. Paste the code below into the Source code editor.

const Apify = require('apify');

Apify.main(async () => {
    // Get input and print it
    const input = await Apify.getInput();
    console.log('My input:');

    // Save output
    const output = { message: 'Hello world!' };
    await Apify.setValue('OUTPUT', output);

2. Save your actor by clicking Save and then rebuild it by clicking Build.

3. After the build is finished, go to the Developer console and set the Input to:

{ "hello": 123 }

Apify actor run log

4. Click Run. When the run finishes, you will see something like:

Apify actor run log

Excellent, you have just created your first actor that accepts input and stores output! Now you can start adding some magic.

You can program an Apify actor to do anything one can do in the browser, from sending emails to processing vast amounts of data. For examples and inspiration, visit Apify Store.

Building more advanced actors

The above actor (and many others) uses the apify NPM package, which simplifies the development of actors. The Apify SDK has tutorials on how you can get started.

If you are building your own actors, you'll probably prefer to host the source code on Git. To do that, follow these steps:

  1. Create a new Git repository.
  2. Copy the boilerplate actor code from the apify/quick-start actor.
  3. Set Source type to Git repository for your actor in the app.
  4. Paste the Git repo link to Git URL, save changes and build your actor.
  5. That's it, now you can develop your actor locally on your computer and run it in the Apify cloud!

For more information, see the Git repository section.

What's next?