Get the dataset from the apify-js API client based on the actorRunId?
Is it possible? I can only find actorClient.lastRun() This seems an extremely obvious use case. I did find it here https://docs.apify.com/api/v2#/reference/actor-runs/run-collection/get-dataset but that seems to be for URL's only.
3 Replies
Hi @Moby
It is possible to get to the dataset based on runId :
Is this what you had in mind?
overseas-lavenderOP•2y ago
@Pepa J Thank you I figured it out, not entirely how you mentioned it though.
First of all I was referring to the "apify-client" Javascript client.
In that client, I think I got it to work by doing
const { items } = await apify.run(actorRunId).dataset().listItems()
Yep, thast is also a way. I am glad it works for you!