New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

instagram-scrape-account-stats

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

instagram-scrape-account-stats

scrape public Instagram data w/out API access

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Instagram Scrape Account Stats

Build Status NPM version NPM license

A tool for scraping public data from Instagram, without needing to get permission from Instagram. It scrapes the following fields:

  • description
  • followers
  • following
  • isExplicit
  • isPrivate
  • isVerified
  • name
  • posts
  • userId
  • username
  • website

See lib/response.schema.json for further details.

Example

CLI

The CLI operates entirely over STDOUT, and will output the account stats as JSON.

$ instagram-scrape-account-stats -u slang800
{"description":null,"followers":21,"following":90,"isExplicit":false,"isPrivate":false,"isVerified":false,"name":"Sean Lang","userId":"465981344","username":"slang800","posts":2,"website":"http://slang.cx"}

JavaScript Module

The following example is in CoffeeScript.

{getAccountStats} = require 'instagram-scrape-account-stats'

getAccountStats(username: 'slang800').then((account) ->
  console.log "#{account.username} has #{account.followers} followers."
)

The following example is the same as the last one, but in JavaScript.

var getAccountStats = require('instagram-scrape-account-stats').getAccountStats;

getAccountStats({username: 'slang800'}).then(function(account) {
  console.log(account.username + " has " + account.followers + " followers.");
});

Why?

Instagram doesn't provide an open, structured, and machine readable API, so, we're forced to scrape their user-facing site.

Caveats

  • This is probably against the Instagram TOS, so don't use it if that sort of thing worries you.
  • Whenever Instagram updates certain parts of their front-end this scraper will need to be updated to support the new API.
  • You can't scrape protected accounts (cause it's not public duh).

Keywords

FAQs

Package last updated on 25 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc