Skip to content

Commit 917e361

Browse files
authored
docs: update web ide doc (#933)
restructured the doc for better clarity renamed headings added admonitions
1 parent 5f99f3a commit 917e361

File tree

7 files changed

+93
-41
lines changed

7 files changed

+93
-41
lines changed
-274 KB
Loading
-103 KB
Loading
-274 KB
Loading
-229 KB
Loading
-370 KB
Loading
-337 KB
Loading

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

Lines changed: 93 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,91 +5,143 @@ description: Create your first Actor using the web IDE in Apify Console.
55
slug: /actors/development/quick-start/web-ide
66
---
77

8+
import Tabs from '@theme/Tabs';
9+
import TabItem from '@theme/TabItem';
10+
811
# Development in web IDE
912

1013
**Create your first Actor using the web IDE in Apify Console.**
1114

1215
---
1316

14-
## 1. Create the Actor
17+
## Create the Actor
18+
19+
:::note Prerequisites
20+
21+
To use Web IDE, you will need an Apify account. You can [sign-up for a free account](https://console.apify.com/sign-up) on the Apify website.
1522

16-
> You will need an Apify account to complete this tutorial. If you don't have one, you can [sign-up for a free account](https://console.apify.com/sign-up) on the Apify website.
23+
:::
1724

18-
After you sign in to [Apify Console](https://console.apify.com), navigate to the [Actors](https://console.apify.com/actors) section on your left panel. Then, click the **Create new** button at the top right corner of the page.
25+
After you sign in to [Apify Console](https://console.apify.com), navigate to the [**Actors**](https://console.apify.com/actors) section. Then, click the **Develop new** button at the top right corner of the page.
1926

2027
![Create Actor](./images/actor-create-button.png)
2128

22-
You will be redirected to a page containing various Actor development templates for popular languages such as JavaScript, TypeScript, and Python. You can choose the template that best suits your technology stack. For demonstration purposes, let's choose "PuppeteerCrawler in JavaScript".
29+
You will be redirected to a page containing various Actor development templates for popular languages such as `JavaScript`, `TypeScript`, and `Python`. These templates provide boilerplate code and a preconfigured environment tailored to specific use cases. You can choose the template that best suits your technology stack. For demonstration purposes, let's choose **Crawlee + Puppeteer + Chrome**.
2330

2431
![Templates](./images/actor-create-templates.png)
2532

26-
You will be prompted to give your Actor a name and then redirected to your Actor configuration page.
33+
After choosing the template your actor will be automatically named and you will be redirected to its page.
2734

28-
## 2. Explore the source code
35+
### Explore the source code
2936

30-
Now it's time to take a peek at the source code. You can see the boilerplate code that uses the [Apify SDK](https://docs.apify.com/sdk/js/) combined with [Crawlee](https://crawlee.dev/), Apify's popular open-source Node.js web scraping library. The code does a recursive crawl of the whole [apify.com](https://apify.com) website.
37+
The provided boilerplate code utilizes the [Apify SDK](https://docs.apify.com/sdk/js/) combined with [Crawlee](https://crawlee.dev/), Apify's popular open-source Node.js web scraping library. By default the code performs a recursive crawl of the [apify.com](https://apify.com) website, but you can change it to a website of your choosing.
3138

32-
> [Crawlee](https://crawlee.dev/) is an open-source Node.js web scraping and browser automation library. <br />
33-
> It helps you build reliable crawlers. Fast.
39+
:::info Crawlee
40+
41+
[Crawlee](https://crawlee.dev/) is an open-source Node.js library designed for web scraping and browser automation. It helps you build reliable crawlers quickly and efficiently.
42+
43+
:::
3444

35-
Let's run it! To run your Actor, you need to build it first, so let's press the "Build" button below the source code.
3645

3746
![Actor source code](./images/actor-source-code.png)
3847

39-
## 3. Build it
48+
### Build the Actor
49+
50+
To run your Actor, you need to build it first. Click the **Build** button below the source code to start the build process.
4051

41-
After you press the "Build" button, the UI transitions to the "Build" tab, and you can see the progress of the build, including the Docker build log.
52+
Once the build has been initiated, the UI will transition to the **Last build** tab, displaying the progress of the build and the Docker build log.
4253

4354
![Actor build](./images/actor-build.png)
4455

45-
Notice that the UI includes four tabs - (1) Code, (2) Build, (3) Input, and (4) Run. This represents the Actor creation flow where you need first to take the source code and build it. Once you have a build, you give it input which results in an Actor run.
56+
:::note Actor creation flow
57+
58+
The UI includes four tabs:
59+
60+
- **Code**
61+
- **Last build**
62+
- **Input**
63+
- **Last Run**
64+
65+
This represents the Actor creation flow, where you first build the Actor from the source code. Once the build is successful, you can provide input parameters and initiate an Actor run.
66+
67+
:::
68+
69+
### Run the Actor
4670

47-
## 4. Run it
71+
Once the Actor is built, you can look at its input, which consists of one field - **Start URL**, the URL where the crawling starts. Below the input, you can adjust the **Run options**:
4872

49-
Once the Actor is built, you can look at its input, which consists of one field - Start URL, the URL where the crawling starts. Below the input, you can adjust the run options consisting of build, timeout, and memory limit.
73+
- **Build**
74+
- **Timeout**
75+
- **Memory limit**
5076

5177
![Actor input](./images/actor-input.png)
5278

53-
You can start an Actor run by pressing the **Start** button at the bottom of the page. Once the run is created, you can view its log and other details, including the **Results** which will shortly start popping up in the output tab. You can always stop the run using the **Abort** button.
79+
To initiate an Actor run, click the **Start** button at the bottom of the page. Once the run is created, you can monitor its progress and view the log in real-time. The **Output** tab will display the results of the Actor's execution, which will be populated as the run progresses. You can abort the run at any time using the **Abort** button.
5480

5581
![Actor run](./images/actor-run.png)
5682

57-
## 5. Pull it
83+
### Pull the Actor
84+
85+
To continue development locally, you can pull the Actor's source code to your local machine.
86+
87+
:::note Prerequisites
88+
89+
Install <code>[apify-cli](https://docs.apify.com/cli/)</code> :
90+
91+
<Tabs>
92+
<TabItem value="macOS/Linux" label="macOS/Linux">
93+
94+
```bash
95+
brew install apify-cli
96+
```
97+
98+
</TabItem>
99+
<TabItem value="other platforms" label="Other platforms">
100+
101+
```bash
102+
npm -g install apify-cli
103+
```
104+
105+
</TabItem>
106+
</Tabs>
107+
108+
:::
109+
110+
To pull your Actor, you need to:
58111

59-
For further local development, you can pull the Actor's source code to your local machine. You can get instructions for your Actor on the Actor detail page.
112+
1. Log in to the Apify platform
60113

61-
![Actor pull](./images/actor-pull.png)
114+
```bash
115+
apify login
116+
```
62117

63-
To pull your Actor, you need to have `apify cli` installed. You can install it using the npm:
118+
2. Pull your Actor using the following command:
64119

65-
```bash
66-
npm -g install apify-cli
67-
```
120+
```bash
121+
apify pull your-actor-name
122+
```
68123

69-
or using the Homebrew package manager on macOS:
124+
Or with a specific version:
70125

71-
```bash
72-
brew install apify-cli
73-
```
126+
```bash
127+
apify pull your-actor-name --version [version_number]
128+
```
74129

75-
Log in to the Apify platform:
130+
As `your-actor-name`, you can use either:
76131

77-
```bash
78-
apify login
79-
```
132+
- The unique name of the Actor (e.g., `apify/hello-world`)
133+
- The ID of the Actor (e.g., `E2jjCZBezvAZnX8Rb`)
80134

81-
Then, you can pull your Actor using the following command:
135+
You can find both by clicking on the Actor title at the top of the page, which will open a new window containing the Actor's unique name and ID.
82136
83-
```bash
84-
apify pull [actor_name]
85-
```
137+
## Iterate & customize
86138
87-
or with specified version:
139+
After pulling the Actor's source code to your local machine, you can modify and customize it to match your specific requirements.
140+
Leverage your preferred code editor or development environment to make the necessary changes and enhancements.
88141

89-
```bash
90-
apify pull [actor_name] --version [version_number]
91-
```
142+
Once you've made the desired changes, you can push the updated code back to the Apify platform for deployment & execution, leveraging the platform's scalability and reliability.
92143

93-
## 6. Iterate
144+
To learn more about the Apify platform's features and best practices for Actor development:
94145
95-
Now you can get back to the source code and modify the Actor to match your needs. To learn about all the Apify platform features and best practices, continue to the following chapter of this section or visit the [Apify Academy](/academy).
146+
- Continue to the next chapter of this section for in-depth guidance and examples
147+
- Visit the [Apify Academy](/academy) to access a comprehensive collection of tutorials, documentation, and learning resources.

0 commit comments

Comments
 (0)