Skip to content

Commit 4f8fda3

Browse files
docs: Improve docs based on feedback
1 parent ee8dd3b commit 4f8fda3

File tree

2 files changed

+64
-42
lines changed

2 files changed

+64
-42
lines changed

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

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The PPE pricing model offers a flexible monetization option for Actors on Apify
1616

1717
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.
1818

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).
19+
The details on how your cost is computed can be found in [Examples of a PPE pricing](#examples-of-a-ppe-pricing).
2020

2121
:::tip Additional benefits
2222

@@ -293,9 +293,9 @@ However, we acknowledge that some events don't produce tangible results (such as
293293

294294
Examples:
295295

296-
- _`scraped-product` event_: Each charge adds one product record to the dataset
297-
- _`processed-image` event_: Each charge adds one processed image to the dataset
298-
- _`extracted-review` event_: Each charge adds one review to the dataset
296+
- _`post` event_: Each charge adds one social media post to the dataset
297+
- _`profile` event_: Each charge adds one user profile to the dataset
298+
- _`processed-image` event_: Each charge adds one processed image to the dataset
299299
- _`ai-analysis` event_: Each charge processes one document through an AI workflow (no tangible output, but valuable processing)
300300

301301
:::note Additional context
@@ -308,91 +308,111 @@ You can display a status message or push a record to the dataset to inform users
308308

309309
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.
310310

311-
## Examples of a PPE pricing model
311+
## Example of a PPE pricing
312312

313-
### Example: simple PPE pricing
313+
You create a social media monitoring Actor with the following pricing:
314314

315-
- `scraped-product`: $0.01 per product - count every product record you return.
316-
- `scraped-product-detail`: $0.05 per detail - count every enriched product detail you provide.
315+
- `post`: $0.002 per post - count every social media post you extract.
316+
- `profile`: $0.001 per profile - count every user profile you extract.
317+
- `sentiment-analysis`: $0.005 per post - count every post analyzed for sentiment, engagement metrics, and content classification using external LLM APIs.
317318

318-
#### Pricing breakdown by user
319+
:::info Fixed pricing vs. usage-based pricing
320+
321+
You have two main strategies for charging AI-related operations:
322+
323+
1. **Fixed event pricing** (like `sentiment-analysis` above): Charge a fixed amount per operation, regardless of actual LLM costs
324+
2. **Usage-based pricing**: Use events like `llm-token` that charge based on actual LLM usage costs
325+
326+
Fixed pricing is simpler for users to predict, while usage-based pricing more accurately reflects your actual costs.
327+
328+
:::
329+
330+
### Pricing breakdown by user
319331

320332
<table>
321333
<thead>
322334
<tr>
323335
<th>User</th>
324336
<th style={{whiteSpace: 'nowrap'}}>Plan</th>
325-
<th style={{width: '40%'}}>Events</th>
337+
<th style={{width: '45%'}}>Events</th>
326338
<th style={{width: '35%'}}>Charges</th>
327339
<th style={{whiteSpace: 'nowrap'}}>Total</th>
328-
<th style={{whiteSpace: 'nowrap'}}>Cost</th>
340+
<th style={{whiteSpace: 'nowrap'}}>Platform cost</th>
329341
</tr>
330342
</thead>
331343
<tbody>
332344
<tr>
333345
<td>1</td>
334346
<td style={{whiteSpace: 'nowrap'}}>Paid plan</td>
335347
<td>
336-
<div style={{marginBottom: '4px'}}>1,000 × <code>scraped-product</code></div>
337-
<div>50 × <code>scraped-product-detail</code></div>
348+
<div style={{marginBottom: '4px'}}>5,000 × <code>post</code></div>
349+
<div style={{marginBottom: '4px'}}>50 × <code>profile</code></div>
350+
<div>2,000 × <code>sentiment-analysis</code></div>
338351
</td>
339352
<td>
340-
<div style={{marginBottom: '4px'}}>1,000 × $0.01 = $10.00</div>
341-
<div>50 × $0.05 = $2.50</div>
353+
<div style={{marginBottom: '4px'}}>5,000 × $0.002</div>
354+
<div style={{marginBottom: '4px'}}>50 × $0.001</div>
355+
<div>2,000 × $0.005</div>
342356
</td>
343-
<td><strong>$12.50</strong></td>
344-
<td>$3.20</td>
357+
<td><strong>$20.05</strong></td>
358+
<td>$2.50</td>
345359
</tr>
346360
<tr>
347361
<td>2</td>
348362
<td style={{whiteSpace: 'nowrap'}}>Paid plan</td>
349363
<td>
350-
<div style={{marginBottom: '4px'}}>500 × <code>scraped-product</code></div>
351-
<div>20 × <code>scraped-product-detail</code></div>
364+
<div style={{marginBottom: '4px'}}>3,000 × <code>post</code></div>
365+
<div style={{marginBottom: '4px'}}>20 × <code>profile</code></div>
366+
<div>1,000 × <code>sentiment-analysis</code></div>
352367
</td>
353368
<td>
354-
<div style={{marginBottom: '4px'}}>500 × $0.01 = $5.00</div>
355-
<div>20 × $0.05 = $1.00</div>
369+
<div style={{marginBottom: '4px'}}>3,000 × $0.002</div>
370+
<div style={{marginBottom: '4px'}}>20 × $0.001</div>
371+
<div>1,000 × $0.005</div>
356372
</td>
357-
<td><strong>$6.00</strong></td>
373+
<td><strong>$11.02</strong></td>
358374
<td>$1.50</td>
359375
</tr>
360376
<tr>
361377
<td>3</td>
362378
<td style={{whiteSpace: 'nowrap'}}>Free plan</td>
363379
<td>
364-
<div style={{marginBottom: '4px'}}>100 × <code>scraped-product</code></div>
365-
<div>5 × <code>scraped-product-detail</code></div>
380+
<div style={{marginBottom: '4px'}}>1,000 × <code>post</code></div>
381+
<div style={{marginBottom: '4px'}}>5 × <code>profile</code></div>
382+
<div>200 × <code>sentiment-analysis</code></div>
366383
</td>
367384
<td>
368-
<div style={{marginBottom: '4px'}}>100 × $0.01 = $1.00</div>
369-
<div>5 × $0.05 = $0.25</div>
385+
<div style={{marginBottom: '4px'}}>1,000 × $0.002</div>
386+
<div style={{marginBottom: '4px'}}>5 × $0.001</div>
387+
<div>200 × $0.005</div>
370388
</td>
371-
<td><strong>$1.25</strong></td>
389+
<td><strong>$3.01</strong></td>
372390
<td>$0.40</td>
373391
</tr>
374392
</tbody>
375393
</table>
376394

395+
Your profit and costs are computed **only from the first two users** since they are on Apify paid plans.
396+
377397
The platform usage costs are just examples, but you can see the actual costs in the [Computing your costs for PPE and PPR Actors](/platform/actors/publishing/monetize/pricing-and-costs#computing-your-costs-for-ppe-and-ppr-actors) section.
378398

379-
#### Revenue breakdown
399+
### Revenue breakdown
380400

381-
- **Revenue (paid users only)**: $12.50 + $6.00 = **$18.50**
382-
- **Underlying cost (paid users only)**: $3.20 + $1.50 = **$4.70**
383-
- **Profit**: 0.8 × $18.50 − $4.70 = **$10.10**
401+
- **Revenue (paid users only)**: $20.05 + $11.02 = **$31.07**
402+
- **Platform cost (paid users only)**: $2.50 + $1.50 = **$4.00**
403+
- **Profit**: 0.8 × $31.07 − $4.00 = **$20.86**
384404

385-
### Example: usage-indexed PPE pricing
405+
{/* ### Example: usage-indexed PPE pricing
386406
387407
- `llm-token-cent`: $0.02 per $0.01 LLM spend - emit one event for each cent billed by your LLM provider.
388408
389409
:::info Simplified example
390410
391411
For the simplicity of the example, we show only the LLM-token-cent event. In reality, you can charge for any event you want.
392412
393-
:::
413+
::: */}
394414

395-
#### Pricing breakdown by user
415+
{/* #### Pricing breakdown by user
396416
397417
<table>
398418
<thead>
@@ -456,7 +476,7 @@ The platform usage costs are just examples, but you can see the actual costs in
456476
- **Underlying cost (paid users only)**: $2.60 + $1.20 = **$3.80**
457477
- **Profit**: 0.8 × $75.00 − $3.80 = **$56.20**
458478
459-
This example illustrates the key trade-off of PPE pricing: while it's harder for users to predict exact costs upfront, it provides developers with a safer and more scalable revenue model that grows with actual usage.
479+
This example illustrates the key trade-off of PPE pricing: while it's harder for users to predict exact costs upfront, it provides developers with a safer and more scalable revenue model that grows with actual usage. */}
460480

461481
## Event names
462482

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Example scenarios:
203203

204204
This ensures that every run generates at least one result, guaranteeing that users are charged appropriately for using your Actor.
205205

206-
## Example of PPR pricing model
206+
## Example of PPR pricing
207207

208208
You make your Actor PPR and set the price to be _$1/1,000 results_. During the first month, three users use your Actor.
209209

@@ -217,7 +217,7 @@ You make your Actor PPR and set the price to be _$1/1,000 results_. During the f
217217
<th style={{width: '35%'}}>Results</th>
218218
<th style={{width: '45%'}}>Charges</th>
219219
<th style={{whiteSpace: 'nowrap'}}>Total</th>
220-
<th style={{whiteSpace: 'nowrap'}}>Cost</th>
220+
<th style={{whiteSpace: 'nowrap'}}>Platform cost</th>
221221
</tr>
222222
</thead>
223223
<tbody>
@@ -228,7 +228,7 @@ You make your Actor PPR and set the price to be _$1/1,000 results_. During the f
228228
<div>50,000 results</div>
229229
</td>
230230
<td>
231-
<div>50,000 ÷ 1,000 × $1.00 = $50.00</div>
231+
<div>50,000 ÷ 1,000 × $1.00</div>
232232
</td>
233233
<td><strong>$50.00</strong></td>
234234
<td>$5.00</td>
@@ -240,7 +240,7 @@ You make your Actor PPR and set the price to be _$1/1,000 results_. During the f
240240
<div>20,000 results</div>
241241
</td>
242242
<td>
243-
<div>20,000 ÷ 1,000 × $1.00 = $20.00</div>
243+
<div>20,000 ÷ 1,000 × $1.00</div>
244244
</td>
245245
<td><strong>$20.00</strong></td>
246246
<td>$2.00</td>
@@ -252,20 +252,22 @@ You make your Actor PPR and set the price to be _$1/1,000 results_. During the f
252252
<div>5,000 results</div>
253253
</td>
254254
<td>
255-
<div>5,000 ÷ 1,000 × $1.00 = $5.00</div>
255+
<div>5,000 ÷ 1,000 × $1.00</div>
256256
</td>
257-
<td><strong>$0.00</strong></td>
257+
<td><strong>$5.00</strong></td>
258258
<td>$0.50</td>
259259
</tr>
260260
</tbody>
261261
</table>
262262

263+
Your profit and costs are computed **only from the first two users** since they are on Apify paid plans.
264+
263265
The platform usage costs are just examples, but you can see the actual costs in the [Computing your costs for PPE and PPR Actors](/platform/actors/publishing/monetize/pricing-and-costs#computing-your-costs-for-ppe-and-ppr-actors) section.
264266

265267
### Revenue breakdown
266268

267269
- **Revenue (paid users only)**: $50.00 + $20.00 = **$70.00**
268-
- **Underlying cost (paid users only)**: $5.00 + $2.00 = **$7.00**
270+
- **Platform cost (paid users only)**: $5.00 + $2.00 = **$7.00**
269271
- **Profit**: 0.8 × $70.00 − $7.00 = **$49.00**
270272

271273
## Next steps

0 commit comments

Comments
 (0)