Skip to content

Commit b9b8ec4

Browse files
docs: Improve synthetic start docs
1 parent e8cdd7c commit b9b8ec4

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

sources/platform/actors/publishing/monetize/pay_per_event.mdx

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -132,33 +132,21 @@ When using [Crawlee](https://crawlee.dev/), use `crawler.autoscaledPool.abort()`
132132

133133
## Best practices for PPE Actors
134134

135-
Use our SDKs ([JS](/sdk/js/) and, [Python](/sdk/python/) or use [`apify actor charge`](/cli/docs/next/reference#apify-actor-charge-eventname) when using our Apify CLI) to simplify PPE implementation into your Actor. This tool can handle pricing, usage tracking, idempotency keys, API errors, and, event charging via an API.
135+
Use our SDKs ([JS](/sdk/js/) and, [Python](/sdk/python/) or use [`apify actor charge`](/cli/docs/next/reference#apify-actor-charge-eventname) when using our Apify CLI) to simplify PPE implementation into your Actor. SDKs help you handle pricing, usage tracking, idempotency keys, API errors, and, event charging via an API. You can also choose not to use it, but then you must handle API integration and possible edge cases manually.
136136

137-
You can also choose not to use it, but then you must handle API integration and possible edge cases manually.
138-
139-
### Set memory limits
140-
141-
Set memory limits using `minMemoryMbytes` and `maxMemoryMbytes` in your [`actor.json`](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) file to control platform usage costs.
142-
143-
```json
144-
{
145-
"actorSpecification": 1,
146-
"name": "name-of-my-scraper",
147-
"version": "0.0",
148-
"minMemoryMbytes": 512,
149-
"maxMemoryMbytes": 1024,
150-
}
151-
```
137+
### Use synthetic start event `apify-actor-start`
152138

153-
:::note Memory requirements for browser-based scraping
139+
:::info TL;DR:
154140

155-
When using browser automation tools like Puppeteer or Playwright for web scraping, increase the memory limits to accommodate the browser's memory usage.
141+
We recommend using the synthetic Actor start event in PPE Actors. It benefits both you and your users.
156142

157143
:::
158144

159-
### Use synthetic start event `apify-actor-start`
145+
Starting an Actor takes time, and creates additional cost for the Actor creator, because the profit equals revenue minus platform costs.
160146

161-
This event is automatically charged by the Apify platform when an Actor is started or resurrected.
147+
One of the options to charge for the time spent on starting the Actor is to charge an “Actor start” event. Let’s say $1 for 1000 Actor starts. Unfortunately, this makes your Actor comparably expensive with other tools on the market (outside of [Apify Store](/platform/console/store)) that do not incur this startup cost.
148+
149+
We want to make it easier for Apify Store creators to stay competitive. To do that, we have the Apify Actor synthetic start event `apify-actor-start`.
162150

163151
Users of your Actor are charged one event for each GB of memory used by the Actor (at least one event per run). We _strongly_ suggest setting the price of this event to $0.0001 to remain competitive in the Store and attractive for your customers. If you define this event, you also save 5 seconds of Actor runtime from each Actor run, which won't be deducted from your payout profits.
164152

@@ -187,6 +175,26 @@ Your Actor might already have a start event defined, such as `actor-start` or an
187175

188176
If you want to use the synthetic start event, remove the existing start event from your Actor and add the synthetic start event in Apify Console.
189177

178+
### Set memory limits
179+
180+
Set memory limits using `minMemoryMbytes` and `maxMemoryMbytes` in your [`actor.json`](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) file to control platform usage costs.
181+
182+
```json
183+
{
184+
"actorSpecification": 1,
185+
"name": "name-of-my-scraper",
186+
"version": "0.0",
187+
"minMemoryMbytes": 512,
188+
"maxMemoryMbytes": 1024,
189+
}
190+
```
191+
192+
:::note Memory requirements for browser-based scraping
193+
194+
When using browser automation tools like Puppeteer or Playwright for web scraping, increase the memory limits to accommodate the browser's memory usage.
195+
196+
:::
197+
190198
### Charge for invalid input
191199

192200
Charge for things like URLs that appear valid but lead to errors (like 404s) since you had to open the page to discover the error. Return error items with proper error codes and messages instead of failing the entire Actor run.

0 commit comments

Comments
 (0)