twitter_community_memberships
List all communities a user belongs to by providing their numeric X user id. Returns full community objects with member counts, rules, and topic, paginated via cursor. Empty array means no memberships.
Instructions
The INVERSE community lookup: given a numeric X USER id, list the communities that account belongs to, cursor-paginated. Every other community tool starts from a community; this one starts from an account, which makes it the tool for profiling which audiences a person sits inside. Each row is the FULL community object (the same shape twitter_community_info returns, with member counts, rules, topic, policies, admin and creator), so no follow-up call per community is needed. Takes a numeric user id ONLY, not a @handle: resolve a handle with twitter_user_info first, because resolving it here would silently cost a second call. An EMPTY communities array is a real, successful answer (the account is in no communities), not a not-found. As on twitter_community_info, role / can_join / is_pinned / viewer_relationship_type are always null on every community returned, because this is a pooled read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Max communities to return for this page. Defaults to 20 and is clamped to 1-100. | |
| cursor | No | Opaque pagination cursor from a previous response's next_cursor field. Omit on the first call. | |
| user_id | Yes | Numeric X user id, e.g. '1281109705495130113'. NOT a @handle and NOT a community id. Resolve a handle to its id with twitter_user_info first. |