X community posts API
The posts X shows logged-out visitors on a community page: its 20 most-liked posts.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
There is no next-page cursor.
You send one of url or id.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/twitter/community/tweets" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'url=https://x.com/i/communities/1926186499399139650'import os
import requests
params = {
"url": "https://x.com/i/communities/1926186499399139650",
}
res = requests.get(
"https://api.socialscrape.io/v1/twitter/community/tweets",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/twitter/community/tweets");
url.search = new URLSearchParams({
url: "https://x.com/i/communities/1926186499399139650",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape X community posts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/twitter/community/tweets",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "https://x.com/i/communities/1926186499399139650"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | one of | Community URL (x.com/i/communities/<id>). |
id | string | one of | Community id. Also accepted as community_id. |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_a7469874b589e1cc4ab51e64",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "twitter",
"id": "2106954044686397612",
"url": "https://x.com/jasonjias/status/2106954044686397612",
"type": "tweet",
"author": {
"id": "1354812288637624325",
"handle": "jasonjias",
"name": "Jason",
"url": "https://x.com/jasonjias",
"avatar_url": "https://pbs.twimg.com/profile_images/2114534411945549824/KN5K-5jf_400x400.jpg",
"verified": true
},
"title": null,
"text": "I’m a solo founder in Palo Alto\n\nif you’re a founder, builder, or working on ai, tech, or cool stuff let’s connect!\n\nLet’s grow together!",
"published_at": "2026-10-05T03:46:04Z",
"duration_seconds": null,
"language": "en",
"hashtags": null,
"mentions": null,
"stats": {
"views": 296,
"likes": 14,
"comments": 12,
"shares": 0,
"saves": 0,
"dislikes": null
},
"media": {
"thumbnail_url": null,
"video_url": null,
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"is_edited": false,
"quote_count": 0,
"retweet_count": 0
}
},
{
"object": "post",
"platform": "twitter",
"id": "2112578838681260376",
"url": "https://x.com/yashsrivasta7a/status/2112578838681260376",
"type": "tweet",
"author": {
"id": "1677001600416772096",
"handle": "yashsrivasta7a",
"name": "Yash Srivastava",
"url": "https://x.com/yashsrivasta7a",
"avatar_url": "https://pbs.twimg.com/profile_images/2103762831762161664/Kgf3TUpk_400x400.jpg",
"verified": false
},
"title": null,
"text": "DeskNotch just crossed 41 installs :\n\nSmall number, but every one of them is a real person who wanted a notch on Windows.\n\nNext goal: 100. \n\nLink : https://...",
"published_at": "2026-10-20T16:16:59Z",
"duration_seconds": null,
"language": "en",
"hashtags": null,
"mentions": null,
"stats": {
"views": 122,
"likes": 6,
"comments": 0,
"shares": 3,
"saves": 0,
"dislikes": null
},
"media": {
"thumbnail_url": "https://pbs.twimg.com/media/HVFiYOMawAAYLBS.png",
"video_url": null,
"audio_url": null,
"image_urls": [
"https://pbs.twimg.com/media/HVFiYOMawAAYLBS.png"
],
"width": 462,
"height": 237
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"is_edited": false,
"links": [
{
"display_url": "apps.microsoft.com/detail/9nbwqjc…",
"url": "https://apps.microsoft.com/detail/9nbwqjcvmjgp?cid=DevShareMCLPCS&hl=en-GB&gl=IN"
},
{
"display_url": "github.com/yashsrivasta7a…",
"url": "https://github.com/yashsrivasta7a/deskNotch/"
}
],
"media": [
{
"height": 237,
"type": "photo",
"url": "https://pbs.twimg.com/media/HVFiYOMawAAYLBS.png",
"width": 462
}
],
"possibly_sensitive": false,
"quote_count": 0,
"retweet_count": 3
}
}
],
"cursor": null,
"has_more": false,
"parent": {
"object": "community",
"platform": "twitter",
"id": "1926186499399139650",
"url": "https://x.com/i/communities/1926186499399139650",
"kind": "community",
"name": "The First Thousand",
"title": "The First Thousand",
"description": "This community is for creators and builders who are growing to their first 1,000 followers. Give insights, build your brand, and grow a loyal audience.",
"avatar_url": null,
"banner_url": "https://pbs.twimg.com/community_banner_img/1930048753223745537/Ua814CNc?format=jpg&name=orig",
"member_count": 5625,
"online_count": null,
"is_nsfw": false,
"is_private": null,
"verified": null,
"created_at": "2025-05-24T08:00:22.931000Z",
"extra": {
"creator": {
"handle": "sample_user",
"id": "1000000001",
"name": "Sample User",
"url": null,
"verified": true
},
"join_policy": "Open",
"member_handles": [
"sample_user",
"sample_user",
"sample_user"
],
"rules": [
{
"description": "This isn’t the space to drop ChatGPT engineered empty platitudes",
"id": "1926189963793609186",
"name": "No Empty Platitudes"
},
{
"description": "Show how you’re cracking the algorithm",
"id": "1926190339016048686",
"name": "Post What’s Working"
},
{
"description": "Post your analytics. Let’s compete to see who is going the hardest",
"id": "1926190261610135711",
"name": "Share Your Stats"
}
]
}
}
},
"cursor": null,
"has_more": false
}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.twitter.community_tweets(...) and the TypeScript client client.twitter.communityTweets(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.