Skip to content

Commit 6cae28f

Browse files
committed
docs: add new section regarding PPE based on alpha PPE docs
1 parent 8b913f6 commit 6cae28f

File tree

1 file changed

+51
-3
lines changed

1 file changed

+51
-3
lines changed

sources/platform/actors/publishing/monetize.mdx

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Actors in Apify Store can be published under one of the following pricing models
1717

1818
1. **Free**: Users can run the Actor without any additional charges beyond the platform usage costs generated by the Actor.
1919
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.
20+
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.
21+
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.
2222

2323
### Rental pricing model
2424

@@ -71,14 +71,62 @@ You make your Actor pay-per-result and set the price to be $1/1,000 results. Dur
7171
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_.
7272
</details>
7373

74-
#### Best practices for Pay-per-results Actors
74+
#### Best practices for PPR Actors
7575

7676
To ensure profitable operation:
7777

7878
- Set memory limits in your [`actor.json`](https://docs.apify.com/platform/actors/development/actor-definition/actor-json) file to control platform usage costs
7979
- Implement the `ACTOR_MAX_PAID_DATASET_ITEMS` check to prevent excess result generation
8080
- Test your Actor with various result volumes to determine optimal pricing
8181

82+
### Pay-per-event pricing model
83+
84+
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.
85+
86+
#### PPE vs PPR
87+
88+
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.
89+
90+
For a detailed comparison of pricing models, refer to our [user-facing documentation](/platform/actors/running/actors-in-store).
91+
92+
#### How is profit computed
93+
94+
Your profit is calculated as follows:
95+
96+
`profit = (0.8 * revenue) - platform costs`
97+
98+
where:
99+
100+
- _Revenue_: The amount charged for events via the PPE API. You receive 80% of this revenue.
101+
- _Platform costs_: The underlying platform usage costs for running the Actor, calculated using the asme unit pricing as PPR.
102+
103+
Only paid user activity is included in profit calculations.
104+
105+
#### How to set pricing for PPE
106+
107+
1. _Understand your costs_: Analyze resource usage (e.g CPU, memory, proxies, external APIs) and identify cost drivers
108+
1. _Define clear events_: break your Actor's functionality into measurable, chargeable events.
109+
1. _Common use cases_:
110+
1. _For scraping_: combine Actor start and dataset items pricing to reflect setup and per-result cost.
111+
1. _Beyond scraping_: Account for intergrations with external systems or external API calls.
112+
1. _External API costs_: Account for additional processing costs.
113+
1. _Test your pricing_: Run your Actor and analyze cost-effectiveness using a special dataset.
114+
1. _Communicate value_: Ensure pricing reflects the value provided and is competetive.
115+
116+
#### Best practices for PPE Actors
117+
118+
- Avoid duplicate charges by not calling the start Actor event during migration.
119+
- Ensure users are not charged beyond their set maximum. The [`ChargingManager`](https://github.com/metalwarrior665/actor-charge-manager-poc) can handle this logic.
120+
- Use idempotency keys in API calls to prevent double charges.
121+
122+
:::note `ChargingManager` usage
123+
124+
Use our [`ChargingManager`](https://github.com/metalwarrior665/actor-charge-manager-poc) to simplify PPE implementation into your Actor. This tool can handle pricing, usage tracking, idempotency keys, API errors, and, event charging via an API.
125+
126+
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.
127+
128+
:::
129+
82130
## Setting up monetization
83131

84132
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

Comments
 (0)