Social API

One X (Twitter) user's tweets and their engagement

An X account's tweets — its posts, reposts and replies — newest first, with full text and reply, repost, like and view counts.

GET/api/external/social/social-posts/{username}

What it returns

One X (Twitter) account's posts — its own, reposts, quotes and replies — newest first, up to 500 a page, each with its full text and its reply, repost, quote, like, bookmark and view counts. The newest posts can be an hour or so behind the live timeline. Follow nextPage for older ones. Not scoped to any chain. A username no tracked account has answers 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/<username>"
Parameters
ParameterDescription
page

query · integer · optional

Which page, from 1 (the newest) to 1000. Defaults to 1. Follow nextPage for the next one.
username

path · string · required

An X (Twitter) account by its username, with or without the leading "@" (e.g. "solana"), in any case — 1 to 15 letters, digits or underscores. Not a wallet address, and not scoped to any chain.

Response fields

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

Response fields of One X (Twitter) user's tweets and their engagement
FieldTypeDescription
usernamestringThe username asked about, without "@".
postsobject[]Newest first.
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.
nextPageinteger | nullThe page to ask for next. null on the last page.

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