How do I continue from an Instagram post or Reel link to text, engagement and comments?
Pass the Instagram post or Reel URL as code_or_url to instagram.v2.fetch_post_info. Verify the shortcode and account in the detail response before reading caption.text and engagement fields. For comments, pass the string pk from the same detail response as media_id to instagram.fetch_post_comments_v2.
For example, for a launch Reel a colleague shared, one detail response supplies both the engagement snapshot and the media_id needed for the comment request.
How do I request details from the link?
Pass the full URL or the shortcode as code_or_url to data:instagram.v2.fetch_post_info:
The alternative detail action data:instagram.v3.get_post_info accepts a URL or a numeric media_id; the url parameter supports /p/, /reel/, /reels/, and /tv/ paths. Pass the single target input you already have, and do not combine values that point to different posts.
What do I confirm in the detail response?
Check the success status, shortcode, account, and caption. The v2 post object is at data.data. For v3, find the item whose code matches in data.items[]; do not assume the first item is your target. caption.text is the post caption, not a verbatim video transcript.
For engagement, use the snapshot workflow. For comments, comment_handoff.py below extracts pk from the matching post object. Keep the saved detail response and provenance metadata so later snapshot and comment steps reuse the saved response instead of repeating the detail request.
I have a Reel URL, but the comment exporter needs media_id
instagram.v2.fetch_post_info and instagram.v3.get_post_info accept a URL, whereas instagram.fetch_post_comments_v2 requires a numeric string media_id. Reuse a saved successful detail response, match the requested shortcode, and read the matched item’s pk: data.data.pk in v2, or data.items[].pk on the single item with the matching code in v3. Do not use a user ID, a composite item id, the shortcode itself, or an ID that passed through a floating-point number.
If you already saved details for the metric-snapshot guide, do not pay for details again just to get pk. Create detail-meta.json beside the saved detail response, recording the actual request and collection time:
The URL is illustrative; use the exact shortcode or URL you requested. For v3, record action as instagram.v3.get_post_info and put the URL in params.url. Save the script below as comment_handoff.py and run python3 comment_handoff.py detail-meta.json reel-comments. The script writes the unchanged detail evidence and a first-page comment request into reel-comments/ without sending the request.
Inspect comments-request.json: media_id must equal the original string pk of the code-matched item, and page one has no min_id. Keep identity-evidence.json and detail-source.json with the later comment archive. Send the comments-request.json body only within the comments budget, then save the actual response with the root-comment export guide. The saved detail proves which returned media ID you used; the saved detail does not prove that comments are available or that all replies were retrieved.
New details and new comments are charged separately at the current pricing. Reuse existing details and pay only for the selected comment step. When required fields are missing or the item match is ambiguous, review the source response before going further.
comment_handoff.py accepts pk only as the documented numeric string. comment_handoff.py refuses a bare JSON number even when Python can hold the integer, because a local script cannot repair precision loss introduced by an earlier numeric conversion. comment_handoff.py also does not derive pk by splitting a generic id field.

