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/tutorials/apify_actors/adding_rapidapi_project.mdx
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,9 +60,11 @@ app.use(express.json());
60
60
// Rest of the logic
61
61
```
62
62
63
-
**Tip:** The Apify platform performs readiness checks by sending GET requests to `/` with the `x-apify-container-server-readiness-probe` header. For better resource efficiency, consider checking for this header and returning a simple response early, rather than processing it as a full request. This optimization is particularly useful for resource-intensive Actors.
63
+
:::tip
64
+
The Apify platform performs readiness checks by sending GET requests to `/` with the `x-apify-container-server-readiness-probe` header. For better resource efficiency, consider checking for this header and returning a simple response early, rather than processing it as a full request. This optimization is particularly useful for resource-intensive Actors.
65
+
:::
64
66
65
-
```jsx
67
+
```js
66
68
app.get('*', (req, res) => {
67
69
if (req.headers['x-apify-container-server-readiness-probe']) {
68
70
console.log('Readiness probe');
@@ -73,27 +75,27 @@ app.get('*', (req, res) => {
73
75
74
76
### Step 3: Test your Actor locally
75
77
76
-
Once you’ve added the Actor logic, you can test your Actor locally with the following command:
78
+
Once you’ve added the Actor logic, test your Actor locally with the following command:
77
79
78
-
```jsx
80
+
```bash
79
81
apify run
80
82
```
81
83
82
-
Now, you can check that your server is running. For example, check your `/health` endpoint, or any other alternative.
84
+
Now, check that your server is running. Check one of your endpoints, for example `/health`.
83
85
84
86
### Step 4: Deploy your Actor to Apify
85
87
86
88
You can now push your Actor to [Apify Console](https://console.apify.com/) with the following command:
87
89
88
-
```jsx
90
+
```bash
89
91
apify push
90
92
```
91
93
92
94
If you’re doing `apify push` for the first time, first run `apify login`. It authenticates your Apify account and saves your credentials locally.
93
95
94
96
### Step 5: Run your Actor
95
97
96
-
After the deployment of your Actor, you’ll see a similar output in the terminal:
98
+
After pushing your Actor to the platform, in the terminal you’ll see an output similar to this:
97
99
98
100
```bash
99
101
2025-10-03T07:57:13.671Z ACTOR: Build finished.
@@ -102,11 +104,11 @@ Actor detail https://console.apify.com/actors/aOcUYdkQ28ResWFF9
102
104
Success: Actor was deployed to Apify cloud and built there.
103
105
```
104
106
105
-
You can click the “Actor detail” link, or go to `Apify Console > My Actors`, and click on your Actor. Now, click on the Settings tab, and enable **Actor Standby**:
107
+
You can click the **Actor detail** link, or go to **Apify Console > My Actors**, and click on your Actor. Now, click on the Settings tab, and enable **Actor Standby**:
Actors can run in two modes: as batch processing jobs that execute a single task and stop, or in **Standby mode** as a web server. For use cases like deploying an API that needs to respond to incoming requests in real-time, Standby mode is the best choice. It keeps your Actor running continuously and ready to handle HTTP requests like a standard web server.
112
114
@@ -116,7 +118,7 @@ Once you’ve saved the settings, go to the **Standby** tab, and click the **Tes
116
118
117
119
## Next steps
118
120
119
-
Ready to **monetize your Actor and start earning**? Check out these guides:
121
+
Ready to monetize your Actor and start earning? Check out these guides:
120
122
121
123
-[Set up monetization for your Actor](https://docs.apify.com/platform/actors/publishing/monetize)
122
124
-[Publish your Actor on Apify Store](https://docs.apify.com/platform/actors/publishing/publish)
0 commit comments