Search

GET/tw-v2/community/search

Description

Search for Twitter communities by keyword. Returns a list of communities matching the search query with basic information like name, member count, and topic.

Parameters

ParameterTypeRequiredDescription
querystringrequiredSearch query string to find communities
cursorstringoptionalPagination cursor for fetching next page of results

Code Examples

const params = new URLSearchParams({
  query: 'programming'
});

const response = await fetch(`https://api.tweetapi.com/tw-v2/community/search?${params}`, {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
});

const data = await response.json();
console.log(data);

Response

Success Response (200 OK)

200
{
  "data": [
    {
      "id": "1671978073690873856",
      "name": "Programming Hub",
      "memberCount": 45230,
      "topic": "Technology",
      "isNsfw": false,
      "bannerUrl": "https://pbs.twimg.com/community_banner_img/1671980103352328227/7DWFtLQF?format=jpg&name=orig",
      "defaultBannerUrl": null,
      "membersFacepile": [
        "https://pbs.twimg.com/profile_images/123/avatar1.jpg",
        "https://pbs.twimg.com/profile_images/456/avatar2.jpg",
        "https://pbs.twimg.com/profile_images/789/avatar3.jpg"
      ]
    },
    {
      "id": "1589234567890123456",
      "name": "Web Development",
      "memberCount": 28150,
      "topic": "Technology",
      "isNsfw": false,
      "bannerUrl": "https://pbs.twimg.com/community_banner_img/1589234567890123456/banner.jpg",
      "defaultBannerUrl": null,
      "membersFacepile": [
        "https://pbs.twimg.com/profile_images/111/avatar1.jpg",
        "https://pbs.twimg.com/profile_images/222/avatar2.jpg"
      ]
    }
  ],
  "nextCursor": "DAACDAABCgABF_R4_5_____9CAADRDEqP84wPCAKAAIX9Hj_n-gQAAgAAwAAAAIAAA"
}

API Playground

GET/tw-v2/community/search

Press ⌘ + Enter to execute

curl -X GET "https://api.tweetapi.com/tw-v2/community/search" \
  -H "X-API-Key: YOUR_API_KEY"
Response

Click "Try It!" to see the response