Skip to main content
Your users paste an Instagram reel link and your Python backend needs the video. Instagram’s own API only covers accounts that connect to your app, and anonymous requests from servers hit a login wall. This sends the public reel link to Importly and saves the finished MP4. It needs only requests.

The code

download_reel.py
/reel/ and /p/ links both work.

What comes back

The finished job from GET /import/status:
Set includeVideo: False in the request body for the audio only. All options are in Downloads.

Errors to handle

Importly fetches what’s public: private accounts, close-friends stories and anything behind a login fail and aren’t charged. Only download reels your users have the right to use. See Supported sites and Error handling.

In production

  • In a web app, don’t block a request on the loop. Pass webhookUrl and save the file when Importly calls you back (Webhooks); the Python (FastAPI) recipe shows the endpoints.
  • Copy the file somewhere permanent, or set store: true to have it land in your own bucket (recipe).
Downloads cost $0.002 per MB, with a $0.01 minimum. Try it free, no card required. See Pricing & credits.