taskType SOCIAL with platform instagram, and pick what to read with action. A completed request costs 0.5 credits.
Request
GET /v1/async/task/{id} or receive its webhook. See Async tasks.
Actions
username takes a username or a profile URL. postUrl takes a post, reel or IGTV URL, such as https://www.instagram.com/p/Df147tCiAyB/.
Parameters
query: Required forsearch. A keyword, hashtag word or brand name.limit: Optional.searchtakes 1 to 30, default 10.poststakes 1 to 12, default 12.commentstakes 1 to 500, default 50.
Response example
Result fields
- Every response echoes
platformandaction. Lists carryreturnedCount. profilereturnsid,username,displayName,biography,bioLinks,avatarUrl,profileUrl,isVerified,isPrivate,followerCount,followingCount,postCount,hasReels,highlights,threadsUsername,pronounsandrecentPosts.latestStoryAtappears while the account has a story up, andisMemorializedmarks a memorialized account.postsreturnsposts, the account’s 12 most recent posts withlikeCount,commentCountandpublishedAtread from each post’s own page.postreturnspostand the post’s firstcomments. A post hasid,code,url,mediaType(image,videoorcarousel),caption,imageUrl,images,videoUrl,width,height,likeCount,commentCount,publishedAt,username,authorFullName,authorIsVerified,authorProfileImageUrl,coauthors,taggedUsers,topics,audio(the song or the author’s original sound),hasAudio,captionIsEdited,aiLabelandcommentsDisabled.commentsreturnscomments, each withid,text,username,likeCount,replyCountandpublishedAt. A GIF comment carriesgifUrl.availableCountis the post’s comment count, andpartial: truemarks a list shorter than that count.searchreturnspostswithposition, the author’susername,authorId,authorIsVerifiedandauthorProfileImageUrl, andplayCounton reels.sourceisinstagramwhen Instagram has a search page for the keyword, which adds itstitle,relatedKeywordsand Instagram’s ownsummaryof the keyword with thesourcesits footnote numbers point to. For other keywordssourceisweb, andpostsholds public posts and reels from the last 30 days.- Instagram shows a signed-out visitor the 12 most recent posts of a profile and about a dozen comments of a post, and
posts,postandcommentsreturn those. Readpostfor the counts and publish time of a search result. - An account or post that does not exist, a private post, or a page Instagram shows only to signed-in visitors ends the task with
PAGE_UNAVAILABLE. Only completed requests are charged.