Instagram Profile Scraper avatar
Instagram Profile Scraper

Pricing

$2.00 / 1,000 results

Go to Store
Instagram Profile Scraper

Instagram Profile Scraper

Developed by

Deepanshu Sharma

Deepanshu Sharma

Maintained by Community

A powerful Instagram scraper that extracts comprehensive profile information including biographical content and profile metrics. This actor effectively navigates Instagram's complex DOM structure to retrieve data reliably.

0.0 (0)

Pricing

$2.00 / 1,000 results

0

Total users

1

Monthly users

1

Last modified

4 hours ago

Instagram Profile Scraper A robust, reliable Instagram profile data scraper built with Apify and Playwright. This tool extracts comprehensive profile information from Instagram user accounts while respecting rate limits and handling errors gracefully. 📋 Features

Detailed Profile Data Extraction: Collects username, user ID, full name, biography, profile picture URL, post count, follower count, following count, and more Business Account Details: Captures business category, contact information, and other professional account details Multiple Extraction Methods: Implements several fallback methods to ensure data retrieval:

Instagram's shared data object Redux state extraction DOM-based scraping with enhanced bio extraction

Error Handling: Robust error recovery mechanisms to handle different Instagram page states Rate Limit Protection: Includes delays between requests to prevent hitting rate limits Proxy Support: Built-in proxy configuration for distributed scraping Cookie Authentication: Uses Instagram cookies for authentication

🔧 Prerequisites

Node.js (v14 or newer) Apify CLI Valid Instagram cookies (required for authentication)

🚀 Installation

Clone this repository: bashgit clone

Install dependencies: bashnpm install

Install Playwright browsers: bashnpx playwright install chromium

⚙️ Configuration Create an input.json file in the project root with your configuration: json{ "usernames": ["instagram", "username1", "username2"], "cookies": "YOUR_INSTAGRAM_COOKIES", "timeout": 60000, "proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] } } Input Parameters ParameterTypeRequiredDescriptionusernamesArrayYesList of Instagram usernames to scrapecookiesStringYesInstagram cookies string for authenticationtimeoutNumberNoPage load timeout in milliseconds (default: 60000)proxyObjectNoProxy configuration object Cookie Format The cookies parameter accepts the following formats:

Cookie string: Standard cookie format with name-value pairs separated by semicolons. JSON array: Array of cookie objects with name and value properties. JSON object: Object with cookie names as keys and cookie values as values.

Example cookie string: sessionid=1234567890abcdef; ds_user_id=1234567890; csrftoken=abcdefghijk; 🏃‍♂️ Usage Running Locally bashapify run -p Or with a custom input file: bashapify run -p --input=my-input.json Running on Apify Platform

Create a new Actor on Apify Deploy this code to the Actor Set up your input configuration Run the Actor

📤 Output The scraper outputs JSON objects with the following structure: json{ "username": "instagram", "full_name": "Instagram", "user_id": "123456789", "biography": "Bringing you closer to the people and things you love. ❤️", "biography_urls": ["https://example.com", "https://another-link.com"], "external_url": "https://about.instagram.com/", "is_private": false, "is_verified": true, "profile_pic_url": "https://instagram.com/path/to/profile/picture.jpg", "posts_count": 6950, "followers_count": 538 ⚠️ Important Notes

Authentication: Valid Instagram cookies are required for this scraper to work properly. Rate Limiting: Instagram may rate-limit excessive requests. Use proxies and reasonable delays between requests. Instagram Updates: Instagram frequently updates its website structure. If the scraper stops working, it may need updates to match Instagram's latest DOM structure. Private Profiles: The scraper can detect if a profile is private but cannot access full data for private profiles you don't follow.

📝 Legal Disclaimer Use this tool in compliance with Instagram's Terms of Service and respect users' privacy. This scraper is intended for legitimate data collection purposes only, such as market research or analytics. 🛠 Advanced Configuration Proxy Options json{ "proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" } } Or use your own proxy: json{ "proxy": { "url": "http://proxy.example.com:8080", "username": "username", "password": "password" } } Or specify components: json{ "proxy": { "protocol": "http", "hostname": "proxy.example.com", "port": 8080, "username": "username", "password": "password" } } 🤝 Contributing Contributions are welcome! Please feel free to submit a Pull Request. 📄 License This project is licensed under the MIT License - see the LICENSE file for details.