Apify and Crawlee Official Forum

Updated 4 months ago

Apify API not returning any data (Instagram User Scraper)

console.log(Starting loop for follower: ${follower});

// Run the actor and wait for it to complete
const run = await client.actor(process.env.APIFY_PAY_PER_USER_ACTOR).call(input);
console.log(Actor run started for follower: ${follower}. Dataset ID: ${run.defaultDatasetId});

if (!run.defaultDatasetId) {
console.error(No dataset ID returned for follower: ${follower});
continue;
}

// Delay to allow the dataset to populate
await new Promise(resolve => setTimeout(resolve, 10000)); // Wait 10 seconds

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(Number of items retrieved: ${items.length});

if (items.length === 0) {
console.log(No items found in the dataset for follower: ${follower});
} else {
console.log(Results from dataset for follower: ${follower}:);
items.forEach((item) => {
console.log(item);
});
}

output = Capacity for each follower: 3
Starting loop for follower: zuck
Server Working 8080
Live DB Connected
Actor run started for follower: zuck. Dataset ID: tvXHJZwO1tiEoJdf1
Number of items retrieved: 0
No items found in the dataset for follower: zuck
Data retrieval done for follower: zuck
d
A
P
4 comments
@dev__usman just advanced to level 1! Thanks for your contributions! πŸŽ‰
@Apify Marketing ?
Hi @dev__usman, this is weird, Does the Run you called, provided any results? Can you send me the Run id of the children Run to the persional message?
Add a reply
Sign up and join the conversation on Discord