Skip to Content

Post

One post with its views, likes, replies and reposts.

GET
/v1/x/post

Authorization

apiKey
headerAuthorizationBearer <token>

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

Query Parameters

url?string

The post's link (https://x.com/NASA/status/2125641758432284978).

id?string

The post's id, instead of url.

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

One item, as every single-item endpoint answers: { "data": … }.

data*

A post: text, images, a video, a link or a quote.

Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data } = await client.x.post({ url: "https://x.com/NASA/status/2125318351341994436" });
Example Response
{  "data": {    "id": "2125318351341994436",    "url": "https://x.com/NASA/status/2125318351341994436",    "text": "As part of a coordinated, whole-of-government effort, NASA has rapidly mobilized specialized research aircraft, space-based observation capabilities, and scientific personnel to support ongoing efforts at the Iowa Army Ammunition Plant in Middletown, Iowa. NASA stands ready to bring its unique capabilities and world-class scientific expertise to bear whenever called upon in service of the nation a…",    "createdAt": "2026-11-24T19:59:16.122Z",    "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": 14066458,      "likes": 37797,      "comments": 2160,      "shares": 3322,      "saves": 9658,      "engagementRate": 0.0031    },    "media": [],    "hashtags": [],    "mentions": [],    "ext": {      "quotes": 1611,      "language": "en",      "conversationId": null,      "replyTo": null,      "repost": null,      "quoted": null,      "pinned": false,      "sensitive": false,      "links": [],      "altTexts": [],      "playlists": []    }  }}