Voltar ao ranking

postaddictme/instagram-php-scraper

PHPpackagist.org/packages/raiym/instagram-php-scraper

Get account information, photos, videos, stories and comments.

instagraminstagram-apiinstagram-php-scraperinstagram-sdkinstagram-clientinstagram-scraper
Crescimento de estrelas
Estrelas
3.3k
Forks
786
Crescimento semanal
Issues
61
1k2k3k
jan. de 2023mar. de 2024mai. de 2025jul. de 2026
ArtefatosPackagistcomposer require postaddictme/instagram-php-scraper
README

Instagram PHP Scraper

This library is based on the Instagram web version. We develop it because nowadays it is hard to get an approved Instagram application. The purpose is to support every feature that the web desktop and mobile version support.

Dependencies

Code Example

use Phpfastcache\Helper\Psr16Adapter;

$instagram = \InstagramScraper\Instagram::withCredentials(new \GuzzleHttp\Client(), 'username', 'password', new Psr16Adapter('Files'));
$instagram->login();
$account = $instagram->getAccountById(3);
echo $account->getUsername();

Some methods do not require authentication:

$instagram = new \InstagramScraper\Instagram(new \GuzzleHttp\Client());
$nonPrivateAccountMedias = $instagram->getMedias('kevin');
echo $nonPrivateAccountMedias[0]->getLink();

If you use authentication it is recommended to cache the user session. In this case you don't need to run the $instagram->login() method every time your program runs:

use Phpfastcache\Helper\Psr16Adapter;

$instagram = \InstagramScraper\Instagram::withCredentials(new \GuzzleHttp\Client(), 'username', 'password', new Psr16Adapter('Files'));
$instagram->login(); // will use cached session if you want to force login $instagram->login(true)
$instagram->saveSession();  //DO NOT forget this in order to save the session, otherwise have no sense
$account = $instagram->getAccountById(3);
echo $account->getUsername();

Using proxy for requests:

// https://docs.guzzlephp.org/en/stable/request-options.html#proxy
$instagram = new \InstagramScraper\Instagram(new \GuzzleHttp\Client(['proxy' => 'tcp://localhost:8125']));
// Request with proxy
$account = $instagram->getAccount('kevin');
\InstagramScraper\Instagram::setHttpClient(new \GuzzleHttp\Client());
// Request without proxy
$account = $instagram->getAccount('kevin');

Installation

Using composer

composer.phar require raiym/instagram-php-scraper phpfastcache/phpfastcache

or

composer require raiym/instagram-php-scraper phpfastcache/phpfastcache

If you don't have composer

You can download it here.

Examples

See examples here.

Other

Java library: https://github.com/postaddictme/instagram-java-scraper

Repositórios relacionados
mvanhorn/last30days-skill

AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary

PythonPyPIMIT Licenseai-promptsclaude
53k4.6k
DIYgod/RSSHub

🧡 Everything is RSSible

TypeScriptnpmGNU Affero General Public License v3.0rsstwitter
docs.rsshub.app
45.3k10k
imputnet/cobalt

best way to save what you love

SvelteGNU Affero General Public License v3.0downloaderreddit
cobalt.tools
41.7k3.6k
GorvGoyl/Clone-Wars

100+ open-source clones of popular sites like Airbnb, Amazon, Instagram, Netflix, Tiktok, Spotify, Whatsapp, Youtube etc. See source code, demo links, tech stack, github stars.

GNU Affero General Public License v3.0clonetiktok
gourav.io/clone-wars
36.3k3.3k
transloadit/uppy

The next open source file uploader for web browsers :dog:

TypeScriptnpmMIT Licensetusresumable
uppy.io
30.9k2.1k
InstaPy/InstaPy

📷 Instagram Bot - Tool for automated Instagram interactions

PythonPyPIGNU General Public License v3.0instagramclarifai
18k3.9k
Datalux/Osintgram

Osintgram is a OSINT tool on Instagram. It offers an interactive shell to perform analysis on Instagram account of any users by its nickname

PythonPyPIGNU General Public License v3.0osintosint-python
13.6k3k
Instagram/IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.

Objective-CMIT Licenseuicollectionviewios
instagram.github.io/IGListKit/
13.1k1.5k
instaloader/instaloader

Download pictures (or videos) along with their captions and other metadata from Instagram.

PythonPyPIMIT Licenseinstagraminstagram-client
instaloader.github.io
12.9k1.6k
megadose/holehe

holehe allows you to check if the mail is used on different sites like twitter, instagram and will retrieve information on sites with the forgotten password function.

PythonPyPIGNU General Public License v3.0information-gatheringosint
11.8k1.5k
mrousavy/react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.

TypeScriptnpmMIT Licensereact-nativecamera
visioncamera.margelo.com
9.5k1.4k
mendel5/alternative-front-ends

Overview of alternative open source front-ends for popular internet platforms (e.g. YouTube, Twitter, etc.)

GNU Affero General Public License v3.0frontendinvidious
9k235