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.
/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>"
| Parameter | Description |
|---|---|
pagequery · integer · optional | Which page, from 1 (the newest) to 1000. Defaults to 1. Follow nextPage for the next one. |
usernamepath · 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.
| Field | Type | Description |
|---|---|---|
username | string | The username asked about, without "@". |
posts | object[] | Newest first. |
posts[].id | string | The post's id, a decimal string — the number at the end of its link. |
posts[].conversationId | string | null | The id of the post that opened its thread. null when not stated. |
posts[].authorId | string | null | The author's numeric X id, a decimal string. null when not stated. |
posts[].postedAt | integer | null | When it was posted, unix seconds. null when not stated. |
posts[].text | string | null | Its full text. A repost carries the reposted text, prefixed "RT @user:". null when empty. |
posts[].isRepost | boolean | null | Whether it is a repost of another post. null when not stated. |
posts[].isQuote | boolean | null | Whether it quotes another post. null when not stated. |
posts[].replyTo | object | null | The post it replies to. null when it is not a reply. |
posts[].replyTo.postId | string | null | The id of the post replied to. null when not stated. |
posts[].replyTo.userId | string | null | The replied-to author's numeric X id. null when not stated. |
posts[].replyTo.username | string | null | The replied-to author's username. null when not stated. |
posts[].replies | integer | null | Replies, when read. null when not stated. |
posts[].reposts | integer | null | Reposts, when read. null when not stated. |
posts[].quotes | integer | null | Quotes, when read. null when not stated. |
posts[].likes | integer | null | Likes, when read. null when not stated. |
posts[].bookmarks | integer | null | Bookmarks, when read. null when not stated. |
posts[].views | integer | null | Views, when read. null when not stated — some posts carry none. |
nextPage | integer | null | The 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