Skip to main content
Visitor II
July 3, 2026
Question

Using STM32 and HTTP Client to Fetch Instagram Media Files Similar to Snapinsta.ink Approach

  • July 3, 2026
  • 1 reply
  • 13 views

I am working on an STM32 based IoT project where I want to fetch original quality media files from public Instagram post URLs and display them on a connected TFT screen. The concept is similar to how browser based tools like snapinsta.ink work where a public post URL is parsed to extract the direct media file URL which is then fetched as raw image data. My current implementation uses the STM32 HAL HTTP client library to send a GET request to the public post URL and parse the JSON response to extract the highest resolution media node before downloading the file to external flash storage. The main challenge I am running into is that the response payload size exceeds the STM32 heap allocation when trying to buffer the full response in memory before parsing. Has anyone implemented a similar HTTP response streaming and parsing workflow on STM32 and found a reliable way to handle large JSON payloads without loading the entire response into SRAM.

1 reply

Graduate
July 3, 2026

Hi,

You can take a look at this reference project for Nucleo-F429ZI that shows how to handle a large HTTP payload by storing it in flash instead.

https://github.com/mongoose-examples/nucleo-f429zi-large-http-upload

This example uses the Mongoose Networking Library. It’s a good fit for scenarios like this one, because it uses a simple event-driven API, meaning it triggers events as data arrives on the network (e.g. you get specific events for connections, entire HTTP frames, individual data chunks, etc.). So, this would allow you to catch the payload chunk by chunk and write it directly to storage instead.

While this example runs a HTTP server that receives a large POST and uploads the body directly to the internal flash, the same concept applies to an HTTP client receiving a large GET response. Mongoose is well documented here  and there are a lot of specific examples here.

You can just use the Mongoose networking/event-handler component as a reference, and simply replace the internal flash writing functions with your own logic to store the data in your external persistent memory.

Heads up: I am part of the Mongoose development team. Hope this helps you get your project working!