The end result was a backup workflow that didn't require me to constantly troubleshoot Instagram session issues or maintain the scraping layer myself. I could focus on collecting the content I actually wanted to preserve: my posts, stories, and highlights.

Getting there meant comparing two approaches: instagrapi and a hosted REST API.

They solve a similar problem, but the maintenance responsibilities are quite different.

What I was trying to build

I wanted a straightforward way to back up my own Instagram content. Not a complicated analytics system — just a way to retrieve media and metadata and keep a local copy.

The things I cared about were:

Posts and their associated media

Stories while they were available

Highlights and their contents

Metadata needed to organize the downloaded files

The first approach I considered was running everything locally with instagrapi.

Option 1: instagrapi — self-hosted control

instagrapi is a Python library that lets you interact with Instagram through your own code and infrastructure.

The main advantage is control. I can decide how the application works, where data is stored, how requests are handled, and how the rest of the backup pipeline is structured.

What I liked

No API provider billing per request

Direct integration with Python

Full control over the workflow and storage

Easy to customize for a specific backup system

No external API service sitting between my application and the data retrieval layer

What I didn't like as much

Self-hosted doesn't mean maintenance-free.

Session management, authentication problems, compatibility changes, request failures, and debugging become my responsibility. If something stops working, I'm the one investigating it.

For a project where I enjoy maintaining the underlying integration, this is reasonable. For a backup job that I just want to run reliably, it becomes another thing to maintain.