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

# Spaces 조회

> Spaces 조회 엔드포인트로 라이브 또는 예약된 Spaces에 대한 정보를 검색할 수 있습니다. lookup을 다루는 X API v2 표준 계층에 대한 참고 자료입니다.

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>;
};

Spaces 조회 엔드포인트로 라이브 또는 예약된 Spaces에 대한 정보를 검색할 수 있습니다. ID로 Spaces를 조회하거나 특정 사용자가 만든 Spaces를 찾을 수 있습니다.

## 개요

<CardGroup cols={2}>
  <Card title="ID로 조회" icon="https://mintcdn.com/x-preview/SxzTbJaLjs3MidH1/icons/xds/icon-microphone.svg?fit=max&auto=format&n=SxzTbJaLjs3MidH1&q=85&s=84616ff8f3d942047a71ee5e0a5adab9" width="24" height="24" data-path="icons/xds/icon-microphone.svg">
    특정 Space의 세부 정보 가져오기
  </Card>

  <Card title="여러 Spaces" icon="microphone-lines">
    한 번에 여러 Spaces 조회
  </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">
    호스트별 Spaces 찾기
  </Card>

  <Card title="구매자" icon="ticket">
    티켓을 구매한 사용자 가져오기
  </Card>
</CardGroup>

***

## 엔드포인트

| Method | Endpoint                                                              | 설명                        |
| :----- | :-------------------------------------------------------------------- | :------------------------ |
| GET    | [`/2/spaces/:id`](/x-api/spaces/get-space-by-id)                      | ID로 Space 가져오기            |
| GET    | [`/2/spaces`](/x-api/spaces/get-spaces-by-ids)                        | ID로 Spaces 가져오기           |
| GET    | [`/2/spaces/by/creator_ids`](/x-api/spaces/get-spaces-by-creator-ids) | 크리에이터 사용자 ID로 Spaces 가져오기 |
| GET    | [`/2/spaces/:id/buyers`](/x-api/spaces/get-space-ticket-buyers)       | Space의 티켓 구매자 가져오기        |
| GET    | [`/2/spaces/:id/tweets`](/x-api/spaces/get-space-posts)               | Space에서 공유된 Post 가져오기     |

***

## 응답 필드

기본적으로 응답에는 `id`와 `state`가 포함됩니다. 추가 필드를 요청하세요:

| 필드                  | 설명                |
| :------------------ | :---------------- |
| `title`             | Space 제목          |
| `host_ids`          | Host user ID      |
| `speaker_ids`       | Speaker user ID   |
| `participant_count` | 참여자 수             |
| `scheduled_start`   | 예정된 시작 시간         |
| `started_at`        | 실제 시작 시간          |
| `ended_at`          | 종료 시간             |
| `is_ticketed`       | Space에 티켓이 있는지 여부 |

### Space 상태

| 상태          | 설명       |
| :---------- | :------- |
| `live`      | 현재 활성 상태 |
| `scheduled` | 미래로 예약됨  |
| `ended`     | 종료됨      |

***

## 예제 요청

```bash theme={null}
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,host_ids,participant_count,scheduled_start,state" \
  -H "Authorization: Bearer $BEARER_TOKEN"
```

***

## 시작하기

<Note>
  **사전 요구 사항**

  * 승인된 [개발자 계정](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 개발자 콘솔의 [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/spaces/lookup/quickstart" width="24" height="24" data-path="icons/xds/icon-rocket.svg">
    첫 Spaces 조회 요청 만들기
  </Card>

  <Card title="Spaces 검색" icon="https://mintcdn.com/x-preview/cfyQtgCdwk8p69aa/icons/xds/icon-search.svg?fit=max&auto=format&n=cfyQtgCdwk8p69aa&q=85&s=8c11ad89387b7c09ced1553d5c232834" href="/x-api/spaces/search/introduction" width="24" height="24" data-path="icons/xds/icon-search.svg">
    키워드로 Spaces 찾기
  </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/spaces/space-lookup-by-space-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>
