The easiest way I've found to programmatically backup Instagram data.
- Go to
https://developers.facebook.com/apps
- Click Create App
- Select Consumer
- Fill in any App Display Name
- Leave App Contact Email and Do you have a Business Manager account? at defaults
- Go to your app's Settings > Basic
- Click Add Platform > Website and fill in any Site URL (required but unused)
- Scroll down to Add Products to Your App
- Find Instagram Basic Display and click Set Up
- Go to Instagram Basic Display > Basic Display
- Scroll down to User Token Generator and click Add or Remove Instagram Testers
- Click Add Instagram Testers and invite your account
- Go to
https://www.instagram.com/accounts/manage_access
- Switch to Tester Invites and accept the invite
- Go back to the User Token Generator and click Generate Token
- Store the token safely, treat it as a personal access token
The token should be valid for 60 days and can either be refreshed using the API or a new one may be generated.
https://graph.instagram.com/me?fields=media_count,media&access_token=…
I've not found a way to return more results on one page, the limit
parameter
in this Stack Overflow question
does not appear to work (for me). The pagination is straightforward though.
https://graph.instagram.com/${id}?fields=caption,media_type,media_url,permalink,thumbnail_url,timestamp&access_token=…
Instagram offers a data takeout feature, but it may take a long time to be ready and it comes to your mailbox, it doesn't appear to have an API.