Skip to main content

Unofficial instagram API

Project description


image image GitHub

insta_api is a pythonic (unofficial) instagram client. It has been backwards engineered from the ground up. Currently it supports essential behavior such as liking, following other users, as well as posting photos.


To install simply do:

$ pip install insta_api

Example usage

Getting started

The first thing you should do is import the insta_api module

from insta_api import insta_api

Login to your instagram account

insta = InstaAPI()


Liking posts

You can like posts by either using shortcode or media_id. The shortcode can be obtained by looking at the URL of a post in the addressbar.

It looks something like this Bov3uZUFJRh

If you are a more advanced user, you may want to use the media_id instead, this will also work.

Following users

To follow an user you need one of two things: either their username or their unique user id

For example, to like by username:


And more...

See the documentation for more info.


You must set up your own testing server, like Jenkins, for example. This is because instagram will block any of the online CI integration tools due to the nature of their dynamic IPs

You should also configure your testing instagram credentials by adding the INSTA_API_USER and INSTA_API_PASSWORD environmental variables to your isolated testing system.



Copyright (c) 2013 Orlando Diaz

For more info see LICENSE


This program is in no way affiliated with, authorized, maintained, sponsored or endorsed by Instagram or any of its affiliates or subsidiaries. This is an independent and unofficial API. Use at your own risk

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for insta-api, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size insta_api-0.2.4-py3-none-any.whl (10.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size insta_api-0.2.4.tar.gz (10.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page