API Description

X Post API — Collect X post details and available author, media and comment data.

Authenticate with your Pangolinfo API Key to receive structured JSON data.

Request URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/x-post

Request Headers

ParametersParameter valueTypeDescription
Content-Typeapplication/jsonstringData format
AuthorizationBearer xxxstringAuthorization Token

Collection takes up to approximately 75 seconds. Set your client timeout to 90 seconds.

Request Parameters

ParameterRequiredTypeDescription
targetYesstringTarget URL, supported ID or search keyword for this operation.

Only the request parameters listed on this page are used; other fields are ignored. Pass pagination cursors back unchanged, without encoding, decoding or conversion.

Included comments are limited to one page. Use the corresponding comments operation for more.

Response Fields

FieldTypeDescription
codeintegerStatus code; 0 indicates success.
messagestringResponse message; ok on success.
pointCostnumberPoints charged for this request.
dataobjectCollected data, with fields described below.
metaobjectRequest identifier and duration in milliseconds.
billingobjectCharged units, unit price and billing rule version.

data Fields

FieldTypeDescription
typestringResult type.
posterobjectPoster
postobjectPost, video or business details.
threadobject[]Thread
commentsobject[]Root comments in comment mode.
paginationobjectContinuation cursor and whether more results are available.

data.poster Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
usernamestring | nullUsername
avatarstring | nullAvatar URL.
profileUrlstring | nullAuthor profile URL.
idstring | nullRecord identifier.
verifiedbooleanVerified
verificationTypestring | nullVerification type
followersCountnumber | nullFollowers count
followingCountnumber | nullFollowing count
protectedbooleanProtected

data.post Fields

FieldTypeDescription
idstring | nullRecord identifier.
urlstring | nullContent URL.
contentstringContent text; may be null for records without text.
rawTextstring | nullRaw text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
repostsnumber | nullRepost count.
quotesnumber | nullQuotes
bookmarksnumber | nullBookmarks
viewsnumber | nullView count.
langstring | nullSubtitle language code, e.g. en. Manual captions take priority. If unavailable, the default track is returned.
possiblySensitivebooleanPossibly sensitive
isNoteTweetbooleanIs note tweet
communityNoteanyCommunity note
replyingTostring | nullReplying to
replyingToStatusstring | nullReplying to status
sourcestring | nullSource
mediaobject[]Media
mentionsobject[]Mentions
hashtagsstring | null[]Hashtags
urlsobject[]Urls
repostedByobject | nullReposted by
quoteobject | nullQuote

data.post.publishedAt Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.post.media[] Fields

FieldTypeDescription
typestring | nullResult type.
idstring | nullRecord identifier.
urlstring | nullContent URL.
thumbnailUrlstring | nullThumbnail url
widthnumber | nullWidth
heightnumber | nullHeight
durationSecnumber | nullDuration sec
formatstring | nullFormat
variantsobject[]Variants

data.post.mentions[] Fields

FieldTypeDescription
usernamestring | nullUsername
idstring | nullRecord identifier.

data.post.urls[] Fields

FieldTypeDescription
urlstring | nullContent URL.
displaystring | nullDisplay

data.post.repostedBy Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
usernamestring | nullUsername
avatarstring | nullAvatar URL.
profileUrlstring | nullAuthor profile URL.
idstring | nullRecord identifier.
verifiedbooleanVerified
verificationTypestring | nullVerification type
followersCountnumber | nullFollowers count
followingCountnumber | nullFollowing count
protectedbooleanProtected

data.post.quote Fields

FieldTypeDescription
idstring | nullRecord identifier.
urlstring | nullContent URL.
contentstringContent text; may be null for records without text.
rawTextstring | nullRaw text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
repostsnumber | nullRepost count.
quotesnumber | nullQuotes
bookmarksnumber | nullBookmarks
viewsnumber | nullView count.
langstring | nullSubtitle language code, e.g. en. Manual captions take priority. If unavailable, the default track is returned.
possiblySensitivebooleanPossibly sensitive
isNoteTweetbooleanIs note tweet
communityNoteanyCommunity note
replyingTostring | nullReplying to
replyingToStatusstring | nullReplying to status
sourcestring | nullSource
mediaobject[]Media
mentionsobject[]Mentions
hashtagsstring | null[]Hashtags
urlsobject[]Urls
repostedByobject | nullReposted by
quoteanyQuote
posterobjectPoster

