INSTALOADER(1)
πΈ NAME πΈ
instaloader β the instagram automatic photo downloader. yes bestie, that's the whole job description and she eats every time. this is instaloader(1) from the General Commands Manual, and it's giving "i can grab literally everything for you" energy. π
β¨
π¦ SYNOPSIS π¦
instaloader profile [profile ...]
instaloader --fast-update profile [profile ...]
instaloader --latest-stamps -- profile [profile ...]
π DESCRIPTION π
instaloader is that girl, fr fr. with it you can download public and private profiles, hashtags, user stories, feeds and saved media. and also comments, geotags and captions for each post. no cap, it does all of that. π
β¨ OPTIONS β¨
1. WHAT TO DOWNLOAD π―
1.1 profile
A public profile, or a private profile β and for the private ones you'll want:
--loginβ public/private. π--storiesβ tells Instaloader to also download the user's stories. π--highlightsβ to download the highlights of that profile. β¨--taggedβ to download posts where the user is tagged. π·οΈ--igtvβ to download IGTV videos. πΊ
1.2 #hashtag
Posts with a certain hashtag (the quotes are usually necessary). π
1.3 %location id
Posts tagged with a given location; the location ID is the numerical ID Instagram labels a location with (e.g. https://www.instagram.com/explore/locations/362629379/plymouth-naval-memorial/). requires --login. π
1.4 :stories
The currently-visible stories of your followees (requires --login). π
1.5 :feed
Your feed (requires --login). π
1.6 :saved
Posts which are marked as saved (requires --login). π
1.7 @profile
All profiles that are followed by profile, i.e. the followees of profile (requires --login). π«Ά
1.8 -post
Replace post with the post's shortcode to download a single post. it must be preceded by -- in the argument list so it doesn't get mistaken for an option flag:
instaloader -- -B_K4CykAOtf
.. versionadded :: 4.1
Instaloader goes through all media matching the specified targets and downloads the pictures and videos and their captions. You can specify: π
1.9 --comments
Also download comments of each post. π¬
1.10 --geotags
Download geotags of each post and save them as a Google Maps link (requires --login). πΊοΈ
2. FILENAME SPECIFICATION ποΈ
For each target, Instaloader creates a directory named after the target, i.e. profile, #hashtag, %location id, :feed, etc. and therein saves the posts in files named after the post's timestamp. periodt.
--dirname-patternβ lets you configure the directory name of each target. the default is--dirname-pattern={target}. in the dirname pattern, the token{target}is replaced by the target name, and{profile}is replaced by the owner of the post which is downloaded.--filename-patternβ configures the path of the post and story's files relative to the target directory that is specified with option: the default is--filename-pattern={date_utc}_utc. the tokens{target}and{profile}are replaced like in the dirname pattern.--title-patternβ similar to--filename-pattern, but for profile pics, hashtag profile pics, and highlight covers. the default is{date_utc}_UTC_{typename}if--dirname-patterncontains{target}or{profile}, or{target}_{date_utc}_UTC_{typename}if it does not. some tokens are not supported for this option, see below for details. π
The following tokens are defined for usage with --filename-pattern and --title-pattern: π§
2.1 {target}
Target name (as given in the Instaloader command line). β
2.2 {profile}
(same as {owner_username}) Owner of the Post / StoryItem / ProfilePic. For hashtag profile pics and highlight covers, equivalent to {target}.
2.3 {owner_id}
Unique integer ID of owner profile. For hashtag profile pics, equivalent to {target}.
2.4 {shortcode}
Shortcode (identifier string). Not available for --title-pattern.
2.5 {mediaid}
Integer representation of shortcode. Not available for --title-pattern.
2.6 {filename}
Instagram's internal filename.
2.7 {date_utc}
(same as {date}) Creation time in UTC timezone. strftime()-style formatting options are supported as format specifier. the default date format specifier used by Instaloader is: {date_utc:%Y-%m-%d_%H-%M-%S}
2.8 {typename}
Type of media being saved, such as GraphImage, GraphStoryVideo, profile_pic, etc.
3. FILTER POSTS ποΈ
The options --post-filter and --storyitem-filter allow one to specify criteria that posts or story items have to meet to be downloaded. If not given, all posts are downloaded.
The filter string must be a Python boolean expression where the attribute from Post or StoryItem respectively are defined.
the following attributes can be used with both --post-filter and --storyitem-filter:
3.1 Post.owner_username (str), Post.owner_id (int)
Owner profile username/user ID. π«Ά
3.2 Post.date_utc (datetime), Post.date_local (datetime)
Creation timestamp. Since datetime.datetime objects can be created inside filter strings, this easily allows filtering by creation date. ποΈ
3.3 Post.is_video (bool)
Whether Post/StoryItem is a video. for example, you may skip videos:
instaloader --post-filter="not is_video" target
This is not the same as --no-videos and --no-video-thumbnails, since sidecar posts (posts that contain multiple pictures/videos in one post) have this attribute set to False. π¨
As --post-filter, the following attributes can be used additionally:
3.4 Post.viewer_has_liked (bool)
Whether user (with --login) has liked given post. to download the pictures from your feed that you have liked: π
3.5 Post.likes (int), Post.comments (int)
Likes count / comments count. you might only want to download posts that were either liked by yourself or by many others. π₯
3.6 Post.caption_hashtags (list of str) / Post.caption_mentions (list of str)
#hashtags or @mentions (lowercased) in the Post's caption. for example, to download posts of kittens that are cute:
instaloader --post-filter="'cute' in caption_hashtags" "#kitten"
3.7 Post.tagged_users (list of str)
Lowercased usernames that are tagged in the Post. for --storyitem-filter, the following additional attributes are defined:
3.8 StoryItem.expiring_utc (datetime) / StoryItem.expiring_local (datetime)
Timestamp when StoryItem will get unavailable. β³
4. METADATA TEXT FILES π
Unless --no-captions is given, Instaloader creates a .txt file along with each post where the Post's caption is saved.
You can customize what metadata to save for each Post or StoryItem with --post-metadata-txt and --storyitem-metadata-txt. the default is --post-metadata-txt={caption} and no storyitem metadata txt. these strings are formatted similar as the path patterns described in filename-specification and the result is saved in text files, unless it is empty.
Specifying these options multiple times results in output having multiple lines, in the order they were given to Instaloader. the field names are evaluated to Post or StoryItem attributes, and as such, the same fields are supported as in filename-specification and filter-posts.
for example, to save the current number of likes for each post, rather than the post's caption:
4.1
instaloader --post-metadata-txt="{likes} likes." <target>
Note that with this feature, it is possible to easily and fastly extract additional metadata of already-downloaded posts, by reimporting their JSON files. say, you now also want to export the number of comments the Posts had when they were downloaded:
4.2
instaloader --post-metadata-txt="{likes} likes, {comments} comments." <target>/*.json.xz
π EXAMPLES π
for example, encode the poster's profile name in the filenames with:
instaloader --login=your_username
instaloader --dirname-pattern={profile}
instaloader --login=your_username --quiet target [...]
instaloader --filename-pattern={date_utc}_UTC_{profile} "#hashtag"
instaloader --post-filter="date_utc <= datetime(2018, 5, 31)" target
instaloader --post-filter="not is_video" target
instaloader --login=your_username --post-filter=viewer_has_liked :feed
as another example, you may instruct Instaloader to store posts in a PROFILE/YEAR/SHORTCODE.jpg directory structure:
instaloader --login=your_username --post-filter="likes>100 or viewer_has_liked" profile
instaloader --filename-pattern={date_utc:%Y}/{shortcode} <target> ...
instaloader --post-filter="'cute' in caption_hashtags" "#kitten"
instaloader --post-metadata-txt="{likes} likes." <target>
instaloader --post-metadata-txt="{likes} likes, {comments} comments." <target>/*.json.xz
π REPORTING BUGS π
To report a bug please visit the cplay-ng issues tracking system at: https://github.com/instaloader/instaloader/issues
not me telling you to go file a bug report like it's a group chat π please do it though, they wanna know.
π«Ά AUTHORS π«Ά
Written by 2016-2020 Alexander Graf <mail@agraf.me> 2016-2020 AndrΓ© Koch-Kramer <koch-kramer@web.de>
This manual page was written by Josenison F. da Silva <nilsonfsilva@hotmail.com> for the Debian project (but may be used by others).
and that's a wrap, bestie!! π
this whole page is INSTALOADER 4.8.4-1, dated mar 2022, and the footer's little tagline goes "instagram automatic photo dow" β yes it really does just stop mid-word like that, iconic honestly. π now go download something, you've got this. πβ¨π¦
π¦ where this page comes from
- debian bookworm: instaloader 4.9.5+ds-1 Β· MIT
- debian trixie: instaloader 4.14.1+ds-1 Β· MIT
- ubuntu noble: instaloader 4.10.3+ds-1 Β· MIT
- ubuntu questing: instaloader 4.14.1+ds-1
- ubuntu resolute: instaloader 4.14.1+ds-1build1 Β· MIT
- ubuntu stonking: instaloader 4.15.1+ds-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms