Skip to Content

Profile Posts

An account's posts and reposts, newest first.

GET
/v1/x/profile/posts

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

handle?string

The account's handle (NASA), with or without @.

url?string

The profile's link, instead of handle.

cursor?string

nextCursor of the previous page.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.x.profilePosts({ handle: "NASA" });
Example Response
{  "data": [    {      "id": "2125971502923129200",      "url": "https://x.com/astro_anil/status/2125971502923129200",      "text": "From space to Earth: wishing you a happy thanksgiving.  From this vantage point there is so much to be grateful for on our planet.  We wish we could spend the holiday a little closer to you - we will be watching you from here!",      "createdAt": "2026-11-26T15:14:39.594Z",      "author": {        "id": "1456357980216066048",        "username": "astro_anil",        "displayName": "Anil Menon",        "avatarUrl": "https://pbs.twimg.com/profile_images/2052785413719212034/9NTTJaza_400x400.jpg",        "verified": true,        "url": "https://x.com/astro_anil"      },      "stats": {        "views": 212172,        "likes": 2413,        "comments": 92,        "shares": 362,        "saves": 122,        "engagementRate": 0.0135      },      "media": [        {          "kind": "video",          "url": "https://video.twimg.com/ext_tw_video/2125971421868208128/pu/vid/avc1/720x1280/BhYCb7zw6aIg_h6P.mp4?tag=12",          "thumbnailUrl": "https://pbs.twimg.com/ext_tw_video_thumb/2125971421868208128/pu/img/4FqM4hobh79s-F3I.jpg",          "width": 1080,          "height": 1920,          "durationSeconds": 108.466        }      ],      "hashtags": [],      "mentions": [],      "ext": {        "quotes": 28,        "language": "en",        "conversationId": "2125971502923129200",        "replyTo": null,        "repost": {          "by": {            "id": "11348282",            "username": "NASA",            "displayName": "NASA",            "avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",            "verified": true,            "url": "https://x.com/NASA"          },          "id": "2126050028032872522",          "at": "2026-11-26T20:26:41.439Z"        },        "quoted": null,        "pinned": false,        "sensitive": false,        "links": [],        "altTexts": [],        "playlists": [          "https://video.twimg.com/ext_tw_video/2125971421868208128/pu/pl/b0SJiylVorYYPLUO.m3u8?tag=12&v=77b"        ]      }    },    {      "id": "2125915027819446402",      "url": "https://x.com/NASA/status/2125915027819446402",      "text": "LIVE: Watch the Progress 97 spacecraft arrive and dock to the @space_station after a two-day trip.\n\nThe unpiloted spacecraft will autonomously dock at 7:11am ET (1211 UTC), delivering food, fuel, and supplies. https://x.com/i/broadcasts/2onVBonVMMWjaV",      "createdAt": "2026-11-26T11:30:14.880Z",      "author": {        "id": "11348282",        "username": "NASA",        "displayName": "NASA",        "avatarUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",        "verified": true,        "url": "https://x.com/NASA"      },      "stats": {        "views": 744407,        "likes": 1801,        "comments": 158,        "shares": 316,        "saves": 105,        "engagementRate": 0.0031      },      "media": [],      "hashtags": [],      "mentions": [        "space_station"      ],      "ext": {        "quotes": 26,        "language": "en",        "conversationId": "2125915027819446402",        "replyTo": null,        "repost": null,        "quoted": null,        "pinned": false,        "sensitive": false,        "links": [          "https://x.com/i/broadcasts/2onVBonVMMWjaV"        ],        "altTexts": [],        "playlists": []      }    }  ],  "pagination": {    "nextCursor": "DAAHCgABHYIpikI__-wLAAIAAAATMjEyMzc5ODMxNDg0Mzc4NzMwMAgAAwAAAAIAAA",    "hasMore": true  }}