Skip to content

victorsouzaleal/instagram-direct-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Works with:

It currently works with general Instagram posts, which can contain multiple images/videos or a single one.

Stories not supported.

Instalation :

> npm i --save instagram-url-direct

Example

const instagramGetUrl = require("instagram-url-direct")
let data = await instagramGetUrl("https://www.instagram.com/tv/CdmYaq3LAYo/")
console.log(data)

Output Example

Single result

{
    results_number : 1,
    post_info:{
        owner_username: "username",
        owner_fullname: "fullname",
        is_verified: false,
        is_private: false,
        likes: 6,
        is_ad: false
    }
    url_list : [
        'https://scontent.cdninstagram.com....'
    ],
    media_details:[
        {
            type: "video",
            dimensions: {height: "1080", width: "1920"},
            video_view_count: 1000,
            url: "https://scontent.cdninstagram.com...",
            thumbnail: 'https://scontent.cdninstagram.com...'
        }
    ]
}

Multi results

{
    results_number : 3,
    post_info:{
        owner_username: "username",
        owner_fullname: "fullname",
        is_verified: false,
        is_private: false,
        likes: 10,
        is_ad: false
    }
    url_list : [
        'https://scontent.cdninstagram.com...',
        'https://scontent.cdninstagram.com...',
        'https://scontent.cdninstagram.com...',
    ],
    media_details:[
        {
            type: "video",
            dimensions: {height: "640", width: "640"},
            video_view_count: 100,
            url: "https://scontent.cdninstagram.com...",
            thumbnail: 'https://scontent.cdninstagram.com...'
        },
        {
            type: "video",
            dimensions: {height: "640", width: "640"},
            video_view_count: 100,
            url: "https://scontent.cdninstagram.com...",
            thumbnail: 'https://scontent.cdninstagram.com...'
        },
        {
            type: "image",
            dimensions: {height: "640", width: "640"},
            url: "https://scontent.cdninstagram.com...",
        }
    ]
}