Note: This repo is no longer maintained. Instagram keeps changing their data structure which breaks the crawler. Many years ago you could use their API but that was revoked.
IG 9recent is a simple Instagram analytics tool for evaluating activity on specified accounts. This tool is useful for Internet marketers who are searching for influencer accounts with high engagement and activity. Previously this app interfaced with the Instagram API to pull the data, however in early June 2016 Instagram decided to require all API requests be authenticated per user, even the data they share publically. Therefore IG 9recent scrapes data without the need of an API. IG 9recent scans the most recent 9 photos of an Instagram account and spits out data for several fields:
- Static User data
- Profile Avatar
- Username
- Current Number of Followers
- Instagram User ID
- Current Number of Comments for Each Photo
- Current Number of Likes for Each Photo
- Total Number of Comments for All 9 Photos
- Average Number of Comments for All 9 Photos
- Total Likes of All 9 Photos
- Average Number of Likes for All 9 Photos
- Engagement Ratio
- [Likes + Comments] / Followers = Engagement Ratio
Once the data has been collected via the Instagram API, you will have the ability to store the results in a MySQL DB.
Copy the contents of 'config-sample.php' and create a new file named 'config.php'.
cp config-sample.php config.php
Open up your MySQL database in phpMyAdmin (or whatever DB management tool you prefer). Copy the contents of build_db.sql and paste them into a SQL query box. Run the statement to build the database.
After that edit the variables in config.php to connect to the MySQL database.
Note for Beginners:
This repository uses PHP and a CDN for Bootstrap. Therefore, you will need to utilize a web server to run the files. The quickest way is to use a local web server. XAMPP or MAMP/MAMP Pro will be your easiest solutions.
- Add commas for numbers in thousands
- Combine the 2 results tables into 1
- Hide results table on load, show it on click
- Figure out a non hacky way to load results instead of using setTimeout
- If any of the 9 pics returned is less than x hours old, discard it until you have 9 results that are > x hours old
- Store results and save them so they can be compared to future results
- Grey out submit button on results, otherwise hitting it again will double feed results
- Need to figure out a way to have the username box send a SQL query to the DB via historydisplay.php
- Clean up Update.php and historydisplay.php and remove the DB vars, include vars from config.php
- Hide Results Table until username is submitted
- Remove unnecessary console.log commands on production
- Fix sticky footer clipping the results table
- The "#result" div has responsive CSS issues
- Should be a cleaner way to remove the results on the page without reloading
- Update Database button should automatically populate the DB records table below
- Truncate queried records and paginate
- Issue alert if the scraper runs into a private account
- Display thumbnail of pics scraped
- Enable user to specify how many pics to scrape (currently limited to 12- pagination issue)
- Compare records on table (eg- plus-minus followers growth between records)
- Create an auto-crawling function on specified accounts
- Incorporate HighCharts into results
- Post frequency (eg- time between first and last post divided by 9)
- Number of hashtags per post
- Create a tracked accounts overview page (would probably require a login function)