Skip to main content

InstaBasic

PyPI PyPI - Python Version PyPI - License

InstaBasic is an API wrapper for Instagram's Basic Display API. I was in the process of writing python code using the Basic Display API, and I created this package for others to use. My goal for this is to support every official Basic Display API endpoint.

This package does not support the Instagram Graph API

Installation

pip install instabasic

Overview

The Instagram Basic Display API is an HTTP-based API for apps to get an Instagram user’s profile, images, videos, and albums. To use InstaBasic you will need to do the following:

  • Create a Facebook Developer Account
  • Create a public website
  • Provide Instagram users with an Auth link for access to their data.

Instagram's documentation includes a thorough overview of the API's capabilities. If you are unfamiliar with the Basic Display API, I recommend first reviewing their Get Started Guide before looking at InstaBasic's documentation.

Usage

from instabasic.api import API

app_id = 'YOUR APP ID'
app_secret = 'YOUR APP SECRET'
redirect_url = 'YOUR REDIRECT URL'

insta = API(appID, appSecret, redirectUrl)

# Authorization URL for your users to sign in
auth_url = insta.get_auth_url()
print(auth_url)

# Get the short lived access token (valid for 1 hour)
short_token = insta.get_short_token(auth_code)

# Exchange this token for a long lived token (valid for 60 days)
long_token = insta.get_long_token(auth_code)

# Refresh the long lived token
long_token = insta.refresh_long_token(long_token)

# Get information about the user
user = insta.get_user(long_token)

# Get information about the user's media
user_media = insta.get_user_media(long_token)

Documentation

Support

Contributing Documentation | Please feel free to contribute and suggest additional features.

Disclamer

InstaBasic is in no way affliated, endorsed, or certified by Instagram. This is an independent and unofficial package. Strictly not for spam. Use at your own risk.

Metadata

Release files for instabasic 0.1.7

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

Source distribution (sdist)

Source distribution for instabasic 0.1.7
File Size Uploaded
instabasic-0.1.7.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for instabasic 0.1.7
File Interpreter ABI Platform
instabasic-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / instabasic-0.1.7.tar.gz

Download URL instabasic-0.1.7.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
83a3967aba65a711b4eec7c2353a19600888fb8544e6f4cc7eff2ae4f2929bf0
BLAKE2b-256 checksum
How to use checksums
58beb5efca670c5395bd531878358c7de6358f4f3923f0dd6044e1e29d8f5651
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release files / instabasic-0.1.7-py3-none-any.whl

Download URL instabasic-0.1.7-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df279847c0d758cadca8dd4e6791ccc45639a75a40791013aa85da84b3071441
BLAKE2b-256 checksum
How to use checksums
70d841059b8326012161308c02d645ec40b419a981a873e39ae50929756b9046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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