data.thread[] Fields

FieldTypeDescription
idstring | nullRecord identifier.
urlstring | nullContent URL.
contentstringContent text; may be null for records without text.
rawTextstring | nullRaw text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
repostsnumber | nullRepost count.
quotesnumber | nullQuotes
bookmarksnumber | nullBookmarks
viewsnumber | nullView count.
langstring | nullSubtitle language code, e.g. en. Manual captions take priority. If unavailable, the default track is returned.
possiblySensitivebooleanPossibly sensitive
isNoteTweetbooleanIs note tweet
communityNoteanyCommunity note
replyingTostring | nullReplying to
replyingToStatusstring | nullReplying to status
sourcestring | nullSource
mediaobject[]Media
mentionsobject[]Mentions
hashtagsstring | null[]Hashtags
urlsobject[]Urls
repostedByobject | nullReposted by
quoteobject | nullQuote

data.thread[].publishedAt Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.thread[].media[] Fields

FieldTypeDescription
typestring | nullResult type.
idstring | nullRecord identifier.
urlstring | nullContent URL.
thumbnailUrlstring | nullThumbnail url
widthnumber | nullWidth
heightnumber | nullHeight
durationSecnumber | nullDuration sec
formatstring | nullFormat
variantsobject[]Variants

data.thread[].mentions[] Fields

FieldTypeDescription
usernamestring | nullUsername
idstring | nullRecord identifier.

data.thread[].urls[] Fields

FieldTypeDescription
urlstring | nullContent URL.
displaystring | nullDisplay

data.thread[].repostedBy Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
usernamestring | nullUsername
avatarstring | nullAvatar URL.
profileUrlstring | nullAuthor profile URL.
idstring | nullRecord identifier.
verifiedbooleanVerified
verificationTypestring | nullVerification type
followersCountnumber | nullFollowers count
followingCountnumber | nullFollowing count
protectedbooleanProtected

data.thread[].quote Fields

FieldTypeDescription
idstring | nullRecord identifier.
urlstring | nullContent URL.
contentstringContent text; may be null for records without text.
rawTextstring | nullRaw text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
repostsnumber | nullRepost count.
quotesnumber | nullQuotes
bookmarksnumber | nullBookmarks
viewsnumber | nullView count.
langstring | nullSubtitle language code, e.g. en. Manual captions take priority. If unavailable, the default track is returned.
possiblySensitivebooleanPossibly sensitive
isNoteTweetbooleanIs note tweet
communityNoteanyCommunity note
replyingTostring | nullReplying to
replyingToStatusstring | nullReplying to status
sourcestring | nullSource
mediaobject[]Media
mentionsobject[]Mentions
hashtagsstring | null[]Hashtags
urlsobject[]Urls
repostedByobject | nullReposted by
quoteanyQuote
posterobjectPoster

data.comments[] Fields

FieldTypeDescription
idstring | nullRecord identifier.
urlstring | nullContent URL.
contentstringContent text; may be null for records without text.
rawTextstring | nullRaw text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
repostsnumber | nullRepost count.
quotesnumber | nullQuotes
bookmarksnumber | nullBookmarks
viewsnumber | nullView count.
langstring | nullSubtitle language code, e.g. en. Manual captions take priority. If unavailable, the default track is returned.
possiblySensitivebooleanPossibly sensitive
isNoteTweetbooleanIs note tweet
communityNoteanyCommunity note
replyingTostring | nullReplying to
replyingToStatusstring | nullReplying to status
sourcestring | nullSource
mediaobject[]Media
mentionsobject[]Mentions
hashtagsstring | null[]Hashtags
urlsobject[]Urls
repostedByobject | nullReposted by
quoteobject | nullQuote
timeobject | nullPublication time.
avatarstring | nullAvatar URL.
nicknamestring | nullAuthor display name.
profileUrlstring | nullAuthor profile URL.
replysany[]Nested replies.
replyCountnumber | nullPlatform-reported reply count.
posterobjectPoster

