search docs

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.

This article shows you the very basics of using the Apify platform. It shows you the principles of running any actor in Apify Store and the first steps of building an actor using the in-app code editor.

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 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, head over to the Input tab.

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

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

Actor input view

3. Wait for the actor to run...

4. 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.

import { Actor } from 'apify';

await Actor.init();

console.log('Hello world from Actor!');

await Actor.exit();

Click Save.

3. Click Build in the Developer console below to build your actor. After the build is finished, click ▷ Start to 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.

import { Actor } from 'apify';

await Actor.init();

// Get input and print it
const input = await Actor.getInput();
console.log('My input:');

await Actor.exit();

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 ▷ Start. 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 logs 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. Also make sure to check out Crawlee - the library containing crawling and scraping-related tools, which previously were a part of Apify SDK.

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?