π» Usage
August 6, 2026 Β· View on GitHub
π΅οΈββοΈ Instagram Detective
Instagram OSINT Framework to extract public profiles, posts, reels, comments, mentions, hashtags, and places from Instagram using the Apify API.
π Features
- π Profile Reconnaissance: Extract full Instagram profile data (bio, followers, following, posts count, etc.)
- π· Media Scraping: Scrape posts, reels, comments, mentions, hashtag details, and place details.
- β‘ Fast API-Based Checking: Powered by Apify's Instagram Scraper (
apify/instagram-scraper). - π JSON and TXT Report Generation: All results are saved locally with timestamps.
- π¨ Colored CLI Interface: Clean and professional terminal output.
- π Secure API Key Handling: Credentials stored in
.env. - π Batch Processing: Scan multiple URLs via TXT file.
- π Animated Progress: Live progress bar during scraping (with
alive-progress). - π‘ Automatic API Setup: Interactive onboarding via
--set-api.
π Prerequisites
- Python 3.8+
- Dependencies:
apify-client,python-dotenv,colorama,alive-progress
π API Key (Apify)
Instagram Detective uses the following API:
| NAME | KEY |
|---|---|
| Instagram Scraper | π (Required) |
Steps:
- Go to Apify and create a free account.
- Get your API Token from your Apify account settings.
- Copy your API Token.
βοΈ Configuration
You can set your API key at any time with:
python3 instagram_detective.py --set-api
Your key will be automatically saved in:
.env
π» Usage
πΉ Single target (profile)
python3 instagram_detective.py --profile https://www.instagram.com/jeyzetaoficial
πΉ Scrape posts from a profile
python3 instagram_detective.py --posts https://www.instagram.com/jeyzetaoficial --limit 50
Scrape reels
python3 instagram_detective.py --reels https://www.instagram.com/jeyzetaoficial --limit 20
Scrape comments from a post
python3 instagram_detective.py --comments https://www.instagram.com/p/DbfyigZltyo/ --limit 20
Scrape mentions
python3 instagram_detective.py --mentions https://www.instagram.com/jeyzetaoficial
Get hashtag details
python3 instagram_detective.py --hashtag https://www.instagram.com/explore/tags/travel/
Get place details
python3 instagram_detective.py --place https://www.instagram.com/explore/locations/7538318/copenhagen/
Search by query
python3 instagram_detective.py --search "travel" --search-type hashtag --limit 10
Batch processing from file
python3 instagram_detective.py --urls-file urls.txt --profile
urls.txt should contain one Instagram URL per line.
Show help
python3 instagram_detective.py -h
π Reports
All results are saved in the /reports/ directory.
Example file:
report_20260716_005435_bz8cve.json
report_20260716_005435_bz8cve.txt
Tip
Tip: Check the generated JSON report for advanced profile metadata not displayed in the terminal β for example, the full statistics object with account type, HD profile picture URLs, and more. The TXT report also contains the raw JSON dump for easy reading.
π¦ Installation
git clone https://github.com/HackUnderway/instagram_detective.git
cd instagram_detective
pip install -r requirements.txt
Warning
Disclaimer
This tool is intended for educational and OSINT research purposes only.
- Do not use for illegal activities.
- The developer is not responsible for any misuse or damage caused by this tool.
π§ Notes
The scraper extracts publicly available data from Instagram. For private accounts, it still retrieves basic profile metadata (username, bio, follower/following counts, profile picture, etc.) since this information is publicly visible. However, posts, reels, and comments from private accounts are not accessible.
Rate limits and usage costs apply. Apify charges $2.70 per 1,000 results on the Free plan. The free tier includes a limited number of credits; check your Apify balance before heavy usage.
A MISS or empty result may indicate:
- The URL is invalid or malformed.
- The account does not exist.
- Your Apify credits are exhausted.
- The actor expects a different input key (try
--input-key urlsif the defaultdirectUrlsfails).
The script defaults to directUrls as the input key. If you encounter issues, switch to urls with:
python3 instagram_detective.py --profile <URL> --input-key urls
The JSON report contains all available metadata, including fields not displayed in the terminal (e.g., statistics object, full profile picture URLs, account type, etc.). Always check the generated JSON for complete data.
The project is open to collaborators and partners.
π§ͺ Supported Systems
| Distribution | Verified version | Supported | Status |
|---|---|---|---|
| Kali Linux | 2026.2 | β | Working |
| ParrotOS | 7.3 | β | Working |
| Windows | 11 | β | Working |
| BackBox | 9 | β | Working |
| Arch Linux | 2026.08.01 | β | Working |
Support
For questions, bug reports, or suggestions, please contact: info@hackunderway.com
License
- Instagram Detective is licensed.
- See the LICENSE file for more information.
π¨βπ» Author
- Victor Bancayan - (CEO at Hack Underway)
π Links
π° Bitcoin Donations
Support the project with Bitcoin:
Address:
bc1qjd5pu8kmdqljun3qyw5e9mj4kdef9n8sutj7j4
βοΈ Support the project
If you like this tool, consider buying me a coffee:
π Subscriptions
Subscribe to: Jey Zeta
from
Peru, made in
with
by: Victor Bancayan
Β© 2026