Community Posts
A community's top posts.
GET
apiKeyheader
AuthorizationBearer <token>An API key from the dashboard: Authorization: Bearer sapi_….
url?stringThe community's link (https://x.com/i/communities/1493446837214187523).
id?stringThe community's id, instead of url.
maxAge?integerHow old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.
Format
int64Range
0 <= valueThe answer.
application/json- response
A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.
data*array<>pagination*import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.x.communityPosts({ url: "https://x.com/i/communities/1493446837214187523" });Example Response
{ "data": [ { "id": "2124216278768341053", "url": "https://x.com/mike_dupa/status/2124216278768341053", "text": "I cut monthly cancellations on my app in half\n\nHere is how I did it and what I recommend:\n\n- Cut onboarding to 2 clicks to make it short\n- Turn on Stripe failed-payment emails (saves 3 in 10 renewals)\n- Offer every person who cancels a discount", "createdAt": "2026-11-21T19:00:01.545Z", "author": { "id": "1822528290625658880", "username": "mike_dupa", "displayName": "Mikey Builds", "avatarUrl": "https://pbs.twimg.com/profile_images/2117283252423524352/03itUBTv_400x400.jpg", "verified": true, "url": "https://x.com/mike_dupa" }, "stats": { "views": 8127, "likes": 531, "comments": 26, "shares": 19, "saves": 17, "engagementRate": 0.0709 }, "media": [], "hashtags": [], "mentions": [], "ext": { "quotes": 1, "language": "en", "conversationId": null, "replyTo": null, "repost": null, "quoted": null, "pinned": false, "sensitive": false, "links": [], "altTexts": [], "playlists": [] } }, { "id": "2115557010884190648", "url": "https://x.com/marckohlbrugge/status/2115557010884190648", "text": "My goal for http://buildinpublic.com is to become the definitive database of all makers and their projects\n\nTo that end, you can now add your projects to http://buildinpublic.com\n\nTo verify ownership and get the verified checkmark, just add the <meta name=\"twitter:creator\" content=\"@marckohlbrugge\"> tag to your site\n\nMany people already have this set up, so it seemed like an easy way to verify\n\nht…", "createdAt": "2026-10-28T21:31:11.200Z", "author": { "id": "641633", "username": "marckohlbrugge", "displayName": "Marc Köhlbrugge", "avatarUrl": "https://pbs.twimg.com/profile_images/1857124042433572864/iMivVaYP_400x400.jpg", "verified": true, "url": "https://x.com/marckohlbrugge" }, "stats": { "views": 54501, "likes": 472, "comments": 104, "shares": 16, "saves": 282, "engagementRate": 0.0109 }, "media": [ { "kind": "image", "url": "https://pbs.twimg.com/media/HVv0YX9XsAAZsE4.jpg", "thumbnailUrl": null, "width": 2560, "height": 1904, "durationSeconds": null } ], "hashtags": [], "mentions": [], "ext": { "quotes": 8, "language": "en", "conversationId": null, "replyTo": null, "repost": null, "quoted": null, "pinned": false, "sensitive": false, "links": [ "http://buildinpublic.com", "https://buildinpublic.com/projects" ], "altTexts": [], "playlists": [] } } ], "pagination": { "nextCursor": null, "hasMore": false }}