Docs menu

X community posts

Beta GET /v1/twitter/community/tweets

GET /v1/twitter/community/tweets

The posts X shows logged-out visitors on a community page: its 20 most-liked posts. There is no next-page cursor.

  • Cost: 1 credit
  • Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
  • Cache: Results are kept up to 30 days; send max_age_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
urlURLone ofCommunity URL (x.com/i/communities/<id>). Accepted hosts: x.com, twitter.com.
idstringone ofCommunity id. Also accepted as community_id.

Send at least one of url, id. If you send several, the first listed is used and the rest are ignored.

Every request also accepts:

  • cursor: the cursor from the previous page (Pagination).
  • trim: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).

Example request#

Set your key in the environment first (see Authentication).

curl
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"
Python
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,
)
body = res.json()

if body["ok"]:
    print(body["data"])
else:
    print(body["error"]["code"], body["error"]["message"])
TypeScript
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);
}
n8n
{
  "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": {}
}

Example response#

This is a sample from a recorded response, lists and long text are shortened, other people's names and handles are replaced. Status 200.

{
  "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://apps.microsoft.com/detail/9nbwqjcvmjgp?cid=DevShareMCLPCS&hl=en-GB&gl=IN\n\nGithub:\nh...",
        "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
}

Response#

A list of Post objects in data.items, with data.cursor and data.has_more.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe platform says this profile, post or item does not exist.

Every request can also fail with the account and platform errors listed on the Errors page.