instaloader

Outil OSINT pour Instagram. Télécharge les profils, publications, stories, reels, highlights et listes d'abonnés/abonnements. Utile pour le renseignement sur les réseaux sociaux. Instagram OSINT tool. Downloads profiles, posts, stories, reels, highlights, and follower/following lists. Useful for social media intelligence gathering.

↗ https://github.com/instaloader/instaloader

Overview

instaloader downloads Instagram content programmatically — profiles, posts, stories, highlights, IGTV, reels, and metadata. For OSINT, it’s used to collect target social media footprint, extract geolocation from posts, map follower networks, and archive evidence before it’s deleted.

Installation

pip3 install instaloader

Basic Usage

Download a public profile (all posts)

instaloader target_username

Download without saving login

instaloader --no-profile-pic target_username

Download only profile info (no posts)

instaloader --no-posts target_username

Download with metadata (JSON per post)

instaloader --metadata-json target_username

Download posts with geolocation

instaloader --geotags target_username

Authentication (for private or full access)

Login for expanded access

instaloader --login your_username

Save session for reuse

instaloader --login your_username --sessionfile ~/.session

Use saved session

instaloader --sessionfile ~/.session target_username

Specific Content Types

Download stories (requires login)

instaloader --stories target_username

Download highlights

instaloader --highlights target_username

Download tagged posts

instaloader --tagged target_username

Download IGTV

instaloader --igtv target_username

Reels

instaloader --reels target_username

Only posts, no stories/profile

instaloader --no-videos --no-profile-pic target_username

OSINT-Specific Options

Save full metadata as JSON (includes timestamp, location, likes)

instaloader --metadata-json target_username
# Download follower/following lists (requires login)
instaloader --followers target_username
instaloader --followees target_username

Extract geolocation from posts

instaloader --geotags target_username

Download by hashtag

instaloader "#newyork"

Download by location ID

instaloader %12345  # location ID

Date Filtering

# Only download posts from date range
instaloader --post-filter "date_utc >= datetime(2023, 1, 1)" target_username
instaloader --post-filter "date_utc <= datetime(2023, 12, 31)" target_username

Last N posts

instaloader --count 20 target_username

Metadata Extraction

# After download, parse JSON metadata files
find target_username/ -name "*.json" | while read f; do
    python3 -c "
import json
with open('$f') as fh:
    d = json.load(fh)
    ts = d.get('node', {}).get('taken_at_timestamp', 'N/A')
    loc = d.get('node', {}).get('location', 'No location')
    print(f'Time: {ts} | Location: {loc}')
"
done

Tips

  • Posts contain EXIF-stripped images but metadata JSONs include timestamp, likes, caption
  • Geolocation in metadata can reveal home/work/travel patterns
  • Follower/following lists reveal social network — useful for mapping relationships
  • Instagram rate-limits aggressive scraping — add delays between requests
Help / Man page
instaloader [options] profile | #hashtag | %location_id

--login USER      Login with Instagram account
--sessionfile F   Session file for persistent login
--no-profile-pic  Skip profile picture
--no-posts        Skip posts
--no-videos       Skip video posts
--metadata-json   Save post metadata as JSON
--stories         Download stories
--highlights      Download highlights
--tagged          Download tagged posts
--followers       Download follower list
--followees       Download following list
--geotags         Include geolocation data
--count N         Download only N posts
--quiet           Quiet output

Vue d’ensemble

instaloader télécharge le contenu Instagram de manière programmatique : profils, publications, stories, highlights, IGTV, reels et métadonnées. Pour l’OSINT, il sert à collecter l’empreinte d’une cible sur les réseaux sociaux, extraire la géolocalisation des publications, cartographier les réseaux d’abonnés, et archiver des preuves avant leur suppression.

Installation

pip3 install instaloader

Utilisation de base

# Télécharger un profil public (toutes les publications)
instaloader target_username

# Télécharger sans sauvegarder la photo de profil
instaloader --no-profile-pic target_username

# Télécharger uniquement les infos du profil (pas de publications)
instaloader --no-posts target_username

# Télécharger avec les métadonnées (JSON par publication)
instaloader --metadata-json target_username

# Télécharger les publications avec géolocalisation
instaloader --geotags target_username

Authentification (pour l’accès privé ou complet)

# Se connecter pour un accès étendu
instaloader --login your_username

# Sauvegarder la session pour réutilisation
instaloader --login your_username --sessionfile ~/.session

# Utiliser une session sauvegardée
instaloader --sessionfile ~/.session target_username

Types de contenu spécifiques

# Télécharger les stories (nécessite une connexion)
instaloader --stories target_username

# Télécharger les highlights
instaloader --highlights target_username

# Télécharger les publications où le compte est tagué
instaloader --tagged target_username

# Télécharger les IGTV
instaloader --igtv target_username

# Reels
instaloader --reels target_username

# Uniquement les publications, sans stories/profil
instaloader --no-videos --no-profile-pic target_username

Options spécifiques à l’OSINT

# Sauvegarder les métadonnées complètes en JSON (inclut horodatage, localisation, likes)
instaloader --metadata-json target_username

# Télécharger les listes d'abonnés/abonnements (nécessite une connexion)
instaloader --followers target_username
instaloader --followees target_username

# Extraire la géolocalisation des publications
instaloader --geotags target_username

# Télécharger par hashtag
instaloader "#newyork"

# Télécharger par ID de lieu
instaloader %12345  # ID de lieu

Filtrage par date

# Ne télécharger que les publications dans une plage de dates
instaloader --post-filter "date_utc >= datetime(2023, 1, 1)" target_username
instaloader --post-filter "date_utc <= datetime(2023, 12, 31)" target_username

# Les N dernières publications
instaloader --count 20 target_username

Extraction de métadonnées

# Après le téléchargement, parser les fichiers JSON de métadonnées
find target_username/ -name "*.json" | while read f; do
    python3 -c "
import json
with open('$f') as fh:
    d = json.load(fh)
    ts = d.get('node', {}).get('taken_at_timestamp', 'N/A')
    loc = d.get('node', {}).get('location', 'No location')
    print(f'Time: {ts} | Location: {loc}')
"
done

Conseils

  • Les publications contiennent des images sans EXIF, mais les JSON de métadonnées incluent horodatage, likes, légende
  • La géolocalisation dans les métadonnées peut révéler des habitudes de domicile/travail/déplacement
  • Les listes d’abonnés/abonnements révèlent le réseau social : utile pour cartographier les relations
  • Instagram limite le scraping agressif (rate limiting) : ajouter des délais entre les requêtes
Aide / Page de manuel
instaloader [options] profile | #hashtag | %location_id

--login USER      Login with Instagram account
--sessionfile F   Session file for persistent login
--no-profile-pic  Skip profile picture
--no-posts        Skip posts
--no-videos       Skip video posts
--metadata-json   Save post metadata as JSON
--stories         Download stories
--highlights      Download highlights
--tagged          Download tagged posts
--followers       Download follower list
--followees       Download following list
--geotags         Include geolocation data
--count N         Download only N posts
--quiet           Quiet output