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/platform/actors/publishing/monetize/pay_per_event.mdx
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ sidebar_position: 3
12
12
importTabsfrom'@theme/Tabs';
13
13
importTabItemfrom'@theme/TabItem';
14
14
15
-
The pay-per-event pricing model offers a flexible monetization option for Actors on Apify Store. Unlike pay per result, PPE allows you to charge users based on specific events triggered programmatically by your Actor's code.
15
+
The PPE pricing model offers a flexible monetization option for Actors on Apify Store. Unlike pay per result, PPE allows you to charge users based on specific events triggered programmatically by your Actor's code.
16
16
17
17
PPE lets you define pricing for individual events. You can charge for specific events directly from your Actor using the [JS](/sdk/js/reference/class/Actor#charge)/[Python](/sdk/python/reference/class/Actor#charge) SDK, or by calling the [PPE charging API](/api/v2/post-charge-run) directly. Common events include Actor start, dataset item creation, and external API calls.
18
18
19
-
The details on how your cost is computed can be found in [Example of a pay-per-event pricing model](#example-of-a-pay-per-event-pricing-model).
19
+
The details on how your cost is computed can be found in [Example of a PPE pricing model](#example-of-a-ppe-pricing-model).
20
20
21
21
## How is profit computed
22
22
@@ -40,7 +40,7 @@ An Actor's negative net profit does not affect the positive profit of another Ac
40
40
41
41
:::
42
42
43
-
## How to set pricing for pay-per-event Actors
43
+
## How to set pricing for PPE Actors
44
44
45
45
1._Understand your costs_: Analyze resource usage (e.g CPU, memory, proxies, external APIs) and identify cost drivers
46
46
1._Define clear events_: break your Actor's functionality into measurable, chargeable events.
@@ -51,7 +51,7 @@ An Actor's negative net profit does not affect the positive profit of another Ac
51
51
1._Test your pricing_: Run your Actor and analyze cost-effectiveness using a special dataset.
52
52
1._Communicate value_: Ensure pricing reflects the value provided and is competitive.
53
53
54
-
## Best practices for pay-per-event Actors
54
+
## Best practices for PPE Actors
55
55
56
56
Use our SDKs (JS and, 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.
57
57
@@ -77,9 +77,9 @@ When using browser automation tools like Puppeteer or Playwright for web scrapin
77
77
78
78
:::
79
79
80
-
### Charge for "Actor start"
80
+
### Charge for `Actor start`
81
81
82
-
Charge for "Actor start" to prevent users from running your Actor for free.
82
+
Charge for `Actor start` to prevent users from running your Actor for free.
83
83
84
84
<TabsgroupId="main">
85
85
<TabItemvalue="JavaScript"label="JavaScript">
@@ -317,7 +317,7 @@ Try to limit the number of events. Fewer events make it easier for users to unde
317
317
318
318
For Actors that produce data, events should map to something concrete in the user's dataset or storage.
319
319
320
-
However, we acknowledge that some events don't produce tangible results (such as running AI workflows or processing external API calls). This flexibility is what makes pay-per-event pricing powerful. It gives you the freedom to charge for special operations, complex workflows, and unique value propositions.
320
+
However, we acknowledge that some events don't produce tangible results (such as running AI workflows or processing external API calls). This flexibility is what makes PPE pricing powerful. It gives you the freedom to charge for special operations, complex workflows, and unique value propositions.
321
321
322
322
Examples:
323
323
@@ -330,9 +330,9 @@ Examples:
330
330
331
331
If you're not using the Apify SDKs (JS/Python), you need to handle idempotency (ensuring the same operation produces the same result when called multiple times) manually to prevent charging the same event multiple times.
332
332
333
-
## Example of a pay-per-event pricing model
333
+
## Example of a PPE pricing model
334
334
335
-
You make your Actor pay-per-event and set the following pricing:
335
+
You make your Actor PPE and set the following pricing:
336
336
337
337
-_`actor-start` event_: $0.10 per start
338
338
-_`scraped-product` event_: $0.01 per product
@@ -356,9 +356,9 @@ Your profit is computed only from the first two users, since they are on Apify p
356
356
-_Total underlying cost_: $3.20 + $1.50 = $4.70
357
357
-_Your profit_: 80% of revenue minus costs = 0.8 × $25.20 - $4.70 = $15.46
358
358
359
-
## PPE event names
359
+
## Event names
360
360
361
-
To implement pay-per-event pricing, you need to define specific events in your Actor code. You can retrieve the list of available pricing event names using the [Get Actor](https://apify.com/docs/api/v2/act-get) API endpoint.
361
+
To implement PPE pricing, you need to define specific events in your Actor code. You can retrieve the list of available pricing event names using the [Get Actor](https://apify.com/docs/api/v2/act-get) API endpoint.
Copy file name to clipboardExpand all lines: sources/platform/actors/publishing/monetize/pay_per_result.mdx
+9-15Lines changed: 9 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,14 @@ import TabItem from '@theme/TabItem';
14
14
15
15
In this model, you set a price per 1,000 results. Users are charged based on the number of results your Actor produces and stores in the run's default dataset. Your profit is calculated as 80% of the revenue minus platform usage costs.
16
16
17
-
The details on how your cost is computed can be found in [Example of a pay-per-result pricing model](#example-of-a-pay-per-result-pricing-model).
17
+
The details on how your cost is computed can be found in [Example of a PPR pricing model](#example-of-a-ppr-pricing-model).
18
18
19
19
:::tip Additional benefits
20
20
21
-
Actors that implement pay-per-result pricing receive additional benefits, including increased visibility in the Apify Store and enhanced discoverability for users looking for monetized solutions.
21
+
Actors that implement PPR pricing receive additional benefits, including increased visibility in the Apify Store and enhanced discoverability for users looking for monetized solutions.
22
22
23
23
:::
24
24
25
-
## Pay-per-result (PPR) vs. pay-per-event (PPE)
26
-
27
-
Unlike PPR, which charges based on the number of results produced, PPE lets you define pricing for individual events. You can charge for specific events directly from your Actor by calling the PPE charging API. Common events include Actor start, dataset item creation, and external API calls.
28
-
29
-
If you're interested in learning more about PPE, check out the [Pay per event (PPE)](/platform/actors/publishing/monetize/pay-per-event) section.
30
-
31
25
## How is profit computed
32
26
33
27
Your profit is calculated from the mentioned formula:
@@ -37,11 +31,11 @@ Your profit is calculated from the mentioned formula:
37
31
where:
38
32
39
33
-_Revenue_: The amount charged for results via the PPR pricing API or through JS/Python SDK. You receive 80% of this revenue.
40
-
-_Platform costs_: The underlying platform usage costs for running the Actor, calculated in the same way as for PPE. For more details, visit the [Example of a pay-per-result pricing model](#example-of-a-pay-per-result-pricing-model) section.
34
+
-_Platform costs_: The underlying platform usage costs for running the Actor, calculated in the same way as for PPE. For more details, visit the [Example of a PPR pricing model](#example-of-a-ppr-pricing-model) section.
41
35
42
36
Only revenue and cost for Apify customers on paid plans are taken into consideration when computing your profit. Users on free plans are not reflected there.
43
37
44
-
## Best practices for pay-per-result Actors
38
+
## Best practices for PPR Actors
45
39
46
40
To ensure profitability, check the following best practices.
47
41
@@ -69,7 +63,7 @@ When using browser automation tools like [Puppeteer](https://pptr.dev/) or [Play
69
63
70
64
This check prevents your Actor from generating more results than the user has paid for, protecting both you and your users from unexpected costs.
71
65
72
-
The `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable contains the user-set limit on returned results for pay-per-results Actors. Do not exceed this limit. You can see the example implementation in the following code snippets.
66
+
The `ACTOR_MAX_PAID_DATASET_ITEMS` environment variable contains the user-set limit on returned results for PPR Actors. Do not exceed this limit. You can see the example implementation in the following code snippets.
0 commit comments