Skip to content

Commit bdaf79a

Browse files
docs: Improve Quick Start section in the platform docs (#1733)
Co-authored-by: Michał Olender <[email protected]>
1 parent 084dfec commit bdaf79a

File tree

3 files changed

+145
-106
lines changed

3 files changed

+145
-106
lines changed
Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,59 @@
11
---
22
title: Quick start
33
sidebar_position: 1
4-
description: Create your first Actor using the Apify Console IDE or locally.
4+
description: Create your first Actor using the Apify Web IDE or locally in your IDE.
55
slug: /actors/development/quick-start
66
---
77

8-
# Development: Quick start
8+
import Card from "@site/src/components/Card";
9+
import CardGrid from "@site/src/components/CardGrid";
910

10-
**Create your first Actor using the Apify Console IDE or locally.**
11+
**Create your first Actor using the Apify Web IDE or locally in your IDE.**
1112

1213
---
1314

14-
:::note
15+
:::info Before you build
1516

1617
Before you start building your own Actor, try out a couple of existing Actors from [Apify Store](https://apify.com/store). See the [Running Actors](../../running/index.md) section for more information on running existing Actors.
1718

1819
:::
1920

20-
## Language
21+
## Technology stack
2122

2223
Any code that can run inside of a Docker container can be turned into Apify [Actor](../../index.mdx). This gives you freedom in choosing your technical stack, including programming language and technologies.
2324

2425
But to fully benefit from running on top of the Apify platform, we recommend you choose either JavaScript/Node.js or Python, where Apify provides first-level support regarding its SDK, API clients, and learning materials.
2526

26-
For these languages, you can also choose from many code templates that help you to kickstart your project quickly:
27+
For these languages, you can also [choose from many code templates](https://apify.com/templates) that help you to kickstart your project quickly.
2728

28-
<a href="https://apify.com/templates" target="_blank">
29-
<img src={require("./images/templates.png").default} width="70%" />
30-
</a>
29+
![Actor Templates](./images/templates.png)
3130

32-
## [](#local-development)Local development
31+
## Development paths
3332

34-
You can create Actor in two ways:
33+
You can develop Actor in two ways:
3534

36-
- Using the **Web IDE** in [Apify Console](https://console.apify.com). This is the fastest way to kick-start your Actor development and try out the Apify platform.
37-
- Develop your Actor **locally** and only deploy to the Apify platform when it is production ready. This way, you benefit from your local setup for a better development and debugging experience. After you are done with the development, you can easily [deploy](./deployment) your Actor to Apify platform.
35+
### Local development
3836

39-
Now, let's start with:
37+
Develop your Actor locally in your IDE and only deploy to the Apify platform when it is production ready.
4038

41-
import Card from "@site/src/components/Card";
42-
import CardGrid from "@site/src/components/CardGrid";
39+
This way, you benefit from your local setup for a better development and debugging experience. After you are done with the development, you can [deploy](./deployment) your Actor to the Apify platform.
4340

4441
<CardGrid>
4542
<Card
46-
title="Apify Console web IDE"
47-
to="/platform/actors/development/quick-start/web-ide"
43+
title="Start Locally in Your IDE"
44+
to="/platform/actors/development/quick-start/locally"
4845
/>
46+
</CardGrid>
47+
48+
### Web IDE
49+
50+
Using the Web IDE in [Apify Console](https://console.apify.com).
51+
52+
This is the fastest way to kick-start your Actor development and try out the Apify platform.
53+
54+
<CardGrid>
4955
<Card
50-
title="Locally on your machine"
51-
to="/platform/actors/development/quick-start/locally"
56+
title="Start in Apify Web IDE"
57+
to="/platform/actors/development/quick-start/web-ide"
5258
/>
5359
</CardGrid>

sources/platform/actors/development/quick_start/start_locally.md

Lines changed: 83 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -9,123 +9,146 @@ slug: /actors/development/quick-start/locally
99

1010
---
1111

12-
:::info Prerequisites
12+
## What you'll learn
1313

14-
You need to have [Node.js](https://nodejs.org/en/) version 16 or higher with `npm` installed on your computer.
14+
This guide walks you through the full lifecycle of an Actor. You'll start by creating and running it locally with the Apify CLI, then learn to configure its input and data storage. Finally, you will deploy the Actor to the Apify platform, making it ready to run in the cloud.
1515

16-
:::
16+
### Prerequisites
1717

18-
## Install Apify CLI
18+
- [Node.js](https://nodejs.org/en/) version 16 or higher with `npm` installed on your computer.
19+
- The [Apify CLI](/cli/docs/installation) installed.
20+
- Optional: To deploy your Actor, [sign in](https://console.apify.com/sign-in).
1921

20-
### MacOS/Linux
22+
### Step 1: Create your Actor
2123

22-
You can install the Apify CLI via the [Homebrew package manager](https://brew.sh/).
24+
Use Apify CLI to create a new Actor:
2325

2426
```bash
25-
brew install apify-cli
27+
apify create
2628
```
2729

28-
### Other platforms
30+
The CLI will ask you to:
2931

30-
Use [NPM](https://www.npmjs.com/) to install the Apify CLI.
32+
1. Name your Actor (e.g., `your-actor-name`)
33+
2. Choose a programming language (`JavaScript`, `TypeScript`, or `Python`)
34+
3. Select a development template
35+
:::info Explore Actor templates
3136

32-
```bash
33-
npm -g install apify-cli
34-
```
37+
Browse the [full list of templates](https://apify.com/templates) to find the best fit for your Actor.
3538

36-
Visit [Apify CLI documentation](https://docs.apify.com/cli/) for more information regarding installation and advanced usage.
39+
:::
3740

38-
## Create your Actor
41+
The CLI will:
3942

40-
To create a new Actor, use the following command:
43+
- Create a `your-actor-name` directory with boilerplate code
44+
- Install all project dependencies
45+
46+
Now, you can navigate to your new Actor directory:
4147

4248
```bash
43-
apify create
49+
cd your-actor-name
4450
```
4551

46-
The CLI will prompt you to:
52+
### Step 2: Run your Actor
4753

48-
1. _Name your Actor_: Enter a descriptive name for your Actor, such as `your-actor-name`
49-
1. _Choose a programming language_: Select the language you want to use for your Actor (JavaScript, TypeScript, or Python).
50-
1. _Select a development template_: Choose a template from the list of available options.
54+
Run your Actor with:
5155

52-
After selecting the template, the CLI will:
56+
```bash
57+
apify run
58+
```
5359

54-
- Create a `your-actor-name` directory with the boilerplate code.
55-
- Install all project dependencies
60+
:::tip Clear data with --purge
5661

57-
![Creation](./images/actor-create.gif)
62+
During development, use `apify run --purge`. This clears all results from previous runs, so it's as if you're running the Actor for the first time.
5863

59-
Navigate to the newly created Actor directory:
64+
:::
65+
66+
You'll see output similar to this in your terminal:
6067

6168
```bash
62-
cd your-actor-name
69+
INFO System info {"apifyVersion":"3.4.3","apifyClientVersion":"2.12.6","crawleeVersion":"3.13.10","osType":"Darwin","nodeVersion":"v22.17.0"}
70+
Extracted heading { level: 'h1', text: 'Your full‑stack platform for web scraping' }
71+
Extracted heading { level: 'h3', text: 'TikTok Scraper' }
72+
Extracted heading { level: 'h3', text: 'Google Maps Scraper' }
73+
Extracted heading { level: 'h3', text: 'Instagram Scraper' }
6374
```
6475
65-
## Explore the source code in your editor
76+
As you can see in the logs, the Actor extracts text from a web page. The main logic lives in `src/main.js`. Depending on your template, this file may be `src/main.ts` (TypeScript) or `src/main.py` (Python).
6677
67-
After creating your Actor, explore the source code in your preferred code editor, We'll use the `Crawlee + Puppeteer + Chrome` template code as an example, but all Actor templates follow a similar organizational pattern. The important directories and filer are:
78+
In the next step, we’ll explore the results in more detail.
6879
69-
### `src` Directory
80+
### Step 3: Explore the Actor
7081
71-
- `src/main.js`: This file contains the actual code of your Actor
82+
Let's explore the Actor structure.
7283
73-
### `.actor` Directory
84+
#### The `.actor` folder
7485
75-
- [`actor.json`](https://docs.apify.com/platform/actors/development/actor-definition/actor-json): This file defines the Actor's configuration, such as input and output specifications.
76-
- [`Dockerfile`](https://docs.apify.com/platform/actors/development/actor-definition/dockerfile): This file contains instructions for building the Docker image for your Actor.
86+
The `.actor` folder contains the Actor configuration. The `actor.json` file defines the Actor's name, description, and other settings. Find more info in the [actor.json](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) definition.
7787
78-
### `storage` Directory
88+
#### Actor's `input`
7989
80-
- This directory emulates the [Apify Storage](../../../storage/index.md)
81-
- [Dataset](../../../storage/dataset.md)
82-
- [Key-Value Store](../../../storage/key_value_store.md)
83-
- [Request Queue](../../../storage/request_queue.md)
90+
Each Actor accepts an `input object` that tells it what to do. The object uses JSON format and lives in `storage/key_value_stores/default/INPUT.json`.
8491
85-
![Actor source code](./images/actor-local-code.png)
92+
:::info Edit the schema to change input
8693
87-
## Run it locally
94+
To change the `INPUT.json`, edit the `input_schema.json` in the `.actor` folder first.
8895
89-
To run your Actor locally, use the following command:
96+
This JSON Schema validates input automatically (no error handling needed), powers the Actor's user interface, generates API docs, and enables smart integration with tools like Zapier or Make by auto-linking input fields.
9097
91-
```bash
92-
apify run
93-
```
98+
:::
9499
95-
After executing this command, you will see the Actor's log output in your terminal. The results of the Actor's execution will be stored in the local dataset located in the `storage/datasets/default` directory.
100+
Find more info in the [Input schema](/platform/actors/development/actor-definition/input-schema) documentation.
96101
97-
![Actor source code](./images/actor-local-run.png)
102+
#### Actor's `storage`
98103
99-
:::note Local testing & debugging
104+
The Actor system provides two storage types for files and results: [key-value](/platform/storage/key-value-store) store and [dataset](/platform/storage/dataset).
100105
101-
Running the Actor locally allows you to test and debug your code before deploying it to the Apify platform.
106+
##### Key-value store
102107
103-
:::
108+
The key-value store saves and reads files or data records. Key-value stores work well for screenshots, PDFs, or persisting Actor state as JSON files.
109+
110+
##### Dataset
111+
112+
The dataset stores a series of data objects from web scraping, crawling, or data processing jobs. You can export datasets to JSON, CSV, XML, RSS, Excel, or HTML formats.
113+
114+
#### Actor's `output`
115+
116+
You define the Actor output using the Output schema files:
104117
105-
## Deploy it to Apify platform
118+
- [Dataset Schema Specification](/platform/actors/development/actor-definition/dataset-schema)
119+
- [Key-value Store Schema Specification](/platform/actors/development/actor-definition/key-value-store-schema)
106120
107-
Once you are satisfied with your Actor, to deploy it to the Apify platform, follow these steps:
121+
The system uses this to generate an immutable JSON file that tells users where to find the Actor's results.
108122
109-
1. _Sign in to Apify with the CLI tool_
123+
### Step 4: Deploy your Actor
124+
125+
Let's now deploy your Actor to the Apify platform, where you can run the Actor on a scheduled basis, or you can make the Actor public for other users.
126+
127+
1. Login first:
110128
111129
```bash
112130
apify login
113131
```
114132
115-
This command will prompt you to provide your API token that you can find in Console.
133+
:::info Your Apify token location
116134
117-
1. _Push your Actor to the Apify platform_
135+
After you successfully login, your Apify token is stored in `~/.apify/auth.json`, or `C:\Users\<name>\.apify` based on your system.
136+
137+
:::
138+
139+
2. Push your Actor to the Apify platform:
118140
119141
```bash
120142
apify push
121143
```
122144
123-
This command will upload your Actor's code and configuration to the Apify platform, where it can be executed and managed.
124-
125-
:::note Actor monetization
145+
### Step 5: It's Time to Iterate!
126146
127-
If you have successfully completed your first Actor, you may consider [sharing it with other users and monetizing it](../../publishing/index.mdx). The Apify platform provides opportunities to publish and monetize your Actors, allowing you to share your work with the community and potentially generate revenue.
147+
Good job! 🎉 You're ready to develop your Actor. You can make changes to your Actor and implement your use case.
128148
129-
:::
149+
## Next steps
130150
131-
By following these steps, you can seamlessly deploy your Actors to the Apify platform, enabling you to leverage its scalability, reliability, and advanced features for your web scraping and data processing projects.
151+
- Visit the [Apify Academy](/academy) to access a comprehensive collection of tutorials, documentation, and learning resources.
152+
- To understand Actors in detail, read the [Actor Whitepaper](https://whitepaper.actor/).
153+
- Check [Continuous integration](../deployment/continuous_integration.md) documentation to automate your Actor development process.
154+
- After you finish building your first Actor, you can [share it with other users and even monetize it](../../publishing/index.mdx).

0 commit comments

Comments
 (0)