Pay Per Event Example avatar
Pay Per Event Example

Pricing

Pay per event

Go to Store
Pay Per Event Example

Pay Per Event Example

lukaskrivka/pay-per-event-example

Developed by

Lukáš Křivka

Maintained by Community

Example usage of the new Pay-per-event billing model.

0.0 (0)

Pricing

Pay per event

1

Monthly users

3

Runs succeeded

>99%

Last modified

4 months ago

You can access the Pay Per Event Example programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1{
2  "openapi": "3.0.1",
3  "info": {
4    "version": "0.0",
5    "x-build-id": "LEMB1MgDBwG7ra71G"
6  },
7  "servers": [
8    {
9      "url": "https://api.apify.com/v2"
10    }
11  ],
12  "paths": {
13    "/acts/lukaskrivka~pay-per-event-example/run-sync-get-dataset-items": {
14      "post": {
15        "operationId": "run-sync-get-dataset-items-lukaskrivka-pay-per-event-example",
16        "x-openai-isConsequential": false,
17        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
18        "tags": [
19          "Run Actor"
20        ],
21        "requestBody": {
22          "required": true,
23          "content": {
24            "application/json": {
25              "schema": {
26                "$ref": "#/components/schemas/inputSchema"
27              }
28            }
29          }
30        },
31        "parameters": [
32          {
33            "name": "token",
34            "in": "query",
35            "required": true,
36            "schema": {
37              "type": "string"
38            },
39            "description": "Enter your Apify token here"
40          }
41        ],
42        "responses": {
43          "200": {
44            "description": "OK"
45          }
46        }
47      }
48    },
49    "/acts/lukaskrivka~pay-per-event-example/runs": {
50      "post": {
51        "operationId": "runs-sync-lukaskrivka-pay-per-event-example",
52        "x-openai-isConsequential": false,
53        "summary": "Executes an Actor and returns information about the initiated run in response.",
54        "tags": [
55          "Run Actor"
56        ],
57        "requestBody": {
58          "required": true,
59          "content": {
60            "application/json": {
61              "schema": {
62                "$ref": "#/components/schemas/inputSchema"
63              }
64            }
65          }
66        },
67        "parameters": [
68          {
69            "name": "token",
70            "in": "query",
71            "required": true,
72            "schema": {
73              "type": "string"
74            },
75            "description": "Enter your Apify token here"
76          }
77        ],
78        "responses": {
79          "200": {
80            "description": "OK",
81            "content": {
82              "application/json": {
83                "schema": {
84                  "$ref": "#/components/schemas/runsResponseSchema"
85                }
86              }
87            }
88          }
89        }
90      }
91    },
92    "/acts/lukaskrivka~pay-per-event-example/run-sync": {
93      "post": {
94        "operationId": "run-sync-lukaskrivka-pay-per-event-example",
95        "x-openai-isConsequential": false,
96        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
97        "tags": [
98          "Run Actor"
99        ],
100        "requestBody": {
101          "required": true,
102          "content": {
103            "application/json": {
104              "schema": {
105                "$ref": "#/components/schemas/inputSchema"
106              }
107            }
108          }
109        },
110        "parameters": [
111          {
112            "name": "token",
113            "in": "query",
114            "required": true,
115            "schema": {
116              "type": "string"
117            },
118            "description": "Enter your Apify token here"
119          }
120        ],
121        "responses": {
122          "200": {
123            "description": "OK"
124          }
125        }
126      }
127    }
128  },
129  "components": {
130    "schemas": {
131      "inputSchema": {
132        "type": "object",
133        "properties": {
134          "chargeCount": {
135            "title": "How many events to charge for",
136            "type": "integer",
137            "description": "Maximum number of requests that can be made by this crawler.",
138            "default": 100
139          }
140        }
141      },
142      "runsResponseSchema": {
143        "type": "object",
144        "properties": {
145          "data": {
146            "type": "object",
147            "properties": {
148              "id": {
149                "type": "string"
150              },
151              "actId": {
152                "type": "string"
153              },
154              "userId": {
155                "type": "string"
156              },
157              "startedAt": {
158                "type": "string",
159                "format": "date-time",
160                "example": "2025-01-08T00:00:00.000Z"
161              },
162              "finishedAt": {
163                "type": "string",
164                "format": "date-time",
165                "example": "2025-01-08T00:00:00.000Z"
166              },
167              "status": {
168                "type": "string",
169                "example": "READY"
170              },
171              "meta": {
172                "type": "object",
173                "properties": {
174                  "origin": {
175                    "type": "string",
176                    "example": "API"
177                  },
178                  "userAgent": {
179                    "type": "string"
180                  }
181                }
182              },
183              "stats": {
184                "type": "object",
185                "properties": {
186                  "inputBodyLen": {
187                    "type": "integer",
188                    "example": 2000
189                  },
190                  "rebootCount": {
191                    "type": "integer",
192                    "example": 0
193                  },
194                  "restartCount": {
195                    "type": "integer",
196                    "example": 0
197                  },
198                  "resurrectCount": {
199                    "type": "integer",
200                    "example": 0
201                  },
202                  "computeUnits": {
203                    "type": "integer",
204                    "example": 0
205                  }
206                }
207              },
208              "options": {
209                "type": "object",
210                "properties": {
211                  "build": {
212                    "type": "string",
213                    "example": "latest"
214                  },
215                  "timeoutSecs": {
216                    "type": "integer",
217                    "example": 300
218                  },
219                  "memoryMbytes": {
220                    "type": "integer",
221                    "example": 1024
222                  },
223                  "diskMbytes": {
224                    "type": "integer",
225                    "example": 2048
226                  }
227                }
228              },
229              "buildId": {
230                "type": "string"
231              },
232              "defaultKeyValueStoreId": {
233                "type": "string"
234              },
235              "defaultDatasetId": {
236                "type": "string"
237              },
238              "defaultRequestQueueId": {
239                "type": "string"
240              },
241              "buildNumber": {
242                "type": "string",
243                "example": "1.0.0"
244              },
245              "containerUrl": {
246                "type": "string"
247              },
248              "usage": {
249                "type": "object",
250                "properties": {
251                  "ACTOR_COMPUTE_UNITS": {
252                    "type": "integer",
253                    "example": 0
254                  },
255                  "DATASET_READS": {
256                    "type": "integer",
257                    "example": 0
258                  },
259                  "DATASET_WRITES": {
260                    "type": "integer",
261                    "example": 0
262                  },
263                  "KEY_VALUE_STORE_READS": {
264                    "type": "integer",
265                    "example": 0
266                  },
267                  "KEY_VALUE_STORE_WRITES": {
268                    "type": "integer",
269                    "example": 1
270                  },
271                  "KEY_VALUE_STORE_LISTS": {
272                    "type": "integer",
273                    "example": 0
274                  },
275                  "REQUEST_QUEUE_READS": {
276                    "type": "integer",
277                    "example": 0
278                  },
279                  "REQUEST_QUEUE_WRITES": {
280                    "type": "integer",
281                    "example": 0
282                  },
283                  "DATA_TRANSFER_INTERNAL_GBYTES": {
284                    "type": "integer",
285                    "example": 0
286                  },
287                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
288                    "type": "integer",
289                    "example": 0
290                  },
291                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
292                    "type": "integer",
293                    "example": 0
294                  },
295                  "PROXY_SERPS": {
296                    "type": "integer",
297                    "example": 0
298                  }
299                }
300              },
301              "usageTotalUsd": {
302                "type": "number",
303                "example": 0.00005
304              },
305              "usageUsd": {
306                "type": "object",
307                "properties": {
308                  "ACTOR_COMPUTE_UNITS": {
309                    "type": "integer",
310                    "example": 0
311                  },
312                  "DATASET_READS": {
313                    "type": "integer",
314                    "example": 0
315                  },
316                  "DATASET_WRITES": {
317                    "type": "integer",
318                    "example": 0
319                  },
320                  "KEY_VALUE_STORE_READS": {
321                    "type": "integer",
322                    "example": 0
323                  },
324                  "KEY_VALUE_STORE_WRITES": {
325                    "type": "number",
326                    "example": 0.00005
327                  },
328                  "KEY_VALUE_STORE_LISTS": {
329                    "type": "integer",
330                    "example": 0
331                  },
332                  "REQUEST_QUEUE_READS": {
333                    "type": "integer",
334                    "example": 0
335                  },
336                  "REQUEST_QUEUE_WRITES": {
337                    "type": "integer",
338                    "example": 0
339                  },
340                  "DATA_TRANSFER_INTERNAL_GBYTES": {
341                    "type": "integer",
342                    "example": 0
343                  },
344                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
345                    "type": "integer",
346                    "example": 0
347                  },
348                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
349                    "type": "integer",
350                    "example": 0
351                  },
352                  "PROXY_SERPS": {
353                    "type": "integer",
354                    "example": 0
355                  }
356                }
357              }
358            }
359          }
360        }
361      }
362    }
363  }
364}

Pay Per Event Example OpenAPI definition

OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.

OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.

By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.

You can download the OpenAPI definitions for Pay Per Event Example from the options below:

If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.

You can also check out our other API clients:

Pricing

Pricing model

Pay per event 

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for each dataset of 1,000 items in the Actor outputs.

Actor start per 1 GB

$0.005

Flat fee for starting an Actor run for each 1 GB of memory.

Product result

$0.002

One product page scraped.