PHPackages                             afif/instagram-mahmoud-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. afif/instagram-mahmoud-scraper

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

afif/instagram-mahmoud-scraper
==============================

this is for touta bakaboza

3.0(5y ago)056MITPHPPHP &gt;=7.2

Since Feb 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/afifkhalil/my-crawler-mine)[ Packagist](https://packagist.org/packages/afif/instagram-mahmoud-scraper)[ RSS](/packages/afif-instagram-mahmoud-scraper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

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)

```
$instagram = \InstagramScraper\Instagram::withCredentials(new \GuzzleHttp\Client(), 'username', 'password');
$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
```

or

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

### 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

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~32 days

Total

3

Last Release

1846d ago

Major Versions

1.0 → v2.02021-04-22

v2.0 → 3.02021-04-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/9435aa16b050bec2d6ef0fb7eff8c90a7580b92185ef7f7d994d01de075c0cf0?d=identicon)[khalilafif](/maintainers/khalilafif)

---

Top Contributors

[![afifkhalil](https://avatars.githubusercontent.com/u/15888866?v=4)](https://github.com/afifkhalil "afifkhalil (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/afif-instagram-mahmoud-scraper/health.svg)

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

###  Alternatives

[civicrm/civicrm-core

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

728272.9k20](/packages/civicrm-civicrm-core)[raiym/instagram-php-scraper

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

3.3k1.2M6](/packages/raiym-instagram-php-scraper)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.5M9](/packages/gehrisandro-tailwind-merge-php)[neos/flow-development-collection

Flow packages in a joined repository for pull requests.

144179.3k3](/packages/neos-flow-development-collection)[shopware/app-php-sdk

Shopware App SDK for PHP

1577.8k1](/packages/shopware-app-php-sdk)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)

PHPackages © 2026

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