Pricing
from $10.00 / 1,000 results
Instagram Profile & Post Scraper
A Python-based Instagram profile scraper that accepts a username or profile URL and extracts public profile details along with complete post information. The tool normalizes and outputs clean, post-level data ready for analysis, CSV/JSON export, or Apify dataset integration.
Pricing
from $10.00 / 1,000 results
Rating
0.0
(0)
Developer
Actor stats
0
Bookmarked
3
Total users
0
Monthly active users
a month ago
Last modified
Categories
Share
Instagram Profile Scraper
This project scrapes public Instagram profiles using a username or profile URL and extracts complete post-level information in a structured format.
The scraper is designed for data analysis, research, and automation pipelines and outputs clean, flattened data ready for storage or further processing.
β¨ Features
-
Scrape Instagram profiles using:
- β
Username (e.g.
jamshaid_ds) - β
Profile URL (e.g.
https://www.instagram.com/jamshaid_ds)
- β
Username (e.g.
-
Extract profile-level data
-
Extract all available post information
-
Automatically normalize nested data
-
Export results as:
- CSV
- JSON
- Apify Dataset (Actor.push_data)
π Extracted Profile Information
For each Instagram profile:
usernamefull_nameavatar_urlbiowebsitefollowersfollowingposts_countis_private
πΈ Extracted Post Information
For each post:
image_urlcaptiondownload_linkposted_atpost_type(image / video / reel)
Each row in the final dataset represents one post.
π οΈ Tech Stack
- Python 3.10+
- Pandas
- Async scraping
- Apify Actor SDK (optional)
- CSV / JSON data handling
π Usage
1οΈβ£ Install Dependencies
$pip install-r requirements.txt
2οΈβ£ Provide Input
You can pass either:
- Username
jamshaid_ds
- Profile URL
https://www.instagram.com/jamshaid_ds/
The scraper automatically extracts the username from the URL if needed.
3οΈβ£ Run the Scraper
$python main.py
π€ Output Format
CSV Output
username,full_name,followers,following,image_url,caption,posted_at,post_type
JSON / Apify Dataset Output
{"username":"@jamshaid_ds","full_name":"Jamshaid Arif","image_url":"https://...","caption":"CSLB SCRAPER...","posted_at":"2025-10-22 08:07:48","post_type":"image"}
π Data Normalization Logic
posts_datais converted from string β dictionary- Nested post data is flattened using
pandas.json_normalize - Final dataset is post-level, not profile-level
This ensures compatibility with:
- Databases (PostgreSQL, MySQL)
- Analytics pipelines
- Apify datasets
π¦ Apify Integration (Optional)
If running as an Apify Actor:
await Actor.push_data(df_final.to_dict(orient="records"))
Each post is pushed as a separate dataset item.
β οΈ Limitations
- Only public profiles are supported
- Private accounts cannot be scraped
- Instagram rate limits may apply
- This tool does not bypass authentication
π Disclaimer
This project is for educational and research purposes only. Users are responsible for complying with Instagramβs Terms of Service and applicable laws.
