Instagram Album Downloader
Pdf purpose driven church. Download all the Instagram JSON data and media for a user.
Download Instagram videos - Our Instagram video downloader lets you save Instagram Video and convert from Instagram to MP3 and MP4 files for free! 313.4m Followers, 235 Following, 6,057 Posts - See Instagram photos and videos from Instagram (@instagram). 4K Stogram is an Instagram Viewer and Downloader for PC, macOS and Linux. Download photos, videos and stories from your friends’ public and private Instagram accounts, backup your Instagram profile and import your list of Instagram subscriptions. Get started for free! Get 4K Stogram. 100% Safe Software Scanned by 52 Antiviruses. Instagram photo, video, and IGTV downloader - Free, online, and one-click download. LR/Instagram is an unofficial publish plugin for Lightroom, allowing you to post photos directly to your Instagram account. Simply install the plugin, add new service in Lightroom Publishing Manager and authenticate with your Instagram account.
API Restrictions as of June 1, 2016
By default apps created for the Instagram API are in sandbox mode, and are only allowed to download the last 20 posts. They can also only access your user account and up to 9 other user accounts that accept your application request.
Install
npm install instagram-download
You may want to use the --global
option when installing if you want to use the CLI globally on your machine.
Usage
CLI
All the same options are available to the CLI.
API
options
user
(string, required)
The id of the Instagram user that you want to download.
dir
(string, required)
The directory where you want to download all the data. It will be created if it does not exist. Inside the directory it will create a structure so that multiple users can be downloaded. See the media
and json
section below about how the data is stored inside those directories.
token
(string, required for download
)
An access token for the Instagram API from your client application. If you don't have one you'll need to create an app and then get an access token.
Note that as of June 1, 2016 API requests can no longer be made with using an application's client+secret (as this module did previously), and must use an access token.
refresh
(boolean, optional, default false
)
By default running instagram-download
again will start after the most recent Instagram post that was downloaded previously, so that you can easily only fetch the latest Instagram data. Use the refresh
option to overwrite all the existing Instagram data. Note that Instagram photos are never redownloaded because they should never change after being posted.
full
(boolean, optional, default false
)
By default the Instagram API only includes a few likes and comments with each post. You have the option (at the expense of two extra API requests per post) to fetch as many likes and comments as Instagram allows (which right now is ~120 each). You shouldn't hit any rate limits when using this option unless you have more than 2462
posts. See the API Rate Limiting section below for more detailed info about this.
images
sizes
The images
hash in each json file will contain the following keys from Instagram thumbnail
, low_resolution
, and standard_resolution
. The downloader will also do some magic to attempt to download the higher resolution versions (both cropped and uncropped) if possible, and those keys will be high_resolution
and high_resolution_cropped
.
Instagram Album Downloader Download
media
and json
directories
Once everything is downloaded you'll see the following directories: $DIR/$USER_ID/json
and $DIR/$USER_ID/media
. The json
directory will consist of an INSTAGRAM_POST_ID.json
file for each Instagram post. The media
directory will consist of all the media (images and videos) with a directory structure that mirrors that pathnames from where they are hosted by Instagram. This is done so that if you look inside an INSTAGRAM_POST_ID.json
file, you can easily find the images files by prefixing the url host + path with the path to the media directory for that user: $DIR/$USER_ID/media
. Here's an example:
Instagram Album Downloader App
_cache/1640745920/json/1002451038433600709_1640745920.json
The standard resolution image for that post will be located at _cache/1640745920/media/scontent.cdninstagram.com/hphotos-xfa1/t51.2885-15/e15/11312306_899995390069692_1338680988_n.jpg
. Here is some JS for how you'd go about getting that:
Getting an access token
Since the Instagram API now requires an access token for all requests, this module has a method for getting one.
- Create an Instagram client application. You should be able to set any options you want, but you should add a 'Valid Redirect URI' (under the Security tab) for
http://localhost:3003
. - Once you've created your application you should be able to get the client ID and secret. It should look something like this:
- Run this command using your client ID and secret. This will open a browser window and prompt you to login to Instagrama and approve your application to access your account. By default the access token will have a scope for
basic
andpublic_content
. See the Instagram API docs for other possible scopes.
- The access token will be printed to the CLI and opened browser window once authorization is complete.
API Rate Limiting
This has changed as of June 1, 2016. See the new info in the Instagram docs on rate limiting.
Debug Logging
This module uses debug
to selectively log events. By default nothing is logged, but you can use the DEBUG
environment variable to enable logging. All debug logging events use the namespace prefix instagram-download:
with the suffixes cli
, download
, read
, options
, api
, json
, media
. Here are some examples:
Contributing
Instagram Album Downloader Online
This is written in ES6 and compiled to ES5 using babel
. The code you require will come from the lib/
directory which gets compiled from src/
before each npm publish
.
Tests
npm test
License
MIT