> ## 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.

# List Lookup

> List lookup エンドポイントを使うと、List に関する情報を取得できます。X API v2 スタンダード階層の list lookup に関するリファレンスドキュメントです。

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

List lookup エンドポイントを使うと、List に関する情報を取得できます。ID による特定の List のルックアップや、ユーザーが所有するすべての List の取得が可能です。

## 概要

<CardGroup cols={2}>
  <Card title="ID で取得" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=b9bf8323233df59c682b0fec8e3f88d5" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    特定の List の詳細を取得
  </Card>

  <Card title="所有者で取得" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-person.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=507a4bbcdcf5744bd18781508002e305" width="24" height="24" data-path="icons/xds/icon-person.svg">
    ユーザーが所有するすべての List を取得
  </Card>
</CardGroup>

***

## エンドポイント

| Method | Endpoint                                                   | Description        |
| :----- | :--------------------------------------------------------- | :----------------- |
| GET    | [`/2/lists/:id`](/x-api/lists/get-list-by-id)              | ID で List を取得      |
| GET    | [`/2/users/:id/owned_lists`](/x-api/users/get-owned-lists) | ユーザーが所有する List を取得 |

***

## レスポンスフィールド

デフォルトでは、レスポンスには `id` と `name` が含まれます。追加フィールドは以下のようにリクエストできます:

| Field            | Description   |
| :--------------- | :------------ |
| `description`    | List の説明      |
| `owner_id`       | 所有者の user ID  |
| `private`        | List が非公開かどうか |
| `follower_count` | フォロワー数        |
| `member_count`   | メンバー数         |
| `created_at`     | List の作成日     |

### リクエスト例

```bash theme={null}
curl "https://api.x.com/2/lists/1234567890?\
list.fields=description,owner_id,member_count,follower_count" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

***

## はじめに

<Note>
  **前提条件**

  * 承認済みの [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * Developer Console 内の [Project と App](/resources/fundamentals/developer-apps)
  * App の[キーとトークン](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="クイックスタート" icon="https://mintcdn.com/x-preview/oR-aRNyj1BKPJtxM/icons/xds/icon-rocket.svg?fit=max&auto=format&n=oR-aRNyj1BKPJtxM&q=85&s=b978d7a9225de31709efbbed5b84e92d" href="/x-api/lists/list-lookup/quickstart" width="24" height="24" data-path="icons/xds/icon-rocket.svg">
    最初の List lookup リクエストを行う
  </Card>

  <Card title="連携ガイド" icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-book.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=22ac564792481d14ae36a941546039c8" href="/x-api/lists/list-lookup/integrate" width="24" height="24" data-path="icons/xds/icon-book.svg">
    主要な概念とベストプラクティス
  </Card>

  <Card title="API リファレンス" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/lists/list-lookup-by-list-id" width="24" height="24" data-path="icons/xds/icon-code.svg">
    エンドポイントの詳細ドキュメント
  </Card>

  <Card title="サンプルコード" icon="github" href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    動作するコード例
  </Card>
</CardGroup>
