App Logo

Official scripts

Explore our curated collection of scripts

instagram.com

Get Instagram home feed

Fetch the posts from your Instagram home (For You) feed.

instagram.com

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.

instagram.com

Post Instagram comment

Post a comment on an Instagram post or reel by its shortcode. Returns comment_id, shortcode, comment, username, and created_at.

instagram.com

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.

instagram.com

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.

instagram.com

Get Instagram user reels

Fetch an Instagram user's reels by their username; max=0 returns all. Returns pk, code, url, taken_at, caption, thumbnail, video_url, like_count, play_count, comment_count, and video_duration.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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.

instagram.com

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).

instagram.com

Create Instagram reel

Publish an Instagram reel from a video URL (fetched in-browser, max 25MB) or a local mp4 path (video_path, no size limit, needs a CLI-run device). Injects it into the composer (web posts videos as reels), accepts the default cover, and drives New post → reel notice → crop → edit → caption → Share. Confirms via the 'Reel shared' UI. Supersedes create_reel_from_file.

instagram.com

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.

instagram.com

Like Instagram comment

Like a specific comment on a post/reel. Needs the post shortcode and the comment id (from get_post_comments' id field). Locates the comment via its /c/<id>/ permalink, clicks its heart, and confirms the Like→Unlike flip. Fails loudly if already liked or the comment isn't found. Returns shortcode, comment_id, liked.

instagram.com

Unfollow Instagram user

Unfollow an Instagram user from their profile. Fails loudly if you weren't following them (the profile renders a "Follow" button instead); outgoing_request covers withdrawing a pending request to a private account. Returns username, user_id, following, followed_by, and outgoing_request.

instagram.com

Get Instagram post likers

Fetch the accounts that liked an Instagram post or reel by shortcode. Returns like_count, available_count (how many liker entries Instagram exposed in this preview — its own cap, not the full like_count for popular posts), and likers (username, full_name, is_private, is_verified, following, followed_by, profile_pic_url).

instagram.com

Get Instagram profile

Get an Instagram profile by username. With a session: exact data from Instagram's profile API (source=api). Logged out (expired session, login wall, datacenter IP): falls back to the page's public og metadata instead of failing (source=og_meta / og_meta_loginwall) — counts are approximate (K/M/B rounded) and unknown fields (biography, is_verified, is_private, is_business, category, external_url) are null. Returns source, username, user_id, full_name, biography, followers, following, posts, is_verified, is_private, is_business, category, external_url, and profile_pic_url.

instagram.com

Get Instagram DM attachment

Download the media attached to an Instagram DM message (photo, video, clip/reel share, voice note) by thread_id plus message id. Returns filename, mimeType, size and the bytes as base64, plus the direct media URL. Omit the message id to take the most recent media in the thread.

instagram.com

Unlike Instagram comment

Remove your like from a specific comment on a post/reel. Needs the post shortcode and the comment id (from get_post_comments' id field). Locates the comment via its /c/<id>/ permalink, clicks its filled heart, and confirms the Unlike→Like flip. Fails loudly if it wasn't liked or the comment isn't found. Returns shortcode, comment_id, liked.