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.mdx
+73-4Lines changed: 73 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,9 @@ sidebar_position: 2
9
9
10
10
---
11
11
12
+
importTabsfrom'@theme/Tabs';
13
+
importTabItemfrom'@theme/TabItem';
14
+
12
15
Apify Store allows you to monetize your web scraping and automation projects by publishing them as Paid Actors. This guide explains the available pricing models and how to get started.
13
16
14
17
## Pricing models
@@ -17,8 +20,8 @@ Actors in Apify Store can be published under one of the following pricing models
17
20
18
21
1.**Free**: Users can run the Actor without any additional charges beyond the platform usage costs generated by the Actor.
19
22
2.**Rental**: Users pay for the platform usage costs. However, after a trial period, they need to pay a flat monthly fee to the developer to continue using the Actor.
20
-
3.**Pay per result**: Users don't pay for the platform usage costs. Instead, they pay the developer based on the number of results produced by the Actor.
21
-
4.**Pay per event**: Users don't pay for the platform usage cost the Actor generates. Instead, they pay based on specific events that are programmatically triggered from the Actor's source code. These events are defined by the developer and can include actions such as generating a single result or starting an Actor.
23
+
3.**Pay per result (PPR)**: Users don't pay for the platform usage costs. Instead, they pay the developer based on the number of results produced by the Actor.
24
+
4.**Pay per event (PPE)**: Users don't pay for the platform usage cost the Actor generates. Instead, they pay based on specific events that are programmatically triggered from the Actor's source code. These events are defined by the developer and can include actions such as generating a single result or starting an Actor.
22
25
23
26
### Rental pricing model
24
27
@@ -71,22 +74,88 @@ You make your Actor pay-per-result and set the price to be $1/1,000 results. Dur
71
74
Your profit is computed only from the first two users, since they are on Apify paid plans. The revenue for the first user is $50 and for the second $20, i.e., total revenue is $70. The total underlying cost is _$5 + $2 = $7_. Since your profit is 80% of the revenue minus the cost, it would be _0.8 * 70 - 7 = $49_.
72
75
</details>
73
76
74
-
#### Best practices for Pay-per-results Actors
77
+
#### Best practices for PPR Actors
75
78
76
79
To ensure profitable operation:
77
80
78
81
- Set memory limits in your [`actor.json`](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) file to control platform usage costs
79
82
- Implement the `ACTOR_MAX_PAID_DATASET_ITEMS` check to prevent excess result generation
80
83
- Test your Actor with various result volumes to determine optimal pricing
81
84
85
+
### Pay-per-event pricing model
86
+
87
+
The pay-per-event pricing model offers a flexible monetization option for Actors on Apify Store. Unlike the pay-per-result, PPE allows you to charge users based on specific events triggered programmatically by your Actor's code.
88
+
89
+
#### PPE vs PPR
90
+
91
+
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.
92
+
93
+
For a detailed comparison of pricing models, refer to our [user-facing documentation](/platform/actors/running/actors-in-store).
94
+
95
+
#### How is profit computed
96
+
97
+
Your profit is calculated as follows:
98
+
99
+
`profit = (0.8 * revenue) - platform costs`
100
+
101
+
where:
102
+
103
+
-_Revenue_: The amount charged for events via the PPE [API](/api/v2/post-charge-run) or through [JS](/sdk/js/reference/class/Actor#charge)/[Python](/sdk/python/reference/class/Actor#charge) SDK. You receive 80% of this revenue.
104
+
-_Platform costs_: The underlying platform usage costs for running the Actor, calculated using the same unit pricing as PPR.
105
+
106
+
Only paid user activity is included in profit calculations.
107
+
108
+
#### How to set pricing for PPE
109
+
110
+
1._Understand your costs_: Analyze resource usage (e.g CPU, memory, proxies, external APIs) and identify cost drivers
111
+
1._Define clear events_: break your Actor's functionality into measurable, chargeable events.
112
+
1._Common use cases_:
113
+
1._For scraping_: combine Actor start and dataset items pricing to reflect setup and per-result cost.
114
+
1._Beyond scraping_: Account for intergrations with external systems or external API calls.
115
+
1._External API costs_: Account for additional processing costs.
116
+
1._Test your pricing_: Run your Actor and analyze cost-effectiveness using a special dataset.
117
+
1._Communicate value_: Ensure pricing reflects the value provided and is competetive.
118
+
119
+
#### Best practices for PPE Actors
120
+
121
+
- Set memory limits in your [`actor.json`](/platform/actors/development/actor-definition/actor-json) file to control platform usage costs
122
+
- Avoid duplicate charges by not calling the start Actor event during migration.
123
+
- Ensure users are not charged beyond their set maximum. The [`ChargingManager`](https://github.com/metalwarrior665/actor-charge-manager-poc) or our SDKs ([JS](/sdk/js/reference/class/ChargingManager) and [Python](/sdk/python/reference/class/ChargingManager)) can handle this logic.
124
+
- Use idempotency keys in API calls to prevent double charges.
125
+
- Try to limit the number of evernt. Fewer events makes it easier for users to understand your pricing.
126
+
- Try to make your event have tangible artifacts that users can see and understand (this might be not possible when using external APIs) i.e:
127
+
- Get a record
128
+
- Save it to dataset
129
+
- etc.
130
+
131
+
:::note `ChargingManager` usage
132
+
133
+
Use our [`ChargingManager`](https://github.com/metalwarrior665/actor-charge-manager-poc) or SDKs ([JS](/sdk/js/reference/class/ChargingManager) and, [Python](/sdk/python/reference/class/ChargingManager) 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.
134
+
135
+
You can also choose not to use it, but then you must handle API integration and possible edge cases manually. You can use `ChargingManager` code as a reference.
136
+
137
+
:::
138
+
82
139
## Setting up monetization
83
140
84
141
Navigate to your [Actor page](https://console.apify.com/actors?tab=my) in Apify Console, choose Actor that you want to monetize, and select the Publication tab.
0 commit comments