like-gold
like-gold•2y ago

Getting the metadata of a run, specifically Usage and Duration, with the js apify client or api?

I want to do this so that I can more easily choose the best way for me to run an actor (compare runs with different memory sizes for example) or even compare different actors that solve the same issues. I've been looking at the apify js client documentation & at the apify api documentation and didn't find anything, but maybe I just missed it?
3 Replies
MEE6
MEE6•2y ago
@levav just advanced to level 3! Thanks for your contributions! 🎉
Lukas Krivka
Lukas Krivka•2y ago
That's strange you couldn't find it, perhaps the docs is confusing? see https://docs.apify.com/api/client/js/reference/class/RunClient and use the .get method
Lukas Krivka
Lukas Krivka•2y ago
you get back the ActorRun object https://docs.apify.com/api/client/js/reference/interface/ActorRun which you also get back from other endpoints like .waitForFinish

Did you find this page helpful?