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

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4client = ApifyClient("<YOUR_API_TOKEN>")
5
6# Prepare the Actor input
7run_input = {
8    "action": "scrapeProfiles",
9    "scrapeProfiles.profileList": ["zuck"],
10    "scrapeFriendships.profile": "zuck",
11    "scrapeFriendships.friendshipType": "followers",
12    "scrapeCommentsOfPost.url": "https://www.instagram.com/p/CwsgvUlLtEn/",
13    "scrapeLikesOfPost.url": "https://www.instagram.com/p/CwsgvUlLtEn/",
14    "scrapePostsOfUser.profile": "https://www.instagram.com/zuck",
15    "proxy": {
16        "useApifyProxy": True,
17        "apifyProxyGroups": ["RESIDENTIAL"],
18    },
19    "minDelay": 1,
20    "maxDelay": 15,
21}
22
23# Run the Actor and wait for it to finish
24run = client.actor("curious_coder/instagram-scraper").call(run_input=run_input)
25
26# Fetch and print Actor results from the run's dataset (if there are any)
27print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
28for item in client.dataset(run["defaultDatasetId"]).iterate_items():
29    print(item)
30
31# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start
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