konnco/laravel-instagram-crawler

Get your medias from instagram as easy as you can imagine.

v0.1.1-alpha 2020-05-28 04:26 UTC

README

This package is designed to do simple Instagram Crawler in Laravel framework.

This package based on this repository Smochin/instagram-php-crawler.

Because this package has not been updated for more than 2 years, we make a copy and do some changes about updated instagram's data.

This package is still in alpha version, so the update may broke your application.

Installation

Package is available on Packagist, you can install it using Composer.

composer require konnco/laravel-instagram-crawler

Dependencies

  • PHP 7
  • json extension
  • cURL extension

Get started

Initialize the Crawler

$crawler = new Konnco\InstagramCrawler\InstagramCrawler();

Return the simple result from instagram (url, image url, comment count, and like count)

$media = $crawler->getMediaByUser('instagram')->returnSimpleResult();

Return the full result from instagram

$media = $crawler->getMediaByUser('instagram')->returnFullResult();

Get a list of recently tagged media

$media = $crawler->getMediaByTag('php')->returnSimpleResult();

Get a list of recent media from a given location

$media = $crawler->getMediaByLocation(225963881)->returnSimpleResult();

Get the most recent media published by a user

$media = $crawler->getMediaByUser('instagram')->returnSimpleResult();

Get information about a media

$media = $crawler->getMedia('0sR6OhmwCQ');

Get information about a user

$user = $crawler->getUser('jamersonweb');

Get information about a location

$location = $crawler->getLocation(225963881);

Get information about a tag

$tag = $crawler->getTag('php');

Search for hashtags, locations and users

$result = $crawler->search('recife');

Authors

Contributing

we appreciate all contributions, feel free to write some code or request package.