1. Go to this page and download the library: Download instagramscraperapi/php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
instagramscraperapi / php-sdk example snippets
$is = new InstagramScraperAPI\InstagramScraper('API-KEY');
// by Username
$result = $is->getProfileByUsername('nike');
// by URL
$result = $is->getProfileByURL('https://www.instagram.com/nike/');
// by User Id
$result = $is->getMedias(13460080);
// by public Hashtag
$result = $is->getMediaByHashtag('travel');
// by public Place
$result = $is->getMediaByLocation(108424279189115);
// by Media Shortcode
$result = $is->getMediaByCode('CMe3AQxnhmd');
// by Media URL
$result = $is->getMediaByUrl('https://www.instagram.com/p/CMnW2SBMKiu/');
// by Hashtags
$result = $is->searchHashtags('travel');
// by Location
$result = $is->searchLocations('New york');
// by Userame
$result = $is->searchUsers('nik');
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.