πŸ’» 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.

Instagram Detective

Python version License


πŸš€ 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:

NAMEKEY
Instagram ScraperπŸ”‘ (Required)

Steps:

  1. Go to Apify and create a free account.
  2. Get your API Token from your Apify account settings.
  3. Copy your API Token.

Instagram Detective

Instagram Detective

Instagram Detective

βš™οΈ 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

Instagram Detective


πŸ’» 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

TokIntel


πŸ“ 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 urls if the default directUrls fails).

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

DistributionVerified versionSupportedStatus
Kali Linux2026.2βœ…Working
ParrotOS7.3βœ…Working
Windows11βœ…Working
BackBox9βœ…Working
Arch Linux2026.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

Patreon Web site Facebook YouTube Twitter/X Instagram TryHackMe Ko-fi HackTheBox

πŸ’° Bitcoin Donations

Support the project with Bitcoin:

Address:

bc1qjd5pu8kmdqljun3qyw5e9mj4kdef9n8sutj7j4

Bitcoin QR

Thank you for your support! πŸ™

β˜•οΈ Support the project

If you like this tool, consider buying me a coffee:

Buy Me a Coffee

🌞 Subscriptions

Subscribe to: Jey Zeta

Kali Linux

from Peru, made in with by: Victor Bancayan

Β© 2026