PHP code example of angeljunior / instagram-scraper

1. Go to this page and download the library: Download angeljunior/instagram-scraper 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/ */

    

angeljunior / instagram-scraper example snippets


$is = new angeljunior\InstagramScraper('RAPID-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');