Instagram API
Hi all - had a nice phone call today from a new user who wanted to pull information from Instagram. I suggested looking at their API (of course). Turns out that Instagram is transitioning to Facebook Graph API (as they just bought Instagram) so until our good friends at Aptus Data Labs can get Instagram Graph API with OAuth going for us (hint, hint), here's a quick hack:
Goal: get hashtag counts on instagram
Step 1: get an Instagram API access token (nice easy steps here).
Step 2: create a document with hashtags
Step 3: run this process (see attached for code)
You should see a series of results that look like this:
A full list of Instagram REST API endpoints can be found here.
Enjoy!
Scott
Comments
I had to get a token in a very arduous round about way instead via the link you shared. It seems that Instagram is making a lot of API changes and a lot of things are being deprecated and breaking. I suspect that this is because they are moving to FB's open graph protocol.
yes I had to go through the same rigmarole and agree it must be due to migration to FB graph. Sigh.
hi...this just in from the folks at Instagram:
We wanted to inform you of upcoming API changes that affect Instagram's two public APIs. Starting July 31, 2018 we will begin deprecating the older Instagram API Platformwith complete deprecation occurring by early 2020 - please see a detailed timeline below. We understand that this may affect your business or services so we want to ensure a smooth transition by informing you of these changes.
If your application supports Instagram business profile users, we encourage you to begin building on the Instagram Graph API (launched to all developers in August 2017) if you have not done so already. We are excited to share that, starting on 1/30, two new features are available to all developers on the Instagram Graph API - more details below.
Instagram API Platform: Full Deprecation Schedule
The following will be deprecated on July 31, 2018:
The following will be deprecated on December 11, 2018:
The following will be deprecated in early 2020:
Instagram Graph API: Launches
The following features are now available for Instagram business profiles to all developers:
To find out more about the new Instagram Graph API features, check out the documentation.
THe API is breaking but I might have found a solution using https://www.instagram.com/explore/tags/{HASHTAG}/?__a=1
The __a=1 part of the URL responds with a JSON array a lot faster and without authentification. I will have to investigate.
And you have to update the JSONPath in the Enrich with Web Service operator by adding this:
$..edge_hashtag_to_media.count
thank you @Thomas_Ott - I was wondering when the Instagram API would completely melt down. Thanks for the workarounds!