Instagram Public Profile Intelligence — Ethical OSINT
InstaRecon is a command-line OSINT tool that collects and analyses publicly available Instagram profile intelligence entirely with local Python libraries — no paid AI APIs, no paid Instagram Graph API keys.
It fetches public profile metadata, analyses recent captions locally (topics, sentiment, emojis), scans for hidden contact/crypto data, inspects image EXIF, computes account-health metrics, and checks the username's footprint on other platforms — then exports everything to JSON, CSV, a formatted TXT report and a self-contained HTML report.
- ✨ Features
- 🏛 Architecture
- ⚙️ Installation
- 🚀 Usage
- 📁 Output
- 🍪 Optional Session Cookie
- 🔐 Ethics & Privacy
⚠️ Disclaimer- 👩💻 About the Author
- ❤️ Support the Project
- 📄 License
| Area | Details |
|---|---|
| Profile metadata | Username, full name, bio, profile-picture URL, account URL |
| Status | Private detection, verified badge, business account + category |
| Metrics | Followers, following, post count |
| Content | Recent post captions, hashtags, external bio links |
| Contact | Public business e-mail/phone only when explicitly published |
| Change monitoring | Every scan saves a baseline.json; the next scan diffs followers/bio/posts/verification/hashtags and reports what changed — --check mode is cron-friendly (exit code 3 = changes found, baseline never touched) |
| Bulk scanning | --bulk user1,user2,… or --bulk-file targets.txt — sequential multi-target runs (max 50) with per-target outcome tracking, per-target baselines and an aggregate reports/_bulk/summary.{json,csv,txt} |
| Exports | profile_data.json, profile_data.csv, report.txt, report.html |
| Module | What it does (100% local) |
|---|---|
core/extractor.py |
Regex harvest of hidden e-mails, international phone numbers, crypto wallets (BTC/ETH/LTC/DOGE/TRX), Telegram handles and WhatsApp links from bio + captions |
core/analyzer.py |
Top-10 non-stopwords ("topics"), sentiment polarity (TextBlob + offline fallback) and most-used emojis across the last 50 captions |
core/media_analyzer.py |
Downloads profile picture + last 5 images, extracts EXIF (camera, software, timestamps, GPS) with Pillow/piexif and reports when Instagram stripped it |
core/metrics.py |
Engagement rate, follow-ratio (follow-for-follow detector) and average days between posts |
core/similar.py |
Similar-accounts discovery — maps the target's niche neighbourhood using Instagram's own public "Suggested for you" list (requires your session cookie; see session section) |
core/risk.py |
Account risk score — explainable 0–100 heuristic (f4f ratio, engagement anomalies, posting cadence, contact/crypto leakage, risky link flags, scam-bio keywords; verification & published contact lower it) graded LOW / MODERATE / HIGH with every contributing factor listed |
core/pii.py |
Personal-info dossier — extracts person-descriptive facts the owner voluntarily published: name patterns, age/birth-year/birthday, locations (gazetteer + "based in X"), context-guarded occupations, relationship/family markers, associated @handles — each with source attribution (bio vs caption), mention count, confidence and a high/medium/low sensitivity grade so the panel doubles as an exposure assessment |
core/persona.py |
Persona & geo intelligence — frequency-ranked locations, offline language ID (14 languages via scripts + stopword fingerprints, with confidence margin), and timezone fit: every post's UTC timestamp is shifted across −12:00…+14:00 (half-hour steps) and scored against a waking-window model, reporting the best offsets with a 24-hour activity histogram |
core/link_scan.py |
Bio-link scanner — probes every published bio link: status, final destination, page title, response time and risk flags (shorteners, bare-IP hosts, punycode/homograph domains, insecure HTTP, redirect chains, suspicious TLDs) |
core/osint_bridge.py |
Passive HTTP probes for the same username on GitHub, Twitter/X, TikTok and Pinterest → "Username Footprint" table |
core/indicators.py |
Threat-indicator engine — a mini "YARA for profiles": 50,146 rules across five auditable tiers (see below) run locally against the bio, captions and fetched data. Every hit carries the rule id, its pack, an evidence snippet and a severity (info→critical); weighted hits roll up to a 0–100 indicator score with CLEAR/GUARDED/ELEVATED/SEVERE banding |
core/rulepacks.py |
50k+ rule data packs — seed lists × documented templates (brand/entity impersonation, refunds, KYC, jobs, giveaways, betting/crypto lures, government/courier fee scams, celebrity giveaway teams), 27-language scam-phrase banks, trend-spam hashtags and toxicity sets. Two-stage matching (cheap anchor gate → precise, lazily-compiled pattern) keeps a 50-caption scan well under a second; compiled rules are cached on disk between runs |
core/analytics.py |
Content analytics — day×hour posting heatmap (UTC) with peak slots, night-shift and weekend shares; engagement timeline (older→newer trend, spike detection, consistency index); hashtag performance with like-lift (posts with a tag vs. without) and bait-tag detection |
core/mentions.py |
Mention inner-circle network — every @handle in the public bio/captions ranked by frequency into core (3+ texts) / regular / one-off tiers with sources, last-seen date and a context snippet — a text-mention graph, not a verified social graph |
core/consistency.py |
Account integrity — bio vs. caption language consistency (using the persona language ID) plus identity markers: fan pages, backup/clone/unofficial accounts, parody/roleplay labels, not-affiliated disclaimers, rebrands and hand-over notices — banded NONE/LOW/MODERATE/HIGH |
core/bulk.py |
Bulk multi-target scanning — --bulk a,b,c or --bulk-file list.txt walks up to 50 usernames sequentially with polite delays, records ok/private/not-found/error per target, and writes reports/_bulk/summary.{json,csv,txt}. Private targets halt themselves only — the run continues, nothing is ever bypassed |
| Tier | Count | Source | Example rule ids |
|---|---|---|---|
| Curated regex | 172 | Hand-written patterns + computed heuristics over metrics/EXIF/links/PII | fin.double-btc, priv.email-in-bio, metric.follow-ratio-extreme |
| Brand / entity / celebrity packs | 39,180 | ~1,900 seed entities × documented templates (support, refund, KYC, job, giveaway, VIP, wallet, penalty, …) | data.imp.paypal.support, data.org.india_post.fee, data.cel.elon_musk.giveaway |
| Betting + crypto packs | 7,248 | Bookmakers/casinos × deposit/odds/VIP templates; coins/exchanges × invest/double/presale templates | data.bet.stake.deposit, data.cry.bitcoin.double |
| Multilingual phrases | 1,996 | 27 languages × scam-phrase banks (EN, ES, PT, FR, DE, IT, RU, AR, HI, TR, ID, VI, PL, TL, JA, KO, ZH, TH, MS, UK, CS, NL, SV, FA, HE, BN, TA, UR) | data.phrase.es.000, data.phrase.hi.014, data.phrase.ja.000 |
| Hashtag + toxicity | 1,550 | Year-variant trend-spam hashtags and community-moderation terms | data.tag.giveaway2026, data.tox.idiot |
Audit the complete catalog (id, severity, category, pack, name) at any time:
python main.py --list-rules # → reports/rules_catalog.txt (50,146 rows)Hits are triage signals with evidence — never accusations.
- HTML report (
core/html_report.py) — every scan also writes a fully self-containedreport.html(inline CSS, zero external requests, no JS): dark Instagram-gradient theme, CSS bar charts, badge tables — shareable and readable fully offline. - Dependency hardening — all packages in
requirements.txtcarry compatible upper bounds (<major) so a future breaking release can never silently break your install.
- Banner (
ui/banner.py) — pyfiglet slant logo with an Instagram-style magenta→orange gradient. - Footer (
ui/footer.py) — clickable developer links + ethics warning, and a terminal-rendered QR code (assets/bmc_qr.png) drawn with Unicode half-blocks (works in any modern terminal).
InstaRecon/
├── main.py # Entry point: argparse, orchestration
├── config.py # Settings: delays, UA, limits, links
├── requirements.txt
├── .env.example # Template for optional session cookie
├── README.md
├── core/
│ ├── __init__.py
│ ├── fetcher.py # Instagram retrieval + back-off + ethics
│ ├── parser.py # Raw objects → plain dictionaries
│ ├── exporter.py # JSON / CSV / TXT / HTML reports
│ ├── html_report.py # Self-contained offline HTML renderer
│ ├── extractor.py # 🔍 Regex: emails, phones, crypto
│ ├── analyzer.py # 🧠 Local NLP: topics, sentiment, emojis
│ ├── media_analyzer.py # 📷 EXIF forensics (Pillow + piexif)
│ ├── metrics.py # 📈 Engagement / follow ratio / cadence
│ ├── similar.py # 🧭 Similar-accounts neighbourhood
│ ├── link_scan.py # 🔗 Bio-link reputation scanner
│ ├── pii.py # 🪪 Personal-info dossier (public text)
│ ├── persona.py # 🌍 Geo / language / timezone intelligence
│ ├── watchlist.py # 🕰 Baseline snapshots + change monitoring
│ ├── risk.py # 🚦 Composite account risk score
│ ├── osint_bridge.py # 🌐 Cross-platform username footprint
│ ├── indicators.py # 🚨 Threat-indicator engine (50k+ rules)
│ ├── rulepacks.py # 📚 Data-rule builder + cache
│ ├── rulepack_data.py # 🗂 Brand/org/betting/crypto/celeb seeds
│ ├── rulepack_text_data.py # 🈚 Phrase banks + hashtags + toxicity
│ ├── analytics.py # 📊 Heatmap / trend / hashtag lift
│ ├── mentions.py # 🕸 @mention inner-circle network
│ ├── consistency.py # 🧩 Language + identity integrity
│ └── bulk.py # 📚 Multi-target scans + summaries
├── ui/
│ ├── __init__.py
│ ├── display.py # Rich tables, panels, spinners, bars
│ ├── banner.py # Gradient ASCII banner
│ └── footer.py # Links, warning, half-block QR renderer
├── assets/
│ ├── logo.svg # Shutter + magnifying-glass logo
│ └── bmc_qr.png # Buy Me a Coffee QR
├── logs/ # logs/instarecon.log
└── reports/<username>/ # Exported intelligence
Design principles: OOP with single responsibility — the CLI never
talks to Instagram directly; fetcher owns all network I/O to
Instagram, parser owns normalisation, exporter owns serialisation,
and the deep modules own their own analysis. Every layer is swappable.
# 1. Clone the repository
git clone https://github.com/mrdineshpathro/InstaRecon.git
cd InstaRecon
# 2. (Recommended) create a virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txtRequires Python 3.10+.
Optional (nicer stopwords for the NLP module — the tool works without it):
python -c "import nltk; nltk.download('stopwords')"# Interactive - it will prompt for a username
python main.py
# Base public-profile scan
python main.py example_user
# Deep analysis: local intelligence stack — extraction, NLP, PII dossier,
# EXIF, metrics, similar accounts, link scan, persona, risk score,
# OSINT footprint, threat indicators (50k+ rules), content analytics,
# mentions, account integrity
python main.py example_user --deep-analysis
python main.py example_user -d
# Dump the full threat-indicator catalog (50,146 rules)
python main.py --list-rules
# Append the Buy Me a Coffee QR code to the report
python main.py example_user -d --show-qr
# Change monitoring: diff against the saved baseline without updating it.
# Exit code 0 = no changes, 3 = changes found (cron/polling friendly).
python main.py example_user --check
echo $?
# Bulk multi-target scan (max 50 per run, polite delays).
# Per-target outcome is recorded; summaries land in reports/_bulk/.
python main.py --bulk alice,bob,carol
python main.py --bulk-file targets.txt
python main.py --bulk-file targets.txt -d # deep analysis per target
echo $? # 0 = every target completed, 1 = any not-found/error
# Banner + developer links + QR, then exit
python main.py --about
# Just the Buy Me a Coffee QR
python main.py --donate
# Version / help
python main.py --version
python main.py --helpExample deep-analysis flow:
========================================
InstaRecon v1.0
Instagram Public Profile
========================================
[?] Enter Instagram Username: example_user
[*] Initializing session...
[*] Checking username validity...
[*] Fetching recent posts (up to 50) with polite delays...
[*] Extracting metadata...
┌──────────── PROFILE REPORT ────────────┐
│ Username : example_user │
│ Privacy : Public │
│ Followers : 10,500 │
│ … │
└────────────────────────────────────────┘
[*] Running deep analysis (local, no paid APIs)...
✔ Extraction · NLP · PII · EXIF · Metrics · Similar · Links
✔ Persona · Risk · OSINT · Indicators · Analytics · Mentions
[*] Generating reports...
[+] Reports saved to: ./reports/example_user/
Each scan writes to reports/<username>/:
| File | Format | Contents |
|---|---|---|
profile_data.json |
JSON | Full nested structure incl. deep_analysis block |
profile_data.csv |
CSV | Single flattened row (deep_* columns when -d) |
report.txt |
TXT | Human-readable formatted report |
report.html |
HTML | Self-contained offline report (inline CSS, no CDN) |
baseline.json |
JSON | Watchlist snapshot used for change monitoring |
media/*.jpg |
Images | Profile pic + last 5 post images (deep analysis only) |
reports/_bulk/summary.* |
JSON/CSV/TXT | Aggregate per-target results of a --bulk run |
Errors and rate-limit events are appended to logs/instarecon.log.
Running anonymously works but Instagram rate-limits anonymous traffic faster (HTTP 429), and Similar-Accounts discovery is only available to a logged-in viewer — Instagram shows that "Suggested for you" list exclusively to logged-in users (the tool degrades gracefully with an explanatory note when no cookie is set; it never logs in with credentials or bypasses the requirement). InstaRecon retries 429s with exponential back-off (5s → 10s → 20s) and then advises you to supply a session cookie:
cp .env.example .env
# edit .env and set your own cookie values:
# INSTAGRAM_SESSIONID=your_cookie_here
# INSTAGRAM_CSRFTOKEN=... # optional, GET requests work without it
# INSTAGRAM_SESSION_USERNAME=... # optional label for your sessionYour .env is git-ignored — never commit or share it.
InstaRecon is built privacy-first. These rules are enforced in code, not just documentation:
- Instant private-account halt — the moment
is_privateisTrue, the fetcher raisesPrivateAccountError, the CLI shows a strict warning and exits before requesting any post/follower data. - No bypass, ever — no credential guessing, no brute force, no exploitation of private endpoints, no DM/post access.
- Public data only — only what any logged-out visitor can see: profile metadata, public captions, published business contact info.
- No follower scraping — the tool never enumerates follower or following lists.
- Rate-limit respect — politeness delays between requests and exponential back-off on HTTP 429.
- Local analysis only — no paid AI APIs; TextBlob/NLTK/regex run on your machine.
- Cross-platform checks are passive — plain HTTP HEAD/GET probes of public pages; no accounts, no credentials, no bypassing.
- Personal-info & persona features read public text only — the dossier and geo/language/timezone intelligence are regex/stopword heuristics over the bio and captions the account already posts publicly. They are hints for the analyst, explicitly labelled as "not verified facts", and never combined with breach data, people search services, or any non-public source.
- Bulk mode never widens access — each target goes through the
exact same public-data-only fetch path as a single scan, with
politeness delays between targets and a hard cap per run. A private
target halts itself (recorded as
privatein the summary) and the run moves on; no target is probed, skipped around, or bypassed. Indicator/analytics results remain heuristic triage signals, not proof of wrongdoing.
This tool is provided for educational and authorized research purposes only. You are responsible for complying with Instagram's Terms of Service, applicable laws, and the privacy of the people you research. Never use InstaRecon to harass, stalk, or collect data you are not legally allowed to process. The authors assume no liability for misuse.
Dinesh Pathro — developer of InstaRecon.
- 🐙 GitHub: https://github.com/mrdineshpathro
- 📸 Instagram: https://www.instagram.com/mr_dineshpatro
- ☕ Buy Me a Coffee: https://buymeacoffee.com/mrdineshpathro
If InstaRecon helps your research or learning, consider buying me a coffee — it keeps the project brewing! ☕
Or scan the QR straight from your terminal:
python main.py --donateReleased under the MIT License.
For educational / ethical OSINT use only.
