Skip to main content

insta_api

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.

Installation

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()
insta.login(USERNAME, PASSWORD)

Usage

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

insta.like(shortcode)

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:

insta.follow(my_username)

And more...

See the documentation for more info.

Testing

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.

Author(s)

Copyright

Copyright (c) 2013 Orlando Diaz

For more info see LICENSE

Legal

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

Release files for insta-api 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for insta-api 0.2.4
File Size Uploaded
insta_api-0.2.4.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for insta-api 0.2.4
File Interpreter ABI Platform
insta_api-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / insta_api-0.2.4.tar.gz

Download URL insta_api-0.2.4.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0f76f8b8281582e6341e441a630f37685af1735c50c779ced3907c1c757f4f06
BLAKE2b-256 checksum
How to use checksums
7161189621f38557cc64e98a2297cca68b8d4a9fee3ab58da4ff096eaeb82af5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release files / insta_api-0.2.4-py3-none-any.whl

Download URL insta_api-0.2.4-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
760d6d0cdd99badc7598b5c5a1b9920421f765acd3c54c1f24245fc9324c447a
BLAKE2b-256 checksum
How to use checksums
41628c939d14fcf8a2462550191acb476ec752d9ee9089d69e94f6a7baf81202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page