Instagram Scraper - All in one avatar
Instagram Scraper - All in one
Try for free

1 day trial then $30.00/month - No credit card required now

View all Actors
Instagram Scraper - All in one

Instagram Scraper - All in one

curious_coder/instagram-scraper
Try for free

1 day trial then $30.00/month - No credit card required now

Scrape instragram profiles, followers, posts, comments and get valuable information like email addresses, websites, post engagement insights, commented users, etc

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "action": "scrapeProfiles",
11    "scrapeProfiles.profileList": [
12        "zuck"
13    ],
14    "scrapeFriendships.profile": "zuck",
15    "scrapeFriendships.friendshipType": "followers",
16    "scrapeCommentsOfPost.url": "https://www.instagram.com/p/CwsgvUlLtEn/",
17    "scrapeLikesOfPost.url": "https://www.instagram.com/p/CwsgvUlLtEn/",
18    "scrapePostsOfUser.profile": "https://www.instagram.com/zuck",
19    "proxy": {
20        "useApifyProxy": true,
21        "apifyProxyGroups": [
22            "RESIDENTIAL"
23        ]
24    },
25    "minDelay": 1,
26    "maxDelay": 15
27};
28
29(async () => {
30    // Run the Actor and wait for it to finish
31    const run = await client.actor("curious_coder/instagram-scraper").call(input);
32
33    // Fetch and print Actor results from the run's dataset (if any)
34    console.log('Results from dataset');
35    console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36    const { items } = await client.dataset(run.defaultDatasetId).listItems();
37    items.forEach((item) => {
38        console.dir(item);
39    });
40})();
41
42// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community
Actor metrics
  • 203 monthly users
  • 5 stars
  • 83.4% runs succeeded
  • 1.7 days response time
  • Created in Jun 2023
  • Modified 5 days ago
Categories