Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through looking up List information using the List lookup endpoints.
PrerequisitesBefore you begin, you’ll need:

Get a List by ID

Retrieve details for a specific List:
cURL
curl "https://api.x.com/2/lists/1234567890?\
list.fields=description,owner_id,member_count,follower_count,private,created_at" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Response

{
  "data": {
    "id": "1234567890",
    "name": "Tech News",
    "description": "Top tech journalists and publications",
    "owner_id": "2244994945",
    "private": false,
    "member_count": 50,
    "follower_count": 1250,
    "created_at": "2023-01-15T10:00:00.000Z"
  }
}

Get Lists owned by a user

Retrieve all Lists owned by a specific user:
cURL
curl "https://api.x.com/2/users/2244994945/owned_lists?\
list.fields=description,member_count,follower_count&\
max_results=100" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Response

{
  "data": [
    {
      "id": "1234567890",
      "name": "Tech News",
      "description": "Top tech journalists",
      "member_count": 50,
      "follower_count": 1250
    },
    {
      "id": "9876543210",
      "name": "Developer Tools",
      "description": "Useful tools for developers",
      "member_count": 25,
      "follower_count": 500
    }
  ],
  "meta": {
    "result_count": 2
  }
}

Include owner information

Expand the owner’s user data:
cURL
curl "https://api.x.com/2/lists/1234567890?\
list.fields=description,owner_id&\
expansions=owner_id&\
user.fields=username,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Response with expansion

{
  "data": {
    "id": "1234567890",
    "name": "Tech News",
    "description": "Top tech journalists",
    "owner_id": "2244994945"
  },
  "includes": {
    "users": [
      {
        "id": "2244994945",
        "username": "XDevelopers",
        "verified": true
      }
    ]
  }
}

Available fields

FieldDescription
descriptionList description
owner_idOwner’s user ID
privateWhether List is private
member_countNumber of members
follower_countNumber of followers
created_atList creation date

Next steps

List Posts

Get Posts from a List

List members

Get List members

Manage Lists

Create and update Lists

API Reference

Full endpoint documentation