Docs
Search community members

Search community members

Find members of a community whose handle matches a text.

GET/communities/{communityId}/members/search

Parameters

  • communityIdpath · string · required

    Numeric community ID, the number in the community URL.

  • usernamequery · string · required

    Text to match, with or without @.

Example request

curl 'https://api.twittrapi.com/communities/1500000000000000000/members/search?username=jack' \
  --header 'X-API-KEY: YOUR_API_KEY'

Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.

Response

Raw JSON of X's CommunityMemberRelationshipTypeahead query. Not paginated.

Simple format (?format=simple or X-Response-Format: simple): Collection of User objects: {data: [User], nextCursor, previousCursor, hasNextPage}. Schema.

Example response coming soon.

In the raw format, field names and nesting come from X and can change without notice. See Response format; the simple format keeps a fixed schema.

Errors

  • 422communityId is not numeric.
  • 400username is missing.

Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 408, 409 or a 5xx error are refunded.