KonbiniAPI

Get community posts — X API

Returns public posts from an X community timeline as visible to not logged in users.

GET/v1/x/communities/{communityId}/posts1 credit per request
Example response200OK
{
  "data": {
    "@context": [
      "https://www.w3.org/ns/activitystreams#",
      "https://konbiniapi.com/ns/social#"
    ],
    "type": "OrderedCollectionPage",
    "partOf": "https://api.konbiniapi.com/v1/x/communities/1669501013441806336/posts",
    "totalItems": null,
    "cursor": null,
    "nextCursor": "DAABCgABHOkX2xF__-8LAAIAAAATMj",
    "next": "https://api.konbiniapi.com/v1/x/communities/1669501013441806336/posts?cursor=DAABCgABHOkX2xF__-8LAAIAAAATMj&count=40",
    "itemCount": 30,
    "orderedItems": [
      {
        "type": "Note",
        "id": "https://x.com/KhabyLame/status/2024515585569083437",
        "url": "https://x.com/KhabyLame/status/2024515585569083437",
        "entityId": "2024515585569083437",
        "content": "This man hasn't been in my fyp for so long",
        "published": "2026-02-27T20:37:38.000Z",
        "likeCount": 93210,
        "replyCount": 96,
        "viewCount": 10195,
        "repostCount": 3,
        "quoteCount": 0,
        "saveCount": 3,
        "contentFormat": "longform",
        "isEdited": false,
        "attributedTo": {
          "type": "Person",
          "id": "https://x.com/KhabyLame",
          "url": "https://x.com/KhabyLame",
          "entityId": "221838349",
          "preferredUsername": "KhabyLame",
          "name": "Khabane Lame",
          "icon": {
            "type": "Image",
            "url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
            "width": 1536,
            "height": 2048
          },
          "isPrivate": false,
          "isVerified": false,
          "isPaidVerified": true,
          "summary": "Let's Go",
          "attachment": [
            {
              "type": "Link",
              "href": "https://t.co/examplelink",
              "rel": "preferred"
            }
          ],
          "followerCount": 372131,
          "followingCount": 8,
          "likeCount": 60,
          "postCount": 267,
          "mediaCount": 242,
          "listedCount": 215,
          "location": "Milan, Italy"
        },
        "inReplyTo": "https://x.com/NISMO/status/2024100000000000000",
        "quote": {
          "type": "Note",
          "id": "https://x.com/NISMO/status/2024100000000000000",
          "url": "https://x.com/NISMO/status/2024100000000000000",
          "entityId": "2024100000000000000",
          "content": "Ready for race week.",
          "published": "2026-02-18T12:00:00.000Z",
          "likeCount": 93210,
          "replyCount": 96,
          "contentFormat": "longform",
          "attributedTo": {
            "type": "Person",
            "id": "https://x.com/KhabyLame",
            "url": "https://x.com/KhabyLame",
            "entityId": "221838349",
            "preferredUsername": "KhabyLame",
            "name": "Khabane Lame",
            "icon": {
              "type": "Image",
              "url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
              "width": 1536,
              "height": 2048
            },
            "isPrivate": false,
            "isVerified": false,
            "isPaidVerified": true,
            "summary": "Let's Go",
            "attachment": [
              {
                "type": "Link",
                "href": "https://t.co/examplelink",
                "rel": "preferred"
              }
            ],
            "followerCount": 372131,
            "followingCount": 8,
            "likeCount": 60,
            "postCount": 267,
            "mediaCount": 242,
            "listedCount": 215,
            "location": "Milan, Italy"
          },
          "image": [
            {
              "type": "Image",
              "url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
              "width": 1536,
              "height": 2048
            }
          ],
          "attachment": [
            {
              "type": "Video",
              "url": [
                "https://video.twimg.com/ext_tw_video/123/pu/vid/avc1/example.mp4"
              ],
              "mediaType": "video/mp4",
              "width": 1280,
              "height": 720,
              "bitrate": 950000,
              "duration": 16.266
            }
          ]
        },
        "image": [
          {
            "type": "Image",
            "url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
            "width": 1536,
            "height": 2048
          }
        ],
        "attachment": [
          {
            "type": "Video",
            "url": [
              "https://video.twimg.com/ext_tw_video/123/pu/vid/avc1/example.mp4"
            ],
            "mediaType": "video/mp4",
            "width": 1280,
            "height": 720,
            "bitrate": 950000,
            "duration": 16.266
          }
        ],
        "tag": [
          {
            "type": "Tag",
            "name": "learnfromkhaby",
            "href": "https://x.com/hashtag/learnfromkhaby"
          }
        ]
      }
    ]
  }
}

Make the request.

One authenticated GET to /v1/x/communities/{communityId}/posts. Authentication and error conventions stay consistent across endpoints. This page shows the path, parameters, response shape, limits, and credit rule for this operation.

Built for

  • Data Analytics
  • Market Research
  • Platform Integration
const response = await fetch("https://api.konbiniapi.com/v1/x/communities/{communityId}/posts", {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});

const data = await response.json();
Parameters3
  • communityIdrequiredIn · PathType · stringX community ID
  • countIn · QueryType · integerMaximum number of posts to return from the community timeline (maximum: 100)1–100default 40
  • cursorIn · QueryType · stringPagination cursor

Try it on your own data.

Get a free API key and make this request in minutes. Failed and timed-out requests are automatically refunded.