Instagram gives out json feed. You can use this little php snippet to create rss feed from the given json. The script leverages paging, which enables you to control the items count in the output feed.
Source code viewer
<?php // Content type in header to xml. // Your instagram user, how many pages to pull from instagram. $instagramUser = 'USER'; $limit = 3; // Define variables. $instagramJsonUrl = 'https://www.instagram.com/' . $instagramUser . '/?__a=1'; $has_next_page = 1; $end_cursor = null; $count = 1; $instagram = null; // Start of xml echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel>' . '<title>Instagram feed</title>' . '<link>https://browse-tutorials.com</link>' . '<description>PHP: Instagram to RSS feed</description>' . '<atom:link href="https://browse-tutorials.com/rss.xml" rel="self" type="application/rss+xml" />'; while ((int) $has_next_page === 1 and $count <= $limit) { // Append page id when not first page. $url = $instagramJsonUrl; if ($end_cursor !== null) { $url .= '&max_id=' . $end_cursor; } // Instagram feed download and decode. // Save variables for while loop. $has_next_page = $instagram['user']['media']['page_info']['has_next_page']; $end_cursor = $instagram['user']['media']['page_info']['end_cursor']; // Print current items. foreach ($instagram['user']['media']['nodes'] as $item) { echo '<item>'. '<title>' . $item['id'] . '</title>' . '<link>https://www.instagram.com/p/' . $item['code'] . '</link>' . '<description><![CDATA[' . $item['caption'] . ']]></description>' . '<guid>' . $item['id'] . '</guid>' . '<enclosure url="' . $item['thumbnail_src'] . '" length="" type="image/jpeg"/>' . '</item>'; } // Increase counter for limit. ++$count; } echo '</channel></rss>'; Programming Language: PHP