메인 콘텐츠로 건너뛰기
이 가이드는 리스트 조회 엔드포인트를 사용해 리스트 정보를 조회하는 방법을 설명합니다.
사전 준비 사항시작하기 전에 다음이 필요합니다:

ID로 리스트 가져오기

특정 리스트의 세부 정보를 조회합니다:
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"

응답

{
  "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"
  }
}

사용자가 소유한 리스트 가져오기

특정 사용자가 소유한 모든 리스트를 조회합니다:
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"

응답

{
  "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
  }
}

소유자 정보 포함하기

소유자의 사용자 데이터를 확장하려면:
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"

확장을 포함한 응답

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

사용 가능한 필드

필드설명
description리스트 설명
owner_id소유자의 사용자 ID
private리스트가 비공개인지 여부
member_count리스트 구성원 수
follower_count팔로워 수
created_at리스트 생성 일시

다음 단계

리스트 포스트

리스트의 포스트 가져오기

리스트 멤버

리스트 멤버 조회

리스트 관리

리스트 생성 및 업데이트

API 참조 문서

전체 엔드포인트 문서