---
title: "API 개요"
description: "TwexAPI REST 참조 — 인증, 응답 형식, 페이지네이션, 오류, 속도 제한, 엔드포인트 그룹."
---

TwexAPI는 `https://api.twexapi.io`에서 X/Twitter 읽기·쓰기, 검색, 팔로워, DM, 리스트, 커뮤니티, 아티클, 계정 유틸리티용 REST API를 제공합니다.

사이드바의 개별 엔드포인트 페이지를 열기 전에 이 페이지를 시작점으로 사용하세요.

## Base URL

```txt
https://api.twexapi.io
```

## 인증

모든 요청에 API 키를 전송합니다:

```bash
Authorization: Bearer YOUR_API_KEY
```

Public docs focus on API-key reads.

## 응답 형식

성공 응답은 일관된 래퍼를 사용합니다:

```json
{
  "code": 200,
  "msg": "success",
  "data": {}
}
```

오류는 JSON 본문과 함께 non-2xx HTTP 상태 코드를 반환합니다. 상태별 복구는 [Error Handling](/guides/error-handling) 참고.

## 페이지네이션

많은 목록·검색 엔드포인트는 `data` 안에 `has_next_page`, `next_cursor` 또는 페이지 토큰 같은 cursor 필드를 반환합니다. 이전 응답의 cursor를 그대로 다음 요청에 전달하세요. 실패 후 재개해야 하는 작업은 채팅·워크플로 메모리 밖에 cursor를 보관하세요.

## 잔액 확인

대규모 내보내기 전에 남은 크레dit을 확인합니다:

```bash
curl --request GET \
  --url 'https://api.twexapi.io/balance' \
  --header 'Authorization: Bearer YOUR_API_KEY'
```

전체 스키마는 [Get Balance](/api-reference/balance-endpoints/get-balance-api-balance-get) 참고.

## 엔드포인트 그룹

사이드바 **Endpoints**에서 생성된 페이지를 탐색하거나 일반 그룹으로 이동합니다:

| 그룹 | 일반적인 작업 |
| --- | --- |
| [Search](/api-reference/search-endpoints/get-data-page-twitter-advanced-search-page-post) | 키워드 검색, 해시태그, 캐시태그. [Advance Search TwitterXAPI](https://x-advanced-search.cc)로 `searchTerms` 구성. |
| [Users](/api-reference/twitter-user-about-endpoints/get-twitter-user-about-by-screen-name-api-twitter-screen-name-about-get) | 프로필 조회, 일괄 사용자 읽기 |
| [Followers & Following](/api-reference/followers-following-endpoints/followers-v3-api-v3-twitter-users-followers-post) | 팔로워·팔로잉 내보내기 |
| [Tweet Actions](/api-reference/tweet-actions-endpoints/create-tweet-twitter-tweets-create-post) | 게시, 답글, 좋아요, 리트윗, 북마크 |
| [Trending](/api-reference/trending-endpoints/get-global-trending-tweets-api-twitter-global-trending-tweets-get) | 글로벌 트렌드 주제·트윗 |
| [DM](/api-reference/dm-endpoints/send-dm-v3-api-v3-twitter-send-dm-post) | DM 상태, 발송, 기록 |
| [Balance](/api-reference/balance-endpoints/get-balance-api-balance-get) | 크레dit 잔액 |

## 에이전트 및 SDK 경로

| 통합 | 사용 시점 |
| --- | --- |
| [MCP Server](/mcp/overview) | `twexapi_request` 전에 `explore`로 경로를 찾아야 하는 AI 에이전트 |
| [SDKs](/sdks) | 재시도·페이지네이션 헬퍼가 있는 타입 클라이언트 |
| [CLI](/sdks/cli) | 터미널 스크립트 및 JSON 출력 |
| [Framework Guides](/guides/langchain) | LangChain, CrewAI, n8n, Prefect 등 에이전트 호스트 |

## 운영 가이드

- [Error Handling](/guides/error-handling) — HTTP 상태 복구, MCP 오류, 쓰기 재시도
- [Rate Limits](/guides/rate-limits) — 처리량 가이드 및 `429` 백오프
- — cookie / `auth_token`, 중복 확인, `403` 크레dit
- [Authentication](/authentication) — API 키, Bearer 헤더, 쓰기 자격 증명

## TwexAPI가 현재 제공하지 않는 것

TwexAPI는 네이티브 **계정 모니터**, **이벤트 webhook**, **비동기 추출 작업**을 일급 API 제품으로 제공하지 않습니다. 예약 REST 호출(Prefect, n8n, cron) 또는 no-code 플랫폼 webhook으로 에이전트 핸드오프를 받은 뒤 직접 API 요청을 이어가세요.
