scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTPost
  • POSTSearch

Instagram Post

2 credits

Fetch an Instagram post or reel with comments.

POST/api/v1/tools/instagram/post

Parameters

urlstringrequired

Instagram post, reel, or video. Accepts a /p/, /reel/, /reels/, or /tv/ URL, an instagram.com/share/ link, a post shortcode, or a numeric media ID (e.g. "https://www.instagram.com/p/DUVn_ewDjcI/").

maxCommentsnumber

Maximum number of comments to return. Must be a positive integer. Defaults to 200. Upper bound is determined by your plan.

topLevelOnlyboolean

Return only top-level comments. Replies are skipped, so no comment has a parentId. Defaults to false.

fieldsstring[]

Fields to include per comment. Omit for defaults: pk, text, createdAt, likeCount, childCommentCount, parentId, author. Available fields: pk, text, createdAt, likeCount, childCommentCount, parentId, author. Use ["*"] for all fields.

Response Schema

dataobject

Instagram post result

postobject

Post metadata

commentsobject[]

Array of comment objects. Each object has the fields chosen with the fields parameter.

totalCommentsnumber

Comment count reported by Instagram. It includes replies.

metaobject

Request metadata

toolstring

Tool name (instagram-post)

creditsUsednumber

Credits consumed (2)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/instagram/post \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.instagram.com/p/DUVn_ewDjcI/",
"maxComments": 50
}'

Response Example

{
"data": {
"post": {
"pk": "3825139344680564488",
"code": "DUVn_ewDjcI",
"takenAt": 1775721600,
"caption": "A rare glimpse of the northern lights over Iceland, captured by our photographer during a two-week expedition.",
"mediaType": 1,
"likeCount": 184500,
"commentCount": 1230,
"author": {
"pk": "787132",
"username": "natgeo",
"fullName": "National Geographic",
"profilePicUrl": "https://scontent.example/natgeo.jpg",
"isVerified": true
}
},
"comments": [
{
"pk": "17912345678901234",
"text": "Absolutely stunning. Iceland is on my bucket list.",
"createdAt": 1775722500,
"likeCount": 47,
"childCommentCount": 2,
"author": {
"pk": "45678",
"username": "travel_jane",
"fullName": "Jane Travels",
"profilePicUrl": "https://scontent.example/jane.jpg",
"isVerified": false
}
}
],
"totalComments": 1230
},
"meta": {
"tool": "instagram-post",
"creditsUsed": 2,
"requestId": "req_abc123"
}
}