data.comments[].publishedAt Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.comments[].media[] Fields

FieldTypeDescription
typestring | nullResult type.
idstring | nullRecord identifier.
urlstring | nullContent URL.
thumbnailUrlstring | nullThumbnail url
widthnumber | nullWidth
heightnumber | nullHeight
durationSecnumber | nullDuration sec
formatstring | nullFormat
variantsobject[]Variants

data.comments[].mentions[] Fields

FieldTypeDescription
usernamestring | nullUsername
idstring | nullRecord identifier.

data.comments[].urls[] Fields

FieldTypeDescription
urlstring | nullContent URL.
displaystring | nullDisplay

data.comments[].repostedBy Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
usernamestring | nullUsername
avatarstring | nullAvatar URL.
profileUrlstring | nullAuthor profile URL.
idstring | nullRecord identifier.
verifiedbooleanVerified
verificationTypestring | nullVerification type
followersCountnumber | nullFollowers count
followingCountnumber | nullFollowing count
protectedbooleanProtected

data.comments[].quote Fields

FieldTypeDescription
idstring | nullRecord identifier.
urlstring | nullContent URL.
contentstringContent text; may be null for records without text.
rawTextstring | nullRaw text
publishedAtobject | nullPublication time.
likesnumber | nullLike count.
commentsCountnumber | nullPlatform-reported comment total; not the number billed.
repostsnumber | nullRepost count.
quotesnumber | nullQuotes
bookmarksnumber | nullBookmarks
viewsnumber | nullView count.
langstring | nullSubtitle language code, e.g. en. Manual captions take priority. If unavailable, the default track is returned.
possiblySensitivebooleanPossibly sensitive
isNoteTweetbooleanIs note tweet
communityNoteanyCommunity note
replyingTostring | nullReplying to
replyingToStatusstring | nullReplying to status
sourcestring | nullSource
mediaobject[]Media
mentionsobject[]Mentions
hashtagsstring | null[]Hashtags
urlsobject[]Urls
repostedByobject | nullReposted by
quoteanyQuote
posterobjectPoster

data.comments[].time Fields

FieldTypeDescription
textstring | nullText value.
valuenumber | nullParsed value.

data.comments[].poster Fields

FieldTypeDescription
nicknamestring | nullAuthor display name.
usernamestring | nullUsername
avatarstring | nullAvatar URL.
profileUrlstring | nullAuthor profile URL.
idstring | nullRecord identifier.
verifiedbooleanVerified
verificationTypestring | nullVerification type
followersCountnumber | nullFollowers count
followingCountnumber | nullFollowing count
protectedbooleanProtected

data.pagination Fields

FieldTypeDescription
commentsobjectRoot comments in comment mode.

data.pagination.comments Fields

FieldTypeDescription
cursornullContinuation cursor from the previous response. Pass the value unchanged.
hasMorebooleanWhether more results are available.

Request Example

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/x-post \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://x.com/jack/status/20"
}'

Response Example

