# Rental to pay-per-event calculator (`apify/rental-to-pay-per-event-calculator`) Actor

Helps owners of rental Actors migrate to the pay-per-event pricing model.

- **URL**: https://apify.com/apify/rental-to-pay-per-event-calculator.md
- **Developed by:** [Apify](https://apify.com/apify) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 197 total users, 81 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Rental to pay-per-event calculator

Helps owners of rental Actors migrate to the [pay-per-event pricing model](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event). The Actor analyzes your Actor's historical usage data to generate accurate pricing estimates which you can then interactively explore further in the [Rental to pay-per-event calculator](https://rental-to-pay-per-event-calculator.apify.tools/).

> ⚠️ **Before you run this tool, make sure:**
>
> - You are the owner of the Actor
> - The Actor is a rental Actor that produces results during a run
> - The Actor has sufficient historical usage data
>
> If your Actor doesn't meet these criteria, the pricing estimates won't be meaningful. Reach out to our DevRel team on [Discord](https://discord.com/invite/QfDmA7RGFu) (#project-rentals) or at <community@apify.com> for help estimating your prices, or get inspired in Apify Store by prices of similar Actors.

### How to use

1. Enter the full names of your rental Actors (e.g. `apify/instagram-scraper`)

   You can copy each name directly from the Actor's page in Apify Console.

   ![Actor name copy button](https://api.apify.com/v2/key-value-stores/3apV6kVSuNZgEYhpb/records/copy-example.png)

   Leave empty (or `{}` in JSON mode) to include all your rental Actors.

2. Run the Actor

   ⚠️ **Set Actor memory based on your number of Actors:**

   - 1 GB (default, covers 95% of cases)
   - 2 GB (100+ Actors, or 20+ popular Store Actors)
   - 4 GB in rare cases

3. Switch to the **Output** tab

   ![Output tab](https://api.apify.com/v2/key-value-stores/3apV6kVSuNZgEYhpb/records/output.png)

4. Switch to **JSON** format

   ![JSON format](https://api.apify.com/v2/key-value-stores/3apV6kVSuNZgEYhpb/records/json.png)

5. Select all of the JSON and copy it (Ctrl+C / Cmd+C)

6. Paste it into the [Rental to pay-per-event calculator](https://rental-to-pay-per-event-calculator.apify.tools/)

<br>

The Rental to pay-per-event calculator uses all data available to Apify for your Actor, which leads to more accurate pricing estimates than you could compute manually. In the calculator, you can:

- Compare projected pay-per-event earnings against your current rental profit — **dead rentals** (subscribers who pay but never run the Actor) are excluded from this calculation
- See how event pricing affects your pay-per-event profit
- Analyze user impact — see which of your users would pay significantly more or less under the new pricing; high-volume users are ideal candidates for custom price overrides, and our DevRel team on [Discord](https://discord.com/invite/QfDmA7RGFu) (#project-rentals) or at <community@apify.com> is happy to help you retain them
- Explore growth projections for your Actor under pay-per-event pricing

# Actor input Schema

## `actorNames` (type: `array`):

List of Actor full names for which to generate stats. Expected format "username/actor-name" (e.g. apify/instagram-scraper). Leave empty to collect all your public rental Actors.

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("apify/rental-to-pay-per-event-calculator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("apify/rental-to-pay-per-event-calculator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call apify/rental-to-pay-per-event-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apify/rental-to-pay-per-event-calculator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/yp0UJXslEFoM2uYEY/builds/hd3utqDelkIkxr8dd/openapi.json
