You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sources/academy/platform/scraping_with_apify_and_ai/01_creating_actor.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,19 +47,45 @@ In this course, we'll scrape a real e-commerce site instead of artificial playgr
47
47
48
48
:::
49
49
50
+
## Installing Node.js
51
+
52
+
With AI we don't need to learn how to code to develop a scraper. AI will write the code for us. We still need to setup our environment to be able to run that code, though.
53
+
54
+
We'll develop our scraper in a mainstream programming language called JavaScript. To run command line programs written in JavaScript, we'll need a tool called Node.js.
55
+
56
+
Let's head to the [Download Node.js](https://nodejs.org/en/download) web page. You should see a row of configuration dropdowns and a rather large code block below, with quite a few commands. Check if the website guessed your operating system correctly, and copy the whole block to the clipboard:
57
+
58
+

59
+
60
+
Now paste it as-is to your Terminal (macOS/Linux) or Command Prompt (Windows) and run it using the <kbd>↵</kbd> key. Once the installation finishes, you should see versions of Node.js and npm (another related tool) printed:
61
+
62
+
```text
63
+
...
64
+
$ node -v
65
+
v24.11.1
66
+
$ npm -v
67
+
11.6.2
68
+
```
69
+
70
+
The exact version numbers are not really important. If you see the versions printed, it means we've successfully installed Node.js and npm.
71
+
50
72
## Installing Apify CLI
51
73
52
-
First, let's head to the [Installation page](https://docs.apify.com/cli/docs/installation) of the Apify CLI, a command line program, which works as a remote control for the Apiary platform.
74
+
Now another thing we'll need is Apify CLI. It's a command line program, which works as a remote control for the Apiary platform. It'll also help us with structuring our scraper as an Actor, so that it can run on the platform.
53
75
54
-
On the page, choose an installation method suitable for you and run the required commands in your Terminal (macOS/Linux) or Command Prompt (Windows).
76
+
Apify CLI happens to be also made in JavaScript, so we can use the npm tool we just installed to get it on our computer:
77
+
78
+
```text
79
+
npm install -g apify-cli
80
+
```
55
81
56
-
If you don't know what to do or get stuck, [instruct ChatGPT to read the installation page](https://chatgpt.com/?prompt=Read%20from%20https%3A%2F%2Fdocs.apify.com%2Fcli%2Fdocs%2Finstallation%20so%20I%20can%20ask%20questions%20about%20it.) and let it help you. Verify that you've successfully installed the tool by running this:
82
+
Once the command finishes, let's try if everything went all right:
57
83
58
84
```text
59
85
apify --version
60
86
```
61
87
62
-
You are ready if it prints something like the following:
88
+
If it prints something like the following, we're ready to start building:
63
89
64
90
```text
65
91
apify-cli/0.0.0 (1a2b3c4) running on ... with node-0.0.0, installed via ...
0 commit comments