This excerpt shows the first item of each list. Long text and URLs are shortened; pointCost is the charge for the complete response. The playground contains the full schema.

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "post",
    "poster": {
      "nickname": "jack",
      "username": "jack",
      "avatar": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_200x200.jpg",
      "profileUrl": "https://x.com/jack",
      "id": "12",
      "verified": true,
      "verificationType": "individual",
      "followersCount": 12483523,
      "followingCount": 3,
      "protected": false
    },
    "post": {
      "id": "20",
      "url": "https://x.com/jack/status/20",
      "content": "just setting up my twttr",
      "rawText": "just setting up my twttr",
      "publishedAt": {
        "text": "2006-03-21T20:50:14.000Z",
        "value": 1142974214000
      },
      "likes": 324792,
      "commentsCount": 19221,
      "reposts": 126418,
      "quotes": 7973,
      "bookmarks": 25519,
      "views": null,
      "lang": "en",
      "possiblySensitive": false,
      "isNoteTweet": false,
      "communityNote": null,
      "replyingTo": null,
      "replyingToStatus": null,
      "source": null,
      "media": [],
      "mentions": [],
      "hashtags": [],
      "urls": [],
      "quote": null,
      "repostedBy": null
    },
    "thread": [
      {
        "id": "20",
        "url": "https://x.com/jack/status/20",
        "content": "just setting up my twttr",
        "rawText": "just setting up my twttr",
        "publishedAt": {
          "text": "2006-03-21T20:50:14.000Z",
          "value": 1142974214000
        },
        "likes": 324792,
        "commentsCount": 19221,
        "reposts": 126418,
        "quotes": 7973,
        "bookmarks": 25519,
        "views": null,
        "lang": "en",
        "possiblySensitive": false,
        "isNoteTweet": false,
        "communityNote": null,
        "replyingTo": null,
        "replyingToStatus": null,
        "source": null,
        "media": [],
        "mentions": [],
        "hashtags": [],
        "urls": [],
        "quote": null,
        "repostedBy": null
      }
    ],
    "comments": [
      {
        "time": {
          "text": "2024-03-21T19:02:40.000Z",
          "value": 1711047760000
        },
        "avatar": "https://pbs.twimg.com/profile_images/2068802435938689025/Iqb-7nQc_200x200.jpg",
        "nickname": "𝕯𝖊𝖗𝖇𝖊𝖉𝖊𝖗",
        "profileUrl": "https://x.com/derbederdusler",
        "replys": [],
        "id": "1770888775830262034",
        "url": "https://x.com/derbederdusler/status/1770888775830262034",
        "content": "@jack",
        "rawText": "@jack https://t.co/j0vbZrENcJ",
        "publishedAt": {
          "text": "2024-03-21T19:02:40.000Z",
          "value": 1711047760000
        },
        "likes": 8067,
        "commentsCount": 22,
        "reposts": 140,
        "quotes": 7,
        "bookmarks": 94,
        "views": 468586,
        "lang": null,
        "possiblySensitive": false,
        "isNoteTweet": false,
        "communityNote": null,
        "replyingTo": "jack",
        "replyingToStatus": "20",
        "source": null,
        "media": [
          {
            "type": "photo",
            "id": "1770888772571316224",
            "url": "https://pbs.twimg.com/media/GJN19MHXQAAeNDq.jpg?name=orig",
            "thumbnailUrl": null,
            "width": 1080,
            "height": 786,
            "durationSec": null,
            "format": null,
            "variants": []
          }
        ],
        "mentions": [
          {
            "username": "jack",
            "id": "12"
          }
        ],
        "hashtags": [],
        "urls": [],
        "quote": null,
        "repostedBy": null,
        "replyCount": 22,
        "poster": {
          "nickname": "𝕯𝖊𝖗𝖇𝖊𝖉𝖊𝖗",
          "username": "derbederdusler",
          "avatar": "https://pbs.twimg.com/profile_images/2068802435938689025/Iqb-7nQc_200x200.jpg",
          "profileUrl": "https://x.com/derbederdusler",
          "id": "1420469290369789958",
          "verified": true,
          "verificationType": "individual",
          "followersCount": 3903,
          "followingCount": 7452,
          "protected": false
        }
      }
    ],
    "pagination": {
      "comments": {
        "cursor": null,
        "hasMore": true
      }
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-x-post-1793954335367688500",
    "durationMs": 3319
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

Points Usage

0.8 points per post, video or business. Included comments, replies and author details are free.

Empty results and failed requests are not charged. Duplicate IDs are counted once within a response. Separate calls and pages are billed separately. See Social Media Reviews API billing.

Try it