Skip to main content

Charge events in run

POST 

/v2/actor-runs/:runId/charge

Clients Apify API Python Client ReferencePython Apify API JavaScript Client ReferenceJavaScriptCharge for events in the run of your pay per event Actor. The event you are charging for must be one of the configured events in your Actor. If the Actor is not set up as pay per event, or if the event is not configured, the endpoint will return an error. The endpoint must be called from the Actor run itself, with the same API token that the run was started with.

Learn more about pay-per-event pricing

For more details about pay-per-event (PPE) pricing, refer to our PPE documentation.

Request

Responses

The charge was successful. Note that you still have to make sure in your Actor that the total charge for the run respects the maximum value set by the user, as the API does not check this. Above the limit, the charges reported as successful in API will not be added to your payouts, but you will still bear the associated costs. Use the Apify charge manager or SDK to avoid having to deal with this manually.