Usage Guide
This section provides detailed descriptions of all the ways instagrapi can be used. If you are new to instagrapi, the
Getting Started page provides a gradual introduction of the basic functionality with examples.
Public vs Private Requests
Publicweb methods have a suffix_gql(InstagramGraphQL) or_a1(examplehttps://www.instagram.com/example/?__a=1)Private(authorized request via mobile api) methods have_v1suffix
Public web flows are opportunistic, not guaranteed. Instagram can change or block them independently of the library.
Many high-level helpers try a public/web path first and then use a private/authenticated fallback when that makes sense for the current session.
Not every high-level helper has a public and private twin. Some newer flows are private-only, while some lookup helpers use an internal fallback chain and choose the best currently working path for the session.
Detailed Sections
- Index
- Getting Started
- Interactions
Media- Publication (also called post): Photo, Video, Album, IGTV and ReelsResource- Part of Media (for albums)MediaOembed- Short version of MediaAccount- Full private info for your account (e.g. email, phone_number)User- Full public user dataUserShort- Short public user data (used in Usertag, Comment, Media, Direct Message)Usertag- Tag user in Media (coordinates + UserShort)Location- GEO location (GEO coordinates, name, address)Hashtag- Hashtag object (id, name, picture)Collection- Collection of medias (name, picture and list of medias)Comment- Comments to MediaHighlight- HighlightsNotes- Direct NotesStory- StoryStoryLink- Story link stickerStoryLocation- Tag Location in Story (as sticker)StoryMention- Mention users in Story (user, coordinates and dimensions)StoryHashtag- Hashtag for story (as sticker)StorySticker- Tag sticker to story (for example from giphy)StoryBuild- StoryBuilder return path to photo/video and mention co-ordinatesDirectThread- Thread (topic) with messages in Direct MessageDirectMessage- Message in Direct MessageInsight- Insights for a postTrack- Music track (for Reels/Clips)
- Best Practices
- Development Guide
- Handle Exceptions
- Exceptions