<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 梁小君</title>
    <description>The latest articles on DEV Community by 梁小君 (@_e8621d5946b193c95aa3a).</description>
    <link>https://dev.to/_e8621d5946b193c95aa3a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4236959%2F338e32e6-e12e-4ddc-90a2-2c5d8bf96ef6.png</url>
      <title>DEV Community: 梁小君</title>
      <link>https://dev.to/_e8621d5946b193c95aa3a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_e8621d5946b193c95aa3a"/>
    <language>en</language>
    <item>
      <title>Fetching age-restricted Instagram reels by URL</title>
      <dc:creator>梁小君</dc:creator>
      <pubDate>Tue, 10 Nov 2026 11:33:12 +0000</pubDate>
      <link>https://dev.to/_e8621d5946b193c95aa3a/fetching-age-restricted-instagram-reels-by-url-41jg</link>
      <guid>https://dev.to/_e8621d5946b193c95aa3a/fetching-age-restricted-instagram-reels-by-url-41jg</guid>
      <description>&lt;p&gt;I needed to resolve Instagram reel/post URLs to direct media links, including posts that Instagram only shows to logged-in adults ("This content isn't available to everyone"). I tested a few data APIs against the same set of real URLs. Notes from the experiment:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public-data scrapers can't see age-restricted posts.&lt;/strong&gt; Large scraping platforms that only collect publicly visible data returned errors like "The post is age-restricted" for every restricted URL in my set. That's expected — logged-out visitors can't see them either.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Login-backed APIs can.&lt;/strong&gt; &lt;a href="https://hikerapi.com" rel="noopener noreferrer"&gt;HikerAPI&lt;/a&gt; resolved 35 of 38 age/audience-restricted posts in my sample. A single call returns CDN links for the video and cover:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://api.hikerapi.com/v1/media/by/url"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://www.instagram.com/reel/&amp;lt;code&amp;gt;/"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"x-access-key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"YOUR_KEY"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Limitations I hit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Private accounts: nothing comes back, which is how it should be.&lt;/li&gt;
&lt;li&gt;Stories: stories under 24 hours old worked; older ones that live in highlights returned StoryNotFound by story URL.&lt;/li&gt;
&lt;li&gt;Billing counts 4xx answers too (200/403/404 are billed, 5xx are not), so dedupe and cache before calling.&lt;/li&gt;
&lt;li&gt;Default throughput is 15 requests/second per account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you only need public posts, almost any scraper works. For restricted content, check whether the provider is login-backed before comparing prices.&lt;/p&gt;

</description>
      <category>api</category>
      <category>backend</category>
      <category>python</category>
      <category>webscraping</category>
    </item>
  </channel>
</rss>
