PHPackages                             fmchan/instagram-user-feed - 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. fmchan/instagram-user-feed

ActiveLibrary[API Development](/categories/api)

fmchan/instagram-user-feed
==========================

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

6.16.4(3y ago)04MITPHPPHP &gt;=7.2.5

Since Jan 9Pushed 2y agoCompare

[ Source](https://github.com/fmchan/instagram-user-feed)[ Packagist](https://packagist.org/packages/fmchan/instagram-user-feed)[ Docs](https://github.com/pgrimaud/instagram-user-feed)[ Fund](https://www.paypal.me/grimaudpierre)[ GitHub Sponsors](https://github.com/pgrimaud)[ RSS](/packages/fmchan-instagram-user-feed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (75)Used By (0)

Instagram user feed PHP
=======================

[](#instagram-user-feed-php)

[![Build Status](https://github.com/pgrimaud/instagram-user-feed/actions/workflows/main.yaml/badge.svg)](https://github.com/pgrimaud/instagram-user-feed/actions)[![Packagist](https://camo.githubusercontent.com/9b8cb8fdb221c54d659d888db33dd54491ebafa5287425b10dfe8990681585e2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d696e7374616c6c2d627269676874677265656e2e737667)](https://packagist.org/packages/pgrimaud/instagram-user-feed)[![Coverage Status](https://camo.githubusercontent.com/59ec4991478b69380f012cf0fbeb87e0aa862611622d5ac4f484fe52b48a4693/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f706772696d6175642f696e7374616772616d2d757365722d666565642f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/pgrimaud/instagram-user-feed?branch=master)

[![Minimum PHP Version](https://camo.githubusercontent.com/16eb2cd7ff2e965c780c0320d6136053f17d30768a8ac7e7c2c15aaf667c3deb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706772696d6175642f696e7374616772616d2d757365722d666565642e7376673f6d61784167653d33363030)](https://packagist.org/packages/pgrimaud/instagram-user-feed)[![Last version](https://camo.githubusercontent.com/3d1c35489b09d18d1bc53b2414ac497decb034a8c3c9e46ff188e761a3857c41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706772696d6175642f696e7374616772616d2d757365722d666565643f6d61784167653d33363030)](https://packagist.org/packages/pgrimaud/instagram-user-feed)[![Total Downloads](https://camo.githubusercontent.com/9da93e2e42b19a311cfb1f0cf07c9ed458554f389e9f6fb588084b4ddfa9cfbb/68747470733a2f2f706f7365722e707567782e6f72672f706772696d6175642f696e7374616772616d2d757365722d666565642f646f776e6c6f616473)](https://packagist.org/packages/pgrimaud/instagram-user-feed)[![Visitor badge](https://camo.githubusercontent.com/71a63e8a81702e2ca5682c56245ab86942f43c1411f8e345b92438c51a6235cd/68747470733a2f2f76697369746f722d62616467652e676c697463682e6d652f62616467653f706167655f69643d706772696d6175642e696e7374616772616d2d757365722d66656564)](https://github.com/pgrimaud/instagram-user-feed)

[![All Contributors](https://camo.githubusercontent.com/7ece9c515037b0b82fe14addbbf28174d5805c51acec033f04b1ed2236ac2954/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f616c6c5f636f6e7472696275746f72732d32382d6f72616e67652e737667)](#contributors)

> **Warning**2022-11-09 - Instagram changed his DOM AGAIN... Please update to this version 6.16.4

> **Warning**2022-06-01 - Instagram changed his DOM content and profile data loading. Please update to this version 6.15.0

Information
-----------

[](#information)

Easily fetch any Instagram feed and more without OAuth for PHP.

If you like or use this package, please share your love by starring this repository, follow [@pgrimaud](https://github.com/pgrimaud) or [become a sponsor](https://github.com/sponsors/pgrimaud). 🙏💓

Features
--------

[](#features)

- Fetch profile data of user
- Fetch medias of user
- Fetch stories of user
- Fetch highlights stories of user
- Fetch detailed post of user
- Fetch feed of followers
- Fetch feed of followings
- Follow or unfollow users
- Like or unlike posts
- Fetch posts of hashtag
- Fetch comments of a post
- Fetch live-streaming info
- Fetch Reels
- Fetch IGTV
- Fetch medias where a user has been tagged on
- Fetch HD profile picture
- Post a message to a media
- **NEW: Login with cookies 🎉**
- **NEW: Fetch connected user timeline 🎉**

This version can retrieve **ANY** Instagram feed using **web scraping**.

- [Installation](#installation)
- [Usage](#usage)
- [Medias paginate](#paginate)
- [Stories](#stories)
- [Examples](https://github.com/pgrimaud/instagram-user-feed/tree/master/examples)

**⚠️ Version ^5.0 is no more maintained. ⚠️**

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

[](#installation)

```
composer require pgrimaud/instagram-user-feed

```

Changelog
=========

[](#changelog)

**v6.16** - 2022-08-02:

- Login with cookies. Thanks to [nsmle](https://github.com/nsmle) (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/login-with-cookies.php)) 🎉.
- Fetch connected user timeline. Thanks to [nsmle](https://github.com/nsmle) (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/timeline.php)) 🎉.
- Add full support for Symfony 6
- Add checks on missing properties to avoid errors

**v6.15** - 2022-06-02:

- ⚠️ ⚠️ Fix profile endpoint. Please update to this last version!

**v6.12** - 2021-09-20:

- Add method to post message on a media (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/post-comment.php)) 🎉.
- Add method to get HD profile picture (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/profile-alternative.php)) 🎉.

**v6.11** - 2021-09-13:

- Add method to fetch medias where a user has been tagged on (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/tagged-medias.php)) 🎉.

**v6.10** - 2021-09-03:

- Add method to fetch IGTV (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/igtv.php)) 🎉.
- Add method to fetch Reels (example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/reels.php)) 🎉.
- Split dirty tests in multiple files.

**v6.9** - 2021-09-02:

- Add method to fetch Instagram live-streaming info. Thanks to [David-Kurniawan](https://github.com/David-Kurniawan)
- Minor fixes.

**[v6.8](#version-68-strict-origin-when-cross-origin)** - 2021-07-08:

- Add video url in media feed. Thanks to [@Nispeon](https://github.com/Nispeon)
- Add helper to download media (ref to [\#205 : strict-origin-when-cross-origin](https://github.com/pgrimaud/instagram-user-feed/issues/205)). Thanks to [@Nispeon](https://github.com/Nispeon)
- Minor changes and improvements.

**v6.7** - 2021-01-31:

- New feature: get **post** of **hashtag**.
- New feature: get **comments** of **post**.
- Add support for PHP 8.
- Minor changes and improvements.

**v6.6** - 2020-10-06:

- New feature: **like** and **unlike** posts.
- Retrieval **\#hashtags** and **@mentions** from stories.
- Minor changes and improvements.

**v6.5** - 2020-09-14:

- New feature: follow and unfollow users. Thanks to [@David-Kurniawan](https://github.com/David-Kurniawan))
- Minor fixes.

**v6.4** - 2020-08-30:

- New feature: fetch followers and followings feeds. Thanks to [@David-Kurniawan](https://github.com/David-Kurniawan))
- Minor improvements.

**[v6.3](#version-63-checkpoint-challenge-bypass)** -2020-07-03:

- Add checkpoint challenge bypass using IMAP configuration.

**v6.2** - 2020-06-01:

- Improve medias crawling &amp;&amp; cache constraints.

**v6.1** - 2020-05-21:

- New feature: Fetch stories and highlights stories.

**[v6.0](#version-60-login)** - 2020-05-20

- Please upgrade from ^5.0 for cookies session stability.

Version ^6.8: strict-origin-when-cross-origin
---------------------------------------------

[](#version-68-strict-origin-when-cross-origin)

Facebook added a new CORS policy, and you can't display the data directly.

You can now download media on your storage or server to serve it directly on your website. You can find an example [here](https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/medias-download.php).

**Example:**

```
