PHPackages                             orsif/instagram-without-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. orsif/instagram-without-api

ActiveLibrary[API Development](/categories/api)

orsif/instagram-without-api
===========================

A simple PHP code to get unlimited instagram public pictures (users and tags) without api, without credentials (just token from cookies), just Instagram Scraping (with cookie and image data in base64).

v1.0.1(3y ago)49513MITPHPPHP &gt;=5.6.0

Since Apr 24Pushed 2y ago3 watchersCompare

[ Source](https://github.com/orsifrancesco/instagram-without-api)[ Packagist](https://packagist.org/packages/orsif/instagram-without-api)[ Docs](https://github.com/orsifrancesco/instagram-without-api)[ RSS](/packages/orsif-instagram-without-api/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

⛔️ DEPRECATED
=============

[](#️-deprecated)

Instagram moved the pictures array to another endpoint (with more than one redirect) making harder to catch images server side without scrapers like [Puppeter](https://pptr.dev/).

Althought is not perfect [![sniffagram](https://user-images.githubusercontent.com/6490641/232155875-ce2ea2ec-eeb5-4bcc-9af7-8c8d82887420.svg)](https://orsi.me/sniffagram) (as a temporary solution) works.

Maybe in the future I will share a new version, but judging by the many demands without any kind of gratitude and collaboration from the community, I have lost the desire.

 [![instagram-without-api](https://user-images.githubusercontent.com/6490641/182688224-3730f63d-0428-49d6-a909-5a31fc3a38b9.png)](https://user-images.githubusercontent.com/6490641/182688224-3730f63d-0428-49d6-a909-5a31fc3a38b9.png)

Instagram Without APIs
----------------------

[](#instagram-without-apis)

### Instagram Scraping **(@users and #tags)** in April 2023, no credentials required

[](#instagram-scraping-users-and-tags-in-april-2023-no-credentials-required)

This is a PHP library, are you looking for the same in Node.js? go to .

A simple PHP code to get **unlimited instagram public pictures** by **every user** without api, **without credentials** (just token from cookies), just Instagram Scraping in 2023 (with cookie and image data in base64).

You can get the latest pictures/information from an account or a single picture/information by id.

### [📦 Packagist link](https://packagist.org/packages/orsifrancesco/instagram-without-api)

[](#-packagist-link)

### [🛕 Cool Project Example](https://orsi.me/sniffagram) [![sniffagram](https://user-images.githubusercontent.com/6490641/232155875-ce2ea2ec-eeb5-4bcc-9af7-8c8d82887420.svg)](https://orsi.me/sniffagram)

[](#-cool-project-example-)

### [🎮 Demo / Example](https://orsifrancesco.github.io/instagram-without-api/how-to-show-base64-images.html)

[](#-demo--example)

### ⚖️ Licensed under MIT

[](#️-licensed-under-mit)

### 🤓 Author [@orsifrancesco](https://twitter.com/orsifrancesco)

[](#-author-orsifrancesco)

### ☕ [Coffees are welcome](https://www.paypal.com/donate/?business=5EL4L2LDYVH96) (in particular if you appreciate the project or you plan to contact me)

[](#-coffees-are-welcome-in-particular-if-you-appreciate-the-project-or-you-plan-to-contact-me)

---

📦 Installation from [Composer Repository](https://packagist.org/packages/orsifrancesco/instagram-without-api)
-------------------------------------------------------------------------------------------------------------

[](#-installation-from-composer-repository)

```
composer require orsifrancesco/instagram-without-api
```

📦 Installation from this Repository
-----------------------------------

[](#-installation-from-this-repository)

```
composer install

# download the file https://github.com/orsifrancesco/instagram-without-api/blob/master/test.php
# add your cookie, user-agent and x-ig-app-id following the next step "How to get Instagram Cookie"

php test.php
```

🍪 How to get Instagram Cookie
-----------------------------

[](#-how-to-get-instagram-cookie)

- Login to Instagram
- Go to your
- Open your Browser Console (on Chrome just pressing F12)
    1. Select the "Network" tab
    2. Search and click on "timeline/" file; if it is empty just refresh the page
    3. Select "Headers" bar
    4. Be sure the file is Request Method "POST" (if it is "OPTIONS" search the other "timeline/" file in the list)
    5. Scroll down and select "Request Headers" tab
    6. Copy all the code after the word "cookie: " and paste it on `$cookie` variable
    7. Copy all the code after the word "user-agent: " and paste it on `$userAgent` variable
    8. Copy all the code after the word "x-ig-app-id: " and paste it on `$xIgAppId` variable

```
- don't share your cookie code with anyone!!! it is the same of your credentials
```

- That's it, enjoy :)

[![follow this steps](https://user-images.githubusercontent.com/6490641/181632823-42fb2308-4c3f-421a-848a-58cefcf98915.png "follow this steps")](https://user-images.githubusercontent.com/6490641/181632823-42fb2308-4c3f-421a-848a-58cefcf98915.png)

💻 Images Base64
---------------

[](#-images-base64)

Although you can get the URLs of the images, Instagram doesn't give you the possibility to include and showing those images on your projects (they will be automatically blocked from their servers).
To solve this problem you will get all the URLs and all the images data in base64.
You can easily show the image data on your project with the following snippets of code:

```

```

```
.example { background-image: url('data:image/jpg;base64, hereYourBase64String..'); }
```

Check  for Base64 example.

🛕 Cool Project Example
----------------------

[](#-cool-project-example)

[![sniffagram](https://user-images.githubusercontent.com/6490641/232155875-ce2ea2ec-eeb5-4bcc-9af7-8c8d82887420.svg "sniffagram")](https://orsi.me/sniffagram)

🎮 Demo / Example
----------------

[](#-demo--example-1)

example on

```

```

🕹️ JSON outputs
---------------

[](#️-json-outputs)

output example for `Fetch::fetchByTag` or `Fetch::fetch` on

```
[
  {
    "id": "2696840872190940431",
    "time": 1635708506,
    "imageUrl": "https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/249938862_1214260935751176_32...",
    "likes": 18,
    "comments": 0,
    "link": "https://www.instagram.com/p/CVtGnwashUP/",
    "text": "#helloworld #domain #check",
    "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/7QB8UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGA.............",
    "location": "Liverpool Cathedral",
    "carousel": [
      {
        "imageUrl": "https://scontent.cdninstagram.com/v/t51.2885-15/314902884_370847155226583_8126....",
        "image": "/9j/4AAQSsasaakZJRgABAQAAAQABAAD/7QB8UGhvdGQAAAAAAGA............."
      },
      {
        "imageUrl": "https://scontent.cdninstagram.com/v/t51.2885-15/314674373_678631710324...",
        "image": "/9j/4AAQSkZJRgABAQAAAQdG9zaG9wIDMuMAA4QklNBAQAAAAAAGA............."
      }
    ]
  },
  {
    "id": "2654027113529608497",
    "time": 1630604708,
    "imageUrl": "https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/241221239_8640769...",
    "videoUrl": "https://scontent-lcy1-1.cdninstagram.com/v/t51.2885-15/e35/p1080x1080/241221239_8640769...",
    "likes": 38,
    "comments": 0,
    "link": "https://www.instagram.com/p/CTU_5keMAkx/",
    "text": "#london #uk #unitedkingdom #tube #underground #overground #sunrise #morning #morningvibes #sky #metro #line #prospective",
    "image": "/9j/4AAQSkZJRgABAQAAAQABAAD/7QB8UGhvdG9zaG9wIDMuMAA4Qkl...........",
    "location": "Eiffle Tower, Paris France."
  }
]
```

output example for `Fetch::fetchByIdUrl` or `Fetch::fetchById`

```
[
  {
    "id": "289855367...",
    "width": 1385,
    "height": 1731,
    "imageUrl": "https:\/\/scontent-lhr8-1.cdnin...",
    "time": 1659754546,
    "topLikers": [
        "franko"
    ],
    "likes": 32,
    "commentCount": 2,
    "comments": [
      {
        "time": 1659756069,
        "text": "This is a comment...",
        "user": {
          "username": "test",
          "fullName": "DearTest",
          "imageUrl": "https:\/\/scontent-lhr8-1.cdninstagram.com..."
        }
      }
    ],
    "link": "https:\/\/www.instagram.com\/p\/Cgczi6qMuh1\/",
    "text": "If you know it, you know it...",
    "user": {
      "username": "orsifrancesco",
      "fullName": "Frank",
      "imageUrl": "https:\/\/scontent-lhr8-1.cd..."
    },
    "image": "\/9j\/4AAQSkZJR....Q=="
  }
]
```

⚖️ License
----------

[](#️-license)

Licensed under MIT

☕ About
-------

[](#-about)

Any feedback to [@orsifrancesco](https://twitter.com/orsifrancesco) and [coffees](https://www.paypal.com/donate/?business=5EL4L2LDYVH96) are welcome :)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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

Total

2

Last Release

1165d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1670938?v=4)[Peyman Jahani](/maintainers/jahani)[@jahani](https://github.com/jahani)

---

Top Contributors

[![orsifrancesco](https://avatars.githubusercontent.com/u/6490641?v=4)](https://github.com/orsifrancesco "orsifrancesco (43 commits)")

---

Tags

instagraminstagram-apiinstagram-scraperphpscraperscrapingwithout-apiapiinstagram

### Embed Badge

![Health badge](/badges/orsif-instagram-without-api/health.svg)

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

###  Alternatives

[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

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

PHPackages © 2026

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