Skip to content

Faseeh-Abbas-Khan/insta-fetcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insta Fetcher

HitCount GitHub license Npm package monthly downloads GitHub repo size

Fetch instagram api with full details and simplified json metadata

☕ Buy Me a Coffee : Saweria

Features

  • fetchUser

  • fetchPost

  • fetchStories

  • fetchHighlights

Usage

Installation:


npm i insta-fetcher

recommended to set the session id before make call to all function

let { igApi, getSessionId } = require('insta-fetcher');
let ig = new igApi('your session id');

//or use setCookie function
ig.setCookie('your session id');


// you can get sesion id by using getSessionId function, it requires username & password
(async () => {
    const session_id = await getSessionId('username', 'password');
    console.log(session_id);
})();

Example

let { igApi } = require('insta-fetcher');
let ig = new igApi();

// Public post
ig.fetchPost('https://www.instagram.com/reel/CXhW_4sp32Z/').then((res) => {
	console.log(res);
});

// User data
ig.fetchUser('mg.creativestudio').then((res) => {
	console.log(res);
});

// Fetch stories
ig.fetchStories('adiraas.p').then((res) => {
	console.log(res);
});

// Fetch highlights
ig.fetchHighlights('adiraas.p').then((res) => {
	console.log(res);
});

My Project with this Library

Contributing

All kinds of contributions are welcome - code, tests, documentation, bug reports, new features, etc...

  • Send feedbacks.
  • Submit bug reports.
  • Write/Edit the documents.
  • Fix bugs or add new features.

Packages

No packages published

Languages

  • TypeScript 98.3%
  • JavaScript 1.7%