simple-instagram-api
v3.0.0
Published
Extract Instagram Media data by providing its unique code.
Downloads
35
Maintainers
Readme
simple-instagram-api
Extract Instagram Media data by providing its unique code.
- It does not require any login information
- Can fetch IG-TV and album posts
- Zero dependency
Table of contents
Installation
yarn add simple-instagram-api
Usage
import { InstagramApi } from "simple-instagram-api";
// https://www.instagram.com/p/CMf29lRF52W/
const code = "CMf29lRF52W";
InstagramApi.get(code).then((result) => {
console.log(result);
});
Response:
{
"id": "2530983242020396438",
"code": "CMf29lRF52W",
"is_video": false,
"url": "...",
"caption": "Introducing the new ..",
"children": [
{
"id": "2530983238446620648",
"code": "CMf29h8FB_o",
"is_video": false,
"url": "..."
},
{
"id": "2530983238438257890",
"code": "CMf29h7lITi",
"is_video": false,
"url": "..."
},
{
"id": "2530983238555903256",
"code": "CMf29iCl6UY",
"is_video": false,
"url": "..."
},
{
"id": "2530983238430039583",
"code": "CMf29h7Fx4f",
"is_video": false,
"url": "..."
}
]
}
Running tests
yarn test