PHPackages                             raiym/instagram-php-scraper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. raiym/instagram-php-scraper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

raiym/instagram-php-scraper
===========================

Instagram PHP Scraper. Get account information, photos and videos without any authorization

v0.12.9(3y ago)3.3k1.2M↓37%786[61 issues](https://github.com/postaddictme/instagram-php-scraper/issues)[1 PRs](https://github.com/postaddictme/instagram-php-scraper/pulls)6MITPHPPHP &gt;=7.2CI failing

Since Apr 22Pushed 1y ago157 watchersCompare

[ Source](https://github.com/postaddictme/instagram-php-scraper)[ Packagist](https://packagist.org/packages/raiym/instagram-php-scraper)[ Docs](https://github.com/raiym/instagram-php-scraper)[ RSS](/packages/raiym-instagram-php-scraper/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (115)Used By (6)

Instagram PHP Scraper
=====================

[](#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
------------

[](#dependencies)

- PHP &gt;= 7.2
- [PSR-16](http://www.php-fig.org/psr/psr-16/)
- [PSR-18](http://www.php-fig.org/psr/psr-18/)

Code Example
------------

[](#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
------------

[](#installation)

### Using composer

[](#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

[](#if-you-dont-have-composer)

You can download it [here](https://getcomposer.org/download/).

Examples
--------

[](#examples)

See examples [here](https://github.com/postaddictme/instagram-php-scraper/tree/master/examples).

Other
-----

[](#other)

Java library:

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity68

Solid adoption and visibility

Community45

Growing community involvement

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 69.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Recently: every ~33 days

Total

114

Last Release

1322d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.4.0

v0.10.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/53ccd7469f41dbedd3be852a972a33097a012e4ea17cdca230201f5e417353a3?d=identicon)[raiym](/maintainers/raiym)

---

Top Contributors

[![raiym](https://avatars.githubusercontent.com/u/5698585?v=4)](https://github.com/raiym "raiym (309 commits)")[![congkv](https://avatars.githubusercontent.com/u/3295246?v=4)](https://github.com/congkv "congkv (20 commits)")[![ricdijk](https://avatars.githubusercontent.com/u/2226726?v=4)](https://github.com/ricdijk "ricdijk (9 commits)")[![adam-szabo](https://avatars.githubusercontent.com/u/6370455?v=4)](https://github.com/adam-szabo "adam-szabo (8 commits)")[![Geolim4](https://avatars.githubusercontent.com/u/1332071?v=4)](https://github.com/Geolim4 "Geolim4 (7 commits)")[![aik27](https://avatars.githubusercontent.com/u/6603084?v=4)](https://github.com/aik27 "aik27 (7 commits)")[![drthief](https://avatars.githubusercontent.com/u/243979?v=4)](https://github.com/drthief "drthief (5 commits)")[![alexpablo](https://avatars.githubusercontent.com/u/1921893?v=4)](https://github.com/alexpablo "alexpablo (5 commits)")[![vitaly-alexandrovich](https://avatars.githubusercontent.com/u/11419996?v=4)](https://github.com/vitaly-alexandrovich "vitaly-alexandrovich (5 commits)")[![fonclub](https://avatars.githubusercontent.com/u/6120785?v=4)](https://github.com/fonclub "fonclub (5 commits)")[![Mulkave](https://avatars.githubusercontent.com/u/2647333?v=4)](https://github.com/Mulkave "Mulkave (5 commits)")[![notdest](https://avatars.githubusercontent.com/u/7280120?v=4)](https://github.com/notdest "notdest (5 commits)")[![wrinkleydog](https://avatars.githubusercontent.com/u/9877090?v=4)](https://github.com/wrinkleydog "wrinkleydog (4 commits)")[![devaskim](https://avatars.githubusercontent.com/u/86909129?v=4)](https://github.com/devaskim "devaskim (4 commits)")[![elliott-beach](https://avatars.githubusercontent.com/u/13651458?v=4)](https://github.com/elliott-beach "elliott-beach (4 commits)")[![mohsen-farahani](https://avatars.githubusercontent.com/u/2861717?v=4)](https://github.com/mohsen-farahani "mohsen-farahani (4 commits)")[![aleksei-s-popov](https://avatars.githubusercontent.com/u/3368890?v=4)](https://github.com/aleksei-s-popov "aleksei-s-popov (3 commits)")[![lmatosevic](https://avatars.githubusercontent.com/u/11697100?v=4)](https://github.com/lmatosevic "lmatosevic (3 commits)")[![Sorgor](https://avatars.githubusercontent.com/u/2776791?v=4)](https://github.com/Sorgor "Sorgor (3 commits)")[![eversionsystems](https://avatars.githubusercontent.com/u/20215473?v=4)](https://github.com/eversionsystems "eversionsystems (3 commits)")

---

Tags

instagraminstagram-apiinstagram-clientinstagram-php-scraperinstagram-scraperinstagram-sdkinstagramscraper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/raiym-instagram-php-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/raiym-instagram-php-scraper/health.svg)](https://phpackages.com/packages/raiym-instagram-php-scraper)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[guzzlehttp/guzzle

Guzzle is a PHP HTTP client library

23.5k1.0B35.4k](/packages/guzzlehttp-guzzle)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3856.2M31](/packages/gotenberg-gotenberg-php)[moodle/moodle

Moodle - the world's open source learning platform

7.2k88.5k88](/packages/moodle-moodle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
