Apify and Crawlee Official Forum

Updated 3 months ago

How to setup pay per results

Hello boys and girls,

I'm thinking of switching an actor to pay per results, i didn't find any explicit exemple using the SDK, I setup the dataset unit name to my-actor-results

will this be enough using python ?

dataset_client = await Actor.open_dataset(name=β€˜my-actor-results')
await dataset_client.push_data(data)

Or should I also save results in default output dataset like:

await Actor.push_data(data)

What is the dataset unit name used for ? is it the name of dataset where actor output should be saved instead of default dataset of a run ?
2
S
m
S
8 comments
maybe you can help the fellow developer friend πŸ™‚
I am using just a dataset.push and also you can always try πŸ™‚
what do you mean try ? how to make sure users are being charged for results if it's not set to the right dataset ^^ Do you use dataset.push on the dataset unit name you setup when publishing your actor to the store ?
can we have a definitive answer , instead of "try" and risk being with a negative balance for the actor because the pay per results is badly setup ?
just advanced to level 2! Thanks for your contributions! πŸŽ‰
My question is prettry straight forward, When setting an actor on the store , should i use await Actor.push_data() to save results on the default dataset for each run Or do i have to create a dataset with the same dataset unit name (defined on the platform when publishing an actor to the store with pay per results pricing plan) dataset_client = await Actor.open_dataset(name=β€˜my-actor-results')await dataset_client.push_data(data)
Hey , PPR actors need to push items to their default dataset in order to charge users.

Generally actors should push to default datasets (with await Actor.push_data()) so that one run's results don't get mixed with results from other runs.
Add a reply
Sign up and join the conversation on Discord