PHPackages                             ner0tic/php-instagram-api - 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. [API Development](/categories/api)
4. /
5. ner0tic/php-instagram-api

ActiveLibrary[API Development](/categories/api)

ner0tic/php-instagram-api
=========================

Instagram API client

2.0.3(12y ago)063[1 issues](https://github.com/ner0tic/php-instagram-api/issues)MITPHPPHP &gt;=5.3.2

Since Jan 3Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ner0tic/php-instagram-api)[ Packagist](https://packagist.org/packages/ner0tic/php-instagram-api)[ Docs](https://github.com/ner0tic/php-instagram-api)[ RSS](/packages/ner0tic-php-instagram-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

php-instagram-api
=================

[](#php-instagram-api)

ORM agnostic php library to access instagram api

Installation
============

[](#installation)

Add to composer

```
    "require": {
        "ner0tic/php-api-core":     "2.0.0",
        "ner0tic/php-instagram-api":   "*"
        // ...
```

Create your config file `app/config/instagram.yml`

```
url_client_id: XXXXXXXx
url_token: XXXXXXXx
http_password: XXXXXXXXXXX
```

Usage
=====

[](#usage)

```
$ig = new \Instagram\Client();

$photos = $ig->api('User')->recentMedia(); // recentMedia(array $options)

foreach($photos as $photo) {
  echo $photo // $photo->caption.' '.$photo->getLink()
}
```

Api's to choose from:

- user
- relationships
- media
- comments
- likes
- tags
- locations
- geographies

To set the auth settings manually

```
$ig = new \Instagram\Client();

$ig->setAuthClientId($id);
$ig->setAuthHttpPassword($pass);
$ig->setAuthUrlToken($token);
$ig->setAuthHttpToken($token);
```

If you have api keys to use, mash them into a [pem](http://www.fileinfo.com/extension/pem) file and set the `certificate` option to the path of the file.

```
$client->setOption('certificate', $pem_file);
```

Make a query

```
$result = $api->get($endpoint, $parameters, $request_options);
```

ToDo
====

[](#todo)

Laundry List

- DI to access config.yml for variables

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~21 days

Recently: every ~38 days

Total

8

Last Release

4733d ago

Major Versions

1.0.3 → 2.0.02013-05-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/161227?v=4)[David Durost](/maintainers/ner0tic)[@ner0tic](https://github.com/ner0tic)

---

Top Contributors

[![ner0tic](https://avatars.githubusercontent.com/u/161227?v=4)](https://github.com/ner0tic "ner0tic (34 commits)")

---

Tags

apiinstagramsocialphoto

### Embed Badge

![Health badge](/badges/ner0tic-php-instagram-api/health.svg)

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

###  Alternatives

[pgrimaud/instagram-user-feed

This is a scraper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.

940657.1k5](/packages/pgrimaud-instagram-user-feed)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)

PHPackages © 2026

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