Instagram Post Scraper — Details, Comments & oEmbed avatar

Instagram Post Scraper — Details, Comments & oEmbed

Pricing

from $0.75 / 1,000 results

Go to Apify Store
Instagram Post Scraper — Details, Comments & oEmbed

Instagram Post Scraper — Details, Comments & oEmbed

Fetch a post's full media object, its comments, or its oEmbed metadata, by shortcode, media ID, or URL, with optional author profile enrichment.

Pricing

from $0.75 / 1,000 results

Rating

0.0

(0)

Developer

The Netaji

The Netaji

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Share

The Actor resolves individual public Instagram posts. One field selects what to return — the full media object, a page of comments, or oEmbed embedding metadata — and posts can be identified by shortcode, media ID, or URL.

Selecting a mode

scraperType is required and determines what a run returns.

ValueLabelReturns
postDetailsPost DetailsThe full public media object and its first page of comments
postCommentsCommentsA page of comments for each post
oembedoEmbedEmbedding metadata: HTML block, author name, thumbnail

Accepted input

Each mode reads a different input field. Filling the wrong one leaves the run with nothing to fetch.

FieldTypeUsed byAccepts
scraperTypeenumRequired. postDetails, postComments, oembed.
postsarray of stringspostDetailsShortcode, numeric media ID, or full URL
codesarray of stringspostCommentsShortcode only
urlsarray of stringsoembedFull post or reel URL
enrichAuthorProfilebooleanallAttaches the author's profile to each post.
fullProfileDetailsbooleanallExtends the attached profile to the complete payload.
{
"scraperType": "postDetails",
"posts": [
"C9xY2zAqBcD",
"https://www.instagram.com/p/C9xY2zAqBcD/"
],
"enrichAuthorProfile": false
}

A shortcode is the segment after /p/ or /reel/ in a post URL. Only postDetails accepts all three forms; comments require the shortcode specifically and will not resolve a numeric media ID, and oEmbed requires a complete URL.

Response fields

FieldContents
pkInstagram media ID
codeShortcode
like_countLikes
comment_countComments
taken_atPublication timestamp
media_typeImage, video, or carousel
captionCaption text
author_profileAuthor's profile, with enrichAuthorProfile
author_enrichedWhether the author profile was fetched
source_codeThe identifier supplied for this row

In oEmbed mode the record instead carries html, author_name, and thumbnail_url.

{
"pk": "3412987456123456789",
"code": "C9xY2zAqBcD",
"like_count": 184220,
"comment_count": 1204,
"taken_at": 1785312000,
"author_enriched": false
}

Behaviour on partial results

Posts are fetched one request each. A post that returns nothing — deleted, made private, or a bad identifier — is logged as a warning and skipped; a request that fails outright is logged as an error. The run continues either way, so the number of records can be lower than the number of posts supplied.

Author enrichment runs after all posts are fetched rather than per post, so a run enriches once across the whole set. Posts sharing an author therefore do not each incur a separate lookup.

Frequently asked questions

Which mode returns all the comments on a post? None of them. postComments returns a page of comments, and postDetails includes the first page alongside the media object. Instagram paginates comments and does not expose a complete thread for heavily commented posts. comment_count reports the true total, so the count and the returned comments are expected to disagree — the count is authoritative and the comments are a sample.

What is oEmbed mode for? Embedding rather than analysis. It returns the HTML block Instagram publishes for putting a post on another page, plus the author name and thumbnail. It does not return like counts, captions, or comments; if those are the goal, postDetails is the mode.

Where does a shortcode come from? The post URL, as the segment after /p/ or /reel/. It is also the code field on every row returned by Instagram Profile Content Scraper and Instagram Popular Search Scraper, which is the practical way to obtain them in quantity.

Why did a comments run return nothing when the same posts worked in Post Details? Two reasons, both about which field was filled. Comments read codes rather than posts, so identifiers left in posts are ignored in that mode. And codes accepts the shortcode only — a numeric media ID, which postDetails resolves happily, will not resolve here. The code field on rows from the content and search Actors is already the right form.

What does enrichAuthorProfile cost when several posts share an author? Enrichment happens once for the batch after all posts are fetched, rather than once per post, so a set of posts from a single account does not multiply the cost by the number of posts.

Why is caption empty on some posts? The author published without one. The field is empty rather than absent, and the post is otherwise complete.

Can posts from a private account be fetched? No. Only public posts are readable, and no logged-in session is used.

ActorPurpose
Instagram Profile Content ScraperAn account's posts and reels, which supply shortcodes
Instagram Popular Search ScraperPosts by hashtag or keyword
Instagram User Info ScraperFull profile details for post authors
Instagram Location ScraperMetadata for locations tagged on posts