simple-instagram-api
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

simple-instagram-api

GitHub CI Status Testing cron NPM version NPM downloads

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

Package Sidebar

Install

npm i simple-instagram-api

Weekly Downloads

8

Version

3.0.0

License

MIT

Unpacked Size

10.8 kB

Total Files

9

Last publish

Collaborators

  • scrip7