Actor picture

Instagram Profile Scraper

zuzka/instagram-profile-scraper

Scrape all Instagram profile info. Add one or more Instagram usernames and extract followers & follows count, URLs, bio, posts, likes, counts, channel, duration, highlight reel, and more. Download structured data in JSON, CSV, XML, Excel, and HTML to use in applications, reports, and spreadsheets.

No credit card required

Author's avatarZuzka Pelechová
  • Modified
  • Users5,137
  • Runs42,625
Actor picture
Instagram Profile Scraper

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running actors via the API in Apify Docs.

const { ApifyClient } = require('apify-client');

// Initialize the ApifyClient with API token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare actor input
const input = {
    "usernames": [
        "apifytech"
    ]
};

(async () => {
    // Run the actor and wait for it to finish
    const run = await client.actor("zuzka/instagram-profile-scraper").call(input);

    // Fetch and print actor results from the run's dataset (if any)
    console.log('Results from dataset');
    const { items } = await client.dataset(run.defaultDatasetId).listItems();
    items.forEach((item) => {
        console.dir(item);
    });
})();