Official scripts
Explore our curated collection of scripts
Get Instagram home feed
Fetch the posts from your Instagram home (For You) feed.
Post Instagram comment
Post a comment on an Instagram post or reel by its shortcode. Returns comment_id, shortcode, comment, username, and created_at.
Get own Instagram profile
Read the logged-in Instagram account's own profile: handle, display name, bio, follower / following / post counts, profile picture and whether the account is private, verified or a business account.
Save Instagram post
Save (bookmark) an Instagram post or reel by shortcode. Clicks the action-bar bookmark and confirms the Save→Remove flip. Fails loudly if already saved (no Save button) or unavailable. Returns shortcode and saved.
Share Instagram post via DM
Share an Instagram post or reel to a user via DM. Works for both posts and reels; fails loudly if the recipient handle isn't found in search. Returns shortcode, username, and thread_key.
Like Instagram post
Like an Instagram post or reel by shortcode. Clicks the action-bar heart and confirms the Like→Unlike flip (server-driven). Fails loudly if the post is already liked (no Like button) or unavailable. Returns shortcode and liked.
Unblock Instagram user
Unblock an Instagram user from their profile. Fails loudly if the profile doesn't render an Unblock button (i.e. they weren't blocked). Returns username, user_id, and blocking.
Unsave Instagram post
Remove an Instagram post or reel from your saved items by shortcode. Clicks the filled action-bar bookmark and confirms the Remove→Save flip. Fails loudly if it wasn't saved (no Remove button) or unavailable. Returns shortcode and saved.
Get Instagram DM participants
List the participants of an Instagram DM thread by thread_id (from get_inbox) — mainly useful for group DMs. Returns each participant's username, full name, profile picture and whether they are the viewer or a group admin.
Get Instagram following
List the accounts an Instagram user follows by their username. count=0 fetches every page. Returns count, has_more, and following (pk, username, full_name, is_private, is_verified, profile_pic_url). You'll get the complete list only for your own account or accounts you follow; for anyone else Instagram serves a limited preview.
Block Instagram user
Block an Instagram user from their profile. Fails loudly if the profile doesn't render a Block option (e.g. already blocked). Returns username, user_id, and blocking.
Delete Instagram post
Delete one of your own Instagram posts or reels by shortcode. Opens the post, drives More options then Delete and the confirmation, and then reloads the post's link to prove it is really gone before reporting success. Returns the shortcode, the media id when Instagram exposes it, and whether the post was verified as removed. Fails clearly when the shortcode is not available to you (already deleted, private, or another account's) and when the post is still live after the confirmation.
Search Instagram users
Search Instagram accounts by keyword (name or handle). Returns ranked users with pk, username, full_name, is_private, is_verified, is_business, and profile_pic_url. Results are Instagram's own ranking; count is a hint the server may not honor exactly.
Unlike Instagram post
Remove your like from an Instagram post or reel by shortcode. Clicks the filled action-bar heart and confirms the Unlike→Like flip (server-driven). Fails loudly if the post wasn't liked (no Unlike button) or unavailable. Returns shortcode and liked.
Get Instagram tagged posts
Fetch posts an Instagram user is tagged in, by their numeric user_id (from get_profile). Returns total_count, next_max_id (pass back as max_id to paginate), and posts (code, url, owner, like_count, comment_count, caption, thumbnail, media_type, taken_at). Only tagged posts the account allows to be shown are returned.
Get Instagram user posts
Fetch the most recent posts from an Instagram user's profile, newest first. Returns code, url, taken_at, media_type, caption, like_count, comment_count, images, video_url, tagged_users, caption_mentions, coauthors, sponsor_tags, and is_paid_partnership. view_count is always null here; use get_user_reels for video play counts.
Get Instagram user reels
Fetch an Instagram user's reels by their username; count=0 returns all. Returns pk, code, url, taken_at, caption, thumbnail, video_url, like_count, play_count, comment_count, and video_duration. Results follow the profile feed order, not strictly newest-first.
Get Instagram user stories
Fetch a user's currently-active story items by their numeric user_id (from get_profile). Returns username and items (id, taken_at, expiring_at, media_type 1=photo/2=video, image_url, video_url). Empty items = no active story (they expire after 24h) or the account's stories aren't visible to you.
Create Instagram reel
Publish an Instagram reel from a video URL (fetched in-browser, max 25MB) or a local mp4 file (video_path, no size limit, requires a CLI-run device). Accepts the default cover and confirms the reel was shared, including the caption that was actually applied.
Follow Instagram user
Follow an Instagram user from their profile. outgoing_request=true means a pending request to a private account; fails if there's no Follow button (already followed/requested). Returns following, outgoing_request, followed_by, user_id.
Reply to Instagram comment
Post a threaded reply to a specific comment on an Instagram post or reel. Needs the post shortcode, the comment id (from get_post_comments' id field), and the reply text. Returns reply_id, shortcode, comment_id, and the posted text.
Get Instagram followers
List an Instagram user's followers by their username. count=0 fetches every page. Instagram serves the full list only to the owner or accounts you follow; for other accounts it returns a capped preview, then has_more flips false. Returns count, has_more, and followers (pk, username, full_name, is_private, is_verified, profile_pic_url).
Get Instagram profile highlights
List an Instagram user's Story Highlights by their numeric user_id (from get_profile). Returns each highlight's id, title, media_count, cover_image, created_at, and updated_at. This is the highlights tray on the profile, not the individual story items inside each highlight.
Mark an Instagram DM thread as read
Mark an Instagram DM conversation as read by opening it, by the conversation partner's username. Instagram has no separate "mark as read" button — opening a conversation is what clears its unread state — so this opens it and confirms the unread flag actually cleared. Idempotent — reports if the thread is already read instead of reopening it.
Unfollow Instagram user
Unfollow an Instagram user from their profile. Fails loudly if you weren't already following them — including when there's only a pending (not-yet-accepted) follow request to a private account, which this script doesn't withdraw. Returns username, user_id, following, followed_by, and outgoing_request.
