Edit an Instagram post's caption
Automatically edit an Instagram post's caption on instagram.com. Edit the caption of one of the signed-in account's own Instagram posts, given the post's code (from its /p/<code>/ URL or list_scripts' post-listing methods). Opens the post's own Edit info dialog, replaces the caption text, and saves. Only works on posts you own.
Input
code requiredThe post's code, the /p/<code>/ URL segment
caption requiredNew caption text to replace the current one
Output
code requirededited requiredcaption requiredFAQ
Get Instagram profile
Get an Instagram profile by username: exact follower, following and post counts, numeric user id, name, biography, verified/private/business flags, category, external link and profile picture. Requires being signed in to Instagram; a signed-out browser fails with that, and an unknown account fails as not found.
Send Instagram DM
Send a DM to an Instagram user by their username: plain text, an image attachment, or both together. Takes the image as base64 so it runs from any client. Returns ids/timestamps for whichever parts were sent, and the recipient-side restriction banner if one is shown right after sending.
Get Instagram post comments
Fetch the top-level comments of an Instagram post or reel by shortcode, in Instagram's own order, plus its caption and counts. Returns code, url, caption, comments (id, text, user, verified, created_at, like_count, reply_count), like_count, view_count, comment_count (Instagram's count, replies included), comments_disabled, and complete. Reads up to count comments (default 12); complete is true only when every top-level comment was read, false when count stopped the list first. Replies are not included. A post with no comments returns an empty list.
