Communities

Search communities

Find X Communities by keyword.

Paginated: pass the bottom cursor of one page as cursor to get the next. Each page is one billed call.

Reference: https://www.twittrapi.com/docs/reference/communities-search-searchterm

get/communities/search/{searchTerm}

Request

  • Base URL: https://api.twittrapi.com
  • URL: https://api.twittrapi.com/communities/search/{searchTerm}
  • Auth: API key in header X-API-KEY

Path parameters

searchTermstring required

Keyword, URL-encoded.

Query parameters

countinteger

Number of communities to ask X for. Sent to X as is; X treats it as a hint and decides how many it returns (follower and following pages often hold 50 to 70 users for count=20). A value that is not a number falls back to 20.

cursorstring

Bottom cursor from the previous page. Leave it out for the first page. See Pagination.

sortstring

Sort order, passed to X as is.

format'raw' | 'simple'

raw (default): X's JSON passed through. simple: flat camelCase JSON with a fixed schema and a {data, nextCursor, previousCursor, hasNextPage} envelope. Same price. The header X-Response-Format: simple does the same.

Response

Raw JSON of X's CommunitiesSearchQuery. Communities are in data.communities_search_slice.items_results; the next-page cursor is data.communities_search_slice.slice_info.next_cursor (there are no cursor entries).

With format=simple: Collection of Community objects (description and rules are empty in search results).

OR
RawPassthrough required

X's own JSON (raw format, the default), passed through unchanged. The shape is X's and can change; see https://www.twittrapi.com/docs/response-format.

Changes

No recorded changes to this operation across all 1 revision of this API.