# Lists a user is on

`GET https://api.twittrapi.com/user/{userId}/lists/memberships`

Public lists other accounts have added the user to, newest first.

HTML page: https://www.twittrapi.com/docs/reference/user-userid-lists-memberships

## Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `userId` | path | string | yes |  | Numeric user ID (digits only, up to 30). To pass a handle instead, use -1 here and set username. |
| `username` | query | string | no |  | Handle, with or without @. When set, it is used instead of userId: the API looks up the ID first, which makes the call a little slower. Still one billed call. |
| `count` | query | integer | no | 20 | Number of lists to ask X for, 1 to 100. Other values fall back to 20. X treats it as a hint. |
| `cursor` | query | string | no |  | Bottom cursor from the previous page. Leave it out for the first page. See Pagination. |

This endpoint also accepts `format=simple` (or the header `X-Response-Format: simple`) for compact, flat JSON with a fixed schema. Same price.

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

## Response

Raw JSON of X's ListMemberships query, in the same shape as /user/{userId}/lists. X may add an errors array next to complete data when it cannot decode one nested field of a list; the lists are still there.

With `format=simple`: Collection of List objects, as /user/{userId}/lists.

## Errors

| Status | When |
| --- | --- |
| 422 | userId is not numeric, or the username lookup failed. |
| 400 | userId is -1 and username is missing, or the username contains characters X blocks. |
| 404 | The user could not be found. |

Shared errors (401 missing key, 402 no balance, 429 rate limit, 5xx) are listed on https://www.twittrapi.com/docs/helpful-infos/error-handling. Calls that fail with 400, 407, 408, 409 or a 5xx error are refunded.

## Example request

curl:

```bash
curl 'https://api.twittrapi.com/user/11348282/lists/memberships?count=20' \
  --header 'X-API-KEY: YOUR_API_KEY'
```

Python:

```python
import httpx

# No SDK method for this endpoint yet, so this is a plain HTTP call.
resp = httpx.get(
    "https://api.twittrapi.com/user/11348282/lists/memberships",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    params={
        "count": "20",
    },
    timeout=60,
)
data = resp.json()
```

Node.js:

```js
import { TwittrAPI } from "twittrapi";

const client = new TwittrAPI({ apiKey: process.env.TWITTRAPI_API_KEY });
// No wrapper method for this endpoint yet; client.get() sends the same authenticated GET.
const data = await client.get({
  path: "/user/11348282/lists/memberships",
  query: {
    count: "20",
  },
});
```

RapidAPI:

```bash
curl 'https://twitter-aio.p.rapidapi.com/user/11348282/lists/memberships?count=20' \
  --header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
  --header 'x-rapidapi-host: twitter-aio.p.rapidapi.com'
```

## Example response

Shortened: arrays keep their first items and long strings are cut.

Raw (default):

```json
{
  "data": {
    "user": {
      "result": {
        "__typename": "User",
        "timeline": {
          "timeline": {
            "instructions": [
              {
                "type": "TimelineClearCache"
              },
              {
                "direction": "Top",
                "type": "TimelineTerminateTimeline"
              },
              {
                "entries": [
                  {
                    "content": {
                      "__typename": "TimelineTimelineItem",
                      "clientEventInfo": {
                        "component": "MembershipsSgs",
                        "element": "list"
                      },
                      "entryType": "TimelineTimelineItem",
                      "itemContent": {
                        "__typename": "TimelineTwitterList",
                        "itemType": "TimelineTwitterList",
                        "list": {
                          "created_at": 1796025212000,
                          "default_banner_media": {
                            "media_info": {
                              "…": "…"
                            }
                          },
                          "default_banner_media_results": {},
                          "description": "",
                          "facepile_urls": [],
                          "following": false,
                          "id": "TGlzdDoxOTAwMDAwMDAwMDAwMDAwMDAx",
                          "id_str": "1900000000000000001",
                          "is_member": false,
                          "member_count": 25,
                          "members_context": "25 members",
                          "mode": "Public",
                          "muting": false,
                          "name": "HABERLER",
                          "pinning": false,
                          "subscriber_count": 0,
                          "user_results": {
                            "result": {
                              "…": "…"
                            }
                          }
                        }
                      }
                    },
                    "entryId": "list-2127310045327057210",
                    "sortIndex": "2127344550585303040"
                  },
                  "… 3 more"
                ],
                "type": "TimelineAddEntries"
              }
            ]
          }
        }
      }
    }
  }
}
```

Simple (`format=simple`):

```json
{
  "data": [
    {
      "id": "1900000000000000001",
      "name": "HABERLER",
      "description": "",
      "createdAt": "2026-11-30T07:53:32Z",
      "memberCount": 25,
      "followerCount": 0,
      "private": false,
      "bannerUrl": "https://pbs.twimg.com/media/GkIQZXyWsAAs-uP.png",
      "owner": {
        "id": "1000000000000000001",
        "username": "example_user_1"
      }
    },
    "… 1 more"
  ],
  "nextCursor": "6738721989367153024|2127344550585303033",
  "previousCursor": null,
  "hasNextPage": true
}
```
