instagram-basic-data-scraper-with-username

Basic Instagram Data Scraper from the username, Just to provide the developers the facility to access instagram data using username

Usage no npm install needed!

<script type="module">
  import instagramBasicDataScraperWithUsername from 'https://cdn.skypack.dev/instagram-basic-data-scraper-with-username';
</script>

README

Instagram-Basic-data-Scraper-With-Username




A node module to extract the basic instagram data with username from the instagram.

Install

$ npm install --save instagram-basic-data-scraper-with-username

Usage

User ID

const instaObj = require('instagram-basic-data-scraper-with-username');

const user = 'joietribianni';

instaObj.specificField(user, 'id').then(id => {
  console.log(id);
  // => { data: '1429637717' }
});

OR

instaObj.specificField(user, 'id').then(res => {
  const userId = res.data;
  console.log(userId);
  // => 1429637717
});

OR

instaObj.getId(user).then(res => {
  const userId = res.data;
  console.log(userId);
  // => 1429637717
});

Example

Full Name

instaObj.specificField(user, 'fullname').then(fullname => {
  console.log(fullname);
  // => { data: 'Joie' }
});

API

instaObj.specificField('username', 'options')

username : string

options : string

Options Output
id string
fullname string
username string
bio string
externalUrl string
linkshimmed string
posts string
followers string
following string
private boolean
verified boolean
connected object

Table of other functions that you can use to directly get the data

Username is the common arguments of the all the functions

Functions Usage
getId ID of the username
getFullname Extract Fullname of the username
getBio Extract bio of the username
getExternalUrl Get External Url of the username
getLinkShimmed Get LinkShimmed of the username
getPosts Get Number of Posts of the username
getFollowers Get Number of Followers of the username
getFollowing Get Number of Following of the username
getPrivate True or False if the profile is private or public
getVerified True or False if the profile is verified
getConnected Get the user connection object

Usage

instaObj.getFullname(user).then(res => {
  const userFullname = res.data;
  console.log(userFullname);
  // => Joie
});

Get all the basic data in the single object

Usage

instaObj.getAll(user).then(res => {
  const userBasicAll = res.data;
  console.log(userBasicAll);
  // => {'id':1429637717}
});

Get profile pictures

Usage for Regular Picture

instaObj.instaRegular(user).then(res => {
  const userRegularImage = res;
  console.log(userRegularImage);
  // => "https://instagram.fdel22-1.fna.fbcdn.net/v/t51.2885-19/s150x150/23596544_189408294955120_549593597268197376_n.jpg?_nc_ht=instagram.fdel22-1.fna.fbcdn.net&oh=7fd3e57a8ee68ce98b46be778ed78d95&oe=5E836CF1"
});

Usage for HighDefiniton Picture

instaObj.instaHighDefination(user).then(res => {
  const userHDImage = res;
  console.log(userHDImage);
  // => "https://instagram.fdel22-1.fna.fbcdn.net/v/t51.2885-19/s150x150/23596544_189408294955120_549593597268197376_n.jpg?_nc_ht=instagram.fdel22-1.fna.fbcdn.net&oh=7fd3e57a8ee68ce98b46be778ed78d95&oe=5E836CF1"
});

License

MIT © Girish Baranda;