Social API

X (Twitter) posts by id, with their engagement

Up to 12 X posts by id: full text, author and reply, repost, like and view counts.

GET/api/external/social/social-posts-by-id/{ids}

What it returns

Up to 12 X (Twitter) posts by id, each with its author id, full text and its reply, repost, quote, like, bookmark and view counts, in the order asked. An id that finds no post — deleted, private, or never seen — is listed in notFound instead. Not scoped to any chain. When none of the ids finds a post the answer is 404.

Chains

This endpoint is not tied to a chain: it takes no chain in its request.

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/social/social-posts-by-id/<ids>"
Parameters
ParameterDescription
ids

path · string · required

One to twelve X (Twitter) post ids, comma-separated (e.g. "2107191997996097648,2106593231257706646") — the decimal id at the end of a post's link. Not a transaction hash.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of X (Twitter) posts by id, with their engagement
FieldTypeDescription
postsobject[]In the order the ids were asked, each id once.
posts[].idstringThe post's id, a decimal string — the number at the end of its link.
posts[].conversationIdstring | nullThe id of the post that opened its thread. null when not stated.
posts[].authorIdstring | nullThe author's numeric X id, a decimal string. null when not stated.
posts[].postedAtinteger | nullWhen it was posted, unix seconds. null when not stated.
posts[].textstring | nullIts full text. A repost carries the reposted text, prefixed "RT @user:". null when empty.
posts[].isRepostboolean | nullWhether it is a repost of another post. null when not stated.
posts[].isQuoteboolean | nullWhether it quotes another post. null when not stated.
posts[].replyToobject | nullThe post it replies to. null when it is not a reply.
posts[].replyTo.postIdstring | nullThe id of the post replied to. null when not stated.
posts[].replyTo.userIdstring | nullThe replied-to author's numeric X id. null when not stated.
posts[].replyTo.usernamestring | nullThe replied-to author's username. null when not stated.
posts[].repliesinteger | nullReplies, when read. null when not stated.
posts[].repostsinteger | nullReposts, when read. null when not stated.
posts[].quotesinteger | nullQuotes, when read. null when not stated.
posts[].likesinteger | nullLikes, when read. null when not stated.
posts[].bookmarksinteger | nullBookmarks, when read. null when not stated.
posts[].viewsinteger | nullViews, when read. null when not stated — some posts carry none.
notFoundstring[]The ids asked for that found no post — deleted, private, or never seen.

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key