posted May 13, 2015
Last summer I wrote a complicated iPhone URL action sequence to get the URL scheme and direct image link for an Instagram post. And then later I updated it. (With the URL scheme, you can tap on the link while on your iOS device and go directly to that post in the Instagram app.)
Now all you have to do is add the URL of an Instagram post to the end of the query at
For example, if I want the URL scheme and direct image link for this Beyonce post, I just add
https://instagram.com/p/1gL1RVPw9P/?taken-by=beyonce to the end of the query so that it looks like this in the browser:
In Instagram for iOS, tap on the ellipses under an image, then tap on "Copy Share URL." Then go to Launch Center Pro and tap on the Instagram action you just installed. It will bring you to the script page with the two links associated with that post.
When you're viewing Instagram in a browser, you can use this bookmarklet. Bookmark any page, then go into Edit and replace the URL with the following:
The Instagram API does not support Cross Origin Resource Sharing, and after several hours of frustration I have not been able to figure out how to do more than a simple xmlhttprequest. However, the Yahoo Query Language API is a useful workaround.
select * from json where url="http://api.instagram.com/oembed?url=http://instagram.com/p/qJu0a-OHMC"
For the script, I pulled out the URL-encoded Instagram post link and stuck in a variable to pass the query string into the URL.
var url="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D%22http%3A%2F%2Fapi.instagram.com%2Foembed%3Furl%3D" + encodeURIComponent(y) + "%22&format=json&diagnostics=true&callback=";