Retrieve Instagram video embed URL from API
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm trying to find to programmatically get the embed link for an Instagram video. Unfortunately, it appears that Instagram's oEmbed endpoint, treats videos as photos, and only returns the key frame image, rather than providing an embed link.
Does anyone know of a way to retrieve the embed link for an instagram video without having to manually visit the page for that video?
api video embed instagram
add a comment |
I'm trying to find to programmatically get the embed link for an Instagram video. Unfortunately, it appears that Instagram's oEmbed endpoint, treats videos as photos, and only returns the key frame image, rather than providing an embed link.
Does anyone know of a way to retrieve the embed link for an instagram video without having to manually visit the page for that video?
api video embed instagram
add a comment |
I'm trying to find to programmatically get the embed link for an Instagram video. Unfortunately, it appears that Instagram's oEmbed endpoint, treats videos as photos, and only returns the key frame image, rather than providing an embed link.
Does anyone know of a way to retrieve the embed link for an instagram video without having to manually visit the page for that video?
api video embed instagram
I'm trying to find to programmatically get the embed link for an Instagram video. Unfortunately, it appears that Instagram's oEmbed endpoint, treats videos as photos, and only returns the key frame image, rather than providing an embed link.
Does anyone know of a way to retrieve the embed link for an instagram video without having to manually visit the page for that video?
api video embed instagram
api video embed instagram
asked Jul 22 '13 at 15:24
Josh OurismanJosh Ourisman
8811715
8811715
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
According to Instagram's API site a GET /media/media-id request for a video object returns a JSON object with the information you need in "data.videos.low_resolution.url".
I successfully embedded the video returned by their sample request into a web page with the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video Embed Test</title>
</head>
<body>
<video width="480" height="480" controls>
<source src="http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4"
type="video/mp4"/>
</video>
</body>
</html>
I hadn't realized before that the/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.
– Josh Ourisman
Jul 23 '13 at 17:23
add a comment |
I was not able to find a way to retrieve the embed URL, however upon examining the embeds that Instagram provides, I was able to determine how to generate it based on the information provided by the Media API endpoint. Basically, you just need to append /embed/
to the end of the short url for the piece of media. So it would look something like this in a Django template:
<iframe src="{{ media.short_link }}embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
As an interesting side note, I also discovered that you can change the width and height in the embed code, and it works without any problem (at least when you just halve the dimensions, I didn't try anything else).
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f17791448%2fretrieve-instagram-video-embed-url-from-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
According to Instagram's API site a GET /media/media-id request for a video object returns a JSON object with the information you need in "data.videos.low_resolution.url".
I successfully embedded the video returned by their sample request into a web page with the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video Embed Test</title>
</head>
<body>
<video width="480" height="480" controls>
<source src="http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4"
type="video/mp4"/>
</video>
</body>
</html>
I hadn't realized before that the/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.
– Josh Ourisman
Jul 23 '13 at 17:23
add a comment |
According to Instagram's API site a GET /media/media-id request for a video object returns a JSON object with the information you need in "data.videos.low_resolution.url".
I successfully embedded the video returned by their sample request into a web page with the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video Embed Test</title>
</head>
<body>
<video width="480" height="480" controls>
<source src="http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4"
type="video/mp4"/>
</video>
</body>
</html>
I hadn't realized before that the/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.
– Josh Ourisman
Jul 23 '13 at 17:23
add a comment |
According to Instagram's API site a GET /media/media-id request for a video object returns a JSON object with the information you need in "data.videos.low_resolution.url".
I successfully embedded the video returned by their sample request into a web page with the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video Embed Test</title>
</head>
<body>
<video width="480" height="480" controls>
<source src="http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4"
type="video/mp4"/>
</video>
</body>
</html>
According to Instagram's API site a GET /media/media-id request for a video object returns a JSON object with the information you need in "data.videos.low_resolution.url".
I successfully embedded the video returned by their sample request into a web page with the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Video Embed Test</title>
</head>
<body>
<video width="480" height="480" controls>
<source src="http://distilleryvesper9-13.ak.instagram.com/090d06dad9cd11e2aa0912313817975d_102.mp4"
type="video/mp4"/>
</video>
</body>
</html>
answered Jul 22 '13 at 15:48
ElzairElzair
3541311
3541311
I hadn't realized before that the/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.
– Josh Ourisman
Jul 23 '13 at 17:23
add a comment |
I hadn't realized before that the/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.
– Josh Ourisman
Jul 23 '13 at 17:23
I hadn't realized before that the
/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.– Josh Ourisman
Jul 23 '13 at 17:23
I hadn't realized before that the
/embed/
URL was just using HTML5 video, not a Flash embed or anything. So this is definitely an appropriate solution, and more flexible than the one that I had found.– Josh Ourisman
Jul 23 '13 at 17:23
add a comment |
I was not able to find a way to retrieve the embed URL, however upon examining the embeds that Instagram provides, I was able to determine how to generate it based on the information provided by the Media API endpoint. Basically, you just need to append /embed/
to the end of the short url for the piece of media. So it would look something like this in a Django template:
<iframe src="{{ media.short_link }}embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
As an interesting side note, I also discovered that you can change the width and height in the embed code, and it works without any problem (at least when you just halve the dimensions, I didn't try anything else).
add a comment |
I was not able to find a way to retrieve the embed URL, however upon examining the embeds that Instagram provides, I was able to determine how to generate it based on the information provided by the Media API endpoint. Basically, you just need to append /embed/
to the end of the short url for the piece of media. So it would look something like this in a Django template:
<iframe src="{{ media.short_link }}embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
As an interesting side note, I also discovered that you can change the width and height in the embed code, and it works without any problem (at least when you just halve the dimensions, I didn't try anything else).
add a comment |
I was not able to find a way to retrieve the embed URL, however upon examining the embeds that Instagram provides, I was able to determine how to generate it based on the information provided by the Media API endpoint. Basically, you just need to append /embed/
to the end of the short url for the piece of media. So it would look something like this in a Django template:
<iframe src="{{ media.short_link }}embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
As an interesting side note, I also discovered that you can change the width and height in the embed code, and it works without any problem (at least when you just halve the dimensions, I didn't try anything else).
I was not able to find a way to retrieve the embed URL, however upon examining the embeds that Instagram provides, I was able to determine how to generate it based on the information provided by the Media API endpoint. Basically, you just need to append /embed/
to the end of the short url for the piece of media. So it would look something like this in a Django template:
<iframe src="{{ media.short_link }}embed/" width="612" height="710" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
As an interesting side note, I also discovered that you can change the width and height in the embed code, and it works without any problem (at least when you just halve the dimensions, I didn't try anything else).
answered Jul 22 '13 at 15:38
Josh OurismanJosh Ourisman
8811715
8811715
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f17791448%2fretrieve-instagram-video-embed-url-from-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown