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
@levav just advanced to level 3! Thanks for your contributions! 🎉
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
methodyou 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