x-developer 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,57 @@
1
+ # Xquik Giveaway Draws
2
+
3
+ Run transparent, auditable giveaway draws from tweet replies with configurable filters.
4
+
5
+ ## Create Draw
6
+
7
+ `POST /draws` with a `tweetUrl` (required) and optional filters:
8
+
9
+ | Field | Type | Description |
10
+ |-------|------|-------------|
11
+ | `tweetUrl` | string | **Required.** Full tweet URL: `https://x.com/user/status/ID` |
12
+ | `winnerCount` | number | Winners to select (default 1) |
13
+ | `backupCount` | number | Backup winners to select |
14
+ | `uniqueAuthorsOnly` | boolean | Count only one entry per author |
15
+ | `mustRetweet` | boolean | Require participants to have retweeted |
16
+ | `mustFollowUsername` | string | Username participants must follow |
17
+ | `filterMinFollowers` | number | Minimum follower count |
18
+ | `filterAccountAgeDays` | number | Minimum account age in days |
19
+ | `filterLanguage` | string | Language code (e.g., `"en"`) |
20
+ | `requiredKeywords` | string[] | Words that must appear in the reply |
21
+ | `requiredHashtags` | string[] | Hashtags that must appear (e.g., `["#giveaway"]`) |
22
+ | `requiredMentions` | string[] | Usernames that must be mentioned (e.g., `["@xquik"]`) |
23
+
24
+ ## Complete Workflow
25
+
26
+ ```javascript
27
+ // Step 1: Create draw with filters
28
+ const draw = await xquikFetch("/draws", {
29
+ method: "POST",
30
+ body: JSON.stringify({
31
+ tweetUrl: "https://x.com/burakbayir/status/1893456789012345678",
32
+ winnerCount: 3,
33
+ backupCount: 2,
34
+ uniqueAuthorsOnly: true,
35
+ mustRetweet: true,
36
+ mustFollowUsername: "burakbayir",
37
+ filterMinFollowers: 50,
38
+ filterAccountAgeDays: 30,
39
+ filterLanguage: "en",
40
+ requiredHashtags: ["#giveaway"],
41
+ }),
42
+ });
43
+
44
+ // Step 2: Get draw details with winners
45
+ const details = await xquikFetch(`/draws/${draw.id}`);
46
+ // details.winners: [
47
+ // { position: 1, authorUsername: "winner1", tweetId: "...", isBackup: false },
48
+ // ...
49
+ // ]
50
+
51
+ // Step 3: Export results
52
+ const exportUrl = `${BASE}/draws/${draw.id}/export?format=csv`;
53
+ ```
54
+
55
+ ## Cost
56
+
57
+ 1 credit ($0.00015) per participant entry.
@@ -0,0 +1,229 @@
1
+ # Xquik Extraction Tools
2
+
3
+ 23 bulk data extraction tools. Each requires a specific target parameter.
4
+
5
+ **Endpoint:** `POST /extractions`
6
+
7
+ **Always estimate first:** `POST /extractions/estimate` with the same body to preview cost and check quota.
8
+
9
+ ## Tool Types
10
+
11
+ ### Tweet-Based (require `targetTweetId`)
12
+
13
+ | Tool Type | Description |
14
+ |-----------|-------------|
15
+ | `reply_extractor` | Extract users who replied to a tweet |
16
+ | `repost_extractor` | Extract users who retweeted a tweet |
17
+ | `quote_extractor` | Extract users who quote-tweeted a tweet |
18
+ | `thread_extractor` | Extract all tweets in a thread |
19
+ | `article_extractor` | Extract article content linked in a tweet |
20
+ | `favoriters` | Extract users who favorited a tweet |
21
+
22
+ **Example:**
23
+ ```json
24
+ {
25
+ "toolType": "reply_extractor",
26
+ "targetTweetId": "1893704267862470862"
27
+ }
28
+ ```
29
+
30
+ ### User-Based (require `targetUsername`)
31
+
32
+ | Tool Type | Description |
33
+ |-----------|-------------|
34
+ | `follower_explorer` | Extract followers of an account |
35
+ | `following_explorer` | Extract accounts followed by a user |
36
+ | `verified_follower_explorer` | Extract verified followers of an account |
37
+ | `mention_extractor` | Extract tweets mentioning an account |
38
+ | `post_extractor` | Extract posts from an account |
39
+
40
+ **Example:**
41
+ ```json
42
+ {
43
+ "toolType": "follower_explorer",
44
+ "targetUsername": "elonmusk"
45
+ }
46
+ ```
47
+
48
+ The `@` prefix is automatically stripped if included.
49
+
50
+ ### User-Based by ID (require `targetUserId`)
51
+
52
+ | Tool Type | Description |
53
+ |-----------|-------------|
54
+ | `user_likes` | Extract tweets liked by a user |
55
+ | `user_media` | Extract media tweets from a user |
56
+
57
+ **Example:**
58
+ ```json
59
+ {
60
+ "toolType": "user_likes",
61
+ "targetUserId": "44196397"
62
+ }
63
+ ```
64
+
65
+ ### Community-Based (require `targetCommunityId`)
66
+
67
+ | Tool Type | Description |
68
+ |-----------|-------------|
69
+ | `community_extractor` | Extract members of a community |
70
+ | `community_moderator_explorer` | Extract moderators of a community |
71
+ | `community_post_extractor` | Extract posts from a community |
72
+ | `community_search` | Search posts within a community (also requires `searchQuery`) |
73
+
74
+ **Example:**
75
+ ```json
76
+ {
77
+ "toolType": "community_extractor",
78
+ "targetCommunityId": "1234567890"
79
+ }
80
+ ```
81
+
82
+ ### List-Based (require `targetListId`)
83
+
84
+ | Tool Type | Description |
85
+ |-----------|-------------|
86
+ | `list_member_extractor` | Extract members of a list |
87
+ | `list_post_extractor` | Extract posts from a list |
88
+ | `list_follower_explorer` | Extract followers of a list |
89
+
90
+ **Example:**
91
+ ```json
92
+ {
93
+ "toolType": "list_member_extractor",
94
+ "targetListId": "1234567890"
95
+ }
96
+ ```
97
+
98
+ ### Space-Based (require `targetSpaceId`)
99
+
100
+ | Tool Type | Description |
101
+ |-----------|-------------|
102
+ | `space_explorer` | Extract participants of a Space |
103
+
104
+ **Example:**
105
+ ```json
106
+ {
107
+ "toolType": "space_explorer",
108
+ "targetSpaceId": "1YqKDqDXAbwKV"
109
+ }
110
+ ```
111
+
112
+ ### Search-Based (require `searchQuery`)
113
+
114
+ | Tool Type | Description |
115
+ |-----------|-------------|
116
+ | `people_search` | Search for users by keyword |
117
+ | `tweet_search_extractor` | Search and extract tweets by keyword or hashtag (bulk, up to 1,000) |
118
+
119
+ **Example (people search):**
120
+ ```json
121
+ {
122
+ "toolType": "people_search",
123
+ "searchQuery": "machine learning engineer"
124
+ }
125
+ ```
126
+
127
+ **Example (tweet search):**
128
+ ```json
129
+ {
130
+ "toolType": "tweet_search_extractor",
131
+ "searchQuery": "#AI",
132
+ "resultsLimit": 100
133
+ }
134
+ ```
135
+
136
+ ### Tweet Search Filters
137
+
138
+ The `tweet_search_extractor` tool type supports 16 additional filter fields that are converted to X search operators and combined with `searchQuery`:
139
+
140
+ | Field | Type | Description |
141
+ |-------|------|-------------|
142
+ | `fromUser` | string | Author username |
143
+ | `toUser` | string | Directed to user |
144
+ | `mentioning` | string | Mentions user |
145
+ | `language` | string | Language code (e.g., `en`) |
146
+ | `sinceDate` | string | Start date (YYYY-MM-DD) |
147
+ | `untilDate` | string | End date (YYYY-MM-DD) |
148
+ | `mediaType` | string | `images`, `videos`, `gifs`, or `media` |
149
+ | `minFaves` | number | Minimum likes |
150
+ | `minRetweets` | number | Minimum retweets |
151
+ | `minReplies` | number | Minimum replies |
152
+ | `verifiedOnly` | boolean | Verified authors only |
153
+ | `replies` | string | `include`, `exclude`, or `only` |
154
+ | `retweets` | string | `include`, `exclude`, or `only` |
155
+ | `exactPhrase` | string | Exact match text |
156
+ | `excludeWords` | string | Comma-separated words to exclude |
157
+ | `advancedQuery` | string | Raw X search operators appended to query |
158
+
159
+ **Example with filters:**
160
+ ```json
161
+ {
162
+ "toolType": "tweet_search_extractor",
163
+ "searchQuery": "AI",
164
+ "fromUser": "elonmusk",
165
+ "minFaves": 100,
166
+ "sinceDate": "2026-01-01",
167
+ "mediaType": "videos",
168
+ "resultsLimit": 500
169
+ }
170
+ ```
171
+
172
+ `resultsLimit` (optional): Maximum results to extract. Stops early instead of fetching all. Pass this on both `POST /extractions/estimate` and `POST /extractions` when you only need a specific count.
173
+
174
+ ## Response
175
+
176
+ ```json
177
+ {
178
+ "id": "77777",
179
+ "toolType": "reply_extractor",
180
+ "status": "completed",
181
+ "totalResults": 150
182
+ }
183
+ ```
184
+
185
+ Statuses: `pending`, `running`, `completed`, `failed`.
186
+
187
+ ## Retrieving Results
188
+
189
+ ```
190
+ GET /extractions/{id}
191
+ ```
192
+
193
+ Returns paginated results (up to 1,000 per page). Each result includes:
194
+
195
+ - `xUserId`, `xUsername`, `xDisplayName`
196
+ - `xFollowersCount`, `xVerified`, `xProfileImageUrl`
197
+ - `tweetId`, `tweetText`, `tweetCreatedAt` (for tweet-based extractions)
198
+
199
+ ## Exporting Results
200
+
201
+ ```
202
+ GET /extractions/{id}/export?format=csv
203
+ ```
204
+
205
+ Formats: `csv`, `xlsx`, `md`. 50,000 row limit.
206
+
207
+ Exports include enrichment columns not present in the API response.
208
+
209
+ ## Estimating Cost
210
+
211
+ ```
212
+ POST /extractions/estimate
213
+ ```
214
+
215
+ Same body as create. Response:
216
+
217
+ ```json
218
+ {
219
+ "allowed": true,
220
+ "source": "replyCount",
221
+ "estimatedResults": 150,
222
+ "usagePercent": 45,
223
+ "projectedPercent": 48
224
+ }
225
+ ```
226
+
227
+ If `allowed` is `false`, the extraction would exceed your monthly quota.
228
+
229
+ For common mistakes and tool selection rules, see [mcp-tools.md](mcp-tools.md#common-mistakes).
@@ -0,0 +1,207 @@
1
+ # Xquik MCP Server Setup
2
+
3
+ Connect AI agents and IDEs to Xquik via the Model Context Protocol. The MCP server uses the same API key as the REST API.
4
+
5
+ | Setting | Value |
6
+ |---------|-------|
7
+ | Protocol | HTTP (StreamableHTTP) |
8
+ | Endpoint | `https://xquik.com/mcp` |
9
+ | Auth header | `x-api-key` |
10
+
11
+ > **Security:** Use a scoped, revocable API key — not your primary account key. Where your platform supports environment variable interpolation (e.g., `${XQUIK_API_KEY}`), prefer that over hardcoding. Rotate keys periodically from the [dashboard](https://dashboard.xquik.com/account). Never commit API keys to version control.
12
+
13
+ ## Claude.ai (Web)
14
+
15
+ Claude.ai supports MCP connectors natively via OAuth. Add Xquik as a connector from **Settings > Feature Preview > Integrations > Add More > Xquik**. The OAuth 2.1 flow handles authentication automatically. No API key needed.
16
+
17
+ ## Claude Desktop
18
+
19
+ Claude Desktop only supports stdio transport. Use `mcp-remote` as a bridge (requires [Node.js](https://nodejs.org)).
20
+
21
+ > **About `mcp-remote`:** [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) is an open-source stdio-to-HTTP bridge maintained by the MCP ecosystem (MIT license, [source on GitHub](https://github.com/geelen/mcp-remote)). It translates Claude Desktop's stdio transport to StreamableHTTP — it does not execute arbitrary code, access your filesystem, or modify your system. The version is pinned (`@0.1.38`) to prevent supply-chain drift. If you prefer not to use `npx`, install it globally first: `npm install -g mcp-remote@0.1.38`, then replace `"command": "npx"` with `"command": "mcp-remote"` and remove the version from args.
22
+
23
+ Add to `claude_desktop_config.json`:
24
+
25
+ ```json
26
+ {
27
+ "mcpServers": {
28
+ "xquik": {
29
+ "command": "npx",
30
+ "args": [
31
+ "mcp-remote@0.1.38",
32
+ "https://xquik.com/mcp",
33
+ "--header",
34
+ "x-api-key:${XQUIK_API_KEY}"
35
+ ]
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ > Replace `${XQUIK_API_KEY}` with your actual API key, or set the environment variable before launching Claude Desktop.
42
+
43
+ ## Claude Code
44
+
45
+ Add to `.mcp.json`:
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "xquik": {
51
+ "type": "http",
52
+ "url": "https://xquik.com/mcp",
53
+ "headers": {
54
+ "x-api-key": "xq_YOUR_KEY_HERE"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## ChatGPT
62
+
63
+ 3 ways to connect ChatGPT to Xquik:
64
+
65
+ ### Option 1: Custom GPT (Recommended)
66
+
67
+ Create a Custom GPT and add Xquik as an Action using the OpenAPI schema at `https://docs.xquik.com/openapi.json`. Set the API key under Authentication > API Key > Header `x-api-key`.
68
+
69
+ ### Option 2: Agents SDK
70
+
71
+ Use the [OpenAI Agents SDK](https://openai.github.io/openai-agents-python/mcp/) for programmatic access:
72
+
73
+ ```python
74
+ from agents.mcp import MCPServerStreamableHttp
75
+
76
+ async with MCPServerStreamableHttp(
77
+ url="https://xquik.com/mcp",
78
+ headers={"x-api-key": "xq_YOUR_KEY_HERE"},
79
+ params={},
80
+ ) as xquik:
81
+ # use xquik as a tool provider
82
+ pass
83
+ ```
84
+
85
+ ### Option 3: Developer Mode
86
+
87
+ ChatGPT Developer Mode supports MCP connectors via OAuth. Add Xquik from **Settings > Developer Mode > MCP Tools > Add**. Enter `https://xquik.com/mcp` as the endpoint. OAuth handles authentication automatically.
88
+
89
+ ## Codex CLI
90
+
91
+ Add to `~/.codex/config.toml`:
92
+
93
+ ```toml
94
+ [mcp_servers.xquik]
95
+ url = "https://xquik.com/mcp"
96
+ http_headers = { "x-api-key" = "xq_YOUR_KEY_HERE" }
97
+ ```
98
+
99
+ ## Cursor
100
+
101
+ Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):
102
+
103
+ ```json
104
+ {
105
+ "mcpServers": {
106
+ "xquik": {
107
+ "url": "https://xquik.com/mcp",
108
+ "headers": {
109
+ "x-api-key": "xq_YOUR_KEY_HERE"
110
+ }
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ ## VS Code
117
+
118
+ Add to `.vscode/mcp.json` (project) or use **MCP: Open User Configuration** (global):
119
+
120
+ ```json
121
+ {
122
+ "servers": {
123
+ "xquik": {
124
+ "type": "http",
125
+ "url": "https://xquik.com/mcp",
126
+ "headers": {
127
+ "x-api-key": "xq_YOUR_KEY_HERE"
128
+ }
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ ## Windsurf
135
+
136
+ Add to `~/.codeium/windsurf/mcp_config.json`:
137
+
138
+ ```json
139
+ {
140
+ "mcpServers": {
141
+ "xquik": {
142
+ "serverUrl": "https://xquik.com/mcp",
143
+ "headers": {
144
+ "x-api-key": "xq_YOUR_KEY_HERE"
145
+ }
146
+ }
147
+ }
148
+ }
149
+ ```
150
+
151
+ ## OpenCode
152
+
153
+ Add to `opencode.json`:
154
+
155
+ ```json
156
+ {
157
+ "mcp": {
158
+ "xquik": {
159
+ "type": "remote",
160
+ "url": "https://xquik.com/mcp",
161
+ "headers": {
162
+ "x-api-key": "xq_YOUR_KEY_HERE"
163
+ }
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ ## MCP Server Architecture
170
+
171
+ The MCP server (v2) at `https://xquik.com/mcp` provides 2 structured API tools:
172
+
173
+ | Tool | Description | Cost |
174
+ |------|-------------|------|
175
+ | `explore` | Search the API endpoint catalog (read-only, no network calls) | Free |
176
+ | `xquik` | Execute API calls against your account | Varies by endpoint |
177
+
178
+ The agent sends structured API requests through the MCP server, which handles authentication and execution within the same first-party infrastructure as the REST API. All 122 REST API endpoints across 12 categories are accessible: account, automations, bot, composition, extraction, integrations, media, monitoring, support, twitter, x-accounts, and x-write.
179
+
180
+ ## After Setup
181
+
182
+ ### Workflow Patterns
183
+
184
+ | Workflow | Steps (via `xquik` tool) |
185
+ |----------|--------------------------|
186
+ | Set up real-time alerts | `POST /monitors` -> `POST /webhooks` -> `POST /webhooks/{id}/test` |
187
+ | Run a giveaway | `GET /account` -> `POST /draws` |
188
+ | Bulk extraction | `POST /extractions/estimate` -> `POST /extractions` -> `GET /extractions/{id}` |
189
+ | Compose optimized tweet | `POST /compose` (step=compose -> refine -> score) |
190
+ | Subscribe or manage billing | `POST /subscribe` |
191
+
192
+ ### Example Prompts
193
+
194
+ Try these with your AI agent:
195
+
196
+ - "Monitor @vercel for new tweets and quote tweets"
197
+ - "How many followers does @elonmusk have?"
198
+ - "Search for tweets mentioning xquik"
199
+ - "What does this tweet say? https://x.com/elonmusk/status/1893456789012345678"
200
+ - "Does @elonmusk follow @SpaceX back?"
201
+ - "Pick 3 winners from this tweet: https://x.com/burakbayir/status/1893456789012345678"
202
+ - "How much would it cost to extract all followers of @elonmusk?"
203
+ - "What's trending in the US right now?"
204
+ - "What's trending on Hacker News today?"
205
+ - "Help me write a tweet about launching my product"
206
+ - "Set up a webhook at https://my-server.com/events for new tweets"
207
+ - "What plan am I on and how much have I used?"
@@ -0,0 +1,151 @@
1
+ # Xquik MCP Tools Reference
2
+
3
+ The MCP server at `https://xquik.com/mcp` provides 2 structured API tools. The agent sends API requests through the server, which handles authentication and execution. All requests stay within the same first-party trust boundary as the REST API (`xquik.com/api/v1`).
4
+
5
+ ## Tools
6
+
7
+ | Tool | Description | Cost |
8
+ |------|-------------|------|
9
+ | `explore` | Search the API endpoint catalog (read-only, no network calls) | Free |
10
+ | `xquik` | Execute API calls against your account | Varies by endpoint |
11
+
12
+ ### `explore` — Search the API Spec
13
+
14
+ The tool provides an in-memory `spec.endpoints` array. Filter/search it to find endpoints before calling them.
15
+
16
+ ```typescript
17
+ interface EndpointInfo {
18
+ method: string;
19
+ path: string;
20
+ summary: string;
21
+ category: string; // account, automations, bot, composition, credits, extraction, integrations, media, monitoring, support, twitter, x-accounts, x-write
22
+ free: boolean;
23
+ parameters?: Array<{ name: string; in: 'query' | 'path' | 'body'; required: boolean; type: string; description: string }>;
24
+ responseShape?: string;
25
+ }
26
+
27
+ declare const spec: { endpoints: EndpointInfo[] };
28
+ ```
29
+
30
+ Examples:
31
+
32
+ ```javascript
33
+ // Find all free endpoints
34
+ async () => spec.endpoints.filter(e => e.free);
35
+
36
+ // Find endpoints by category
37
+ async () => spec.endpoints.filter(e => e.category === 'x-write');
38
+
39
+ // Search by keyword
40
+ async () => spec.endpoints.filter(e => e.summary.toLowerCase().includes('tweet'));
41
+ ```
42
+
43
+ ### `xquik` — Execute API Calls
44
+
45
+ The tool provides `xquik.request()` with auth injected automatically. Never pass API keys.
46
+
47
+ ```typescript
48
+ declare const xquik: {
49
+ request(path: string, options?: {
50
+ method?: string; // default: 'GET'
51
+ body?: unknown;
52
+ query?: Record<string, string>;
53
+ }): Promise<unknown>;
54
+ };
55
+ declare const spec: { endpoints: EndpointInfo[] };
56
+ ```
57
+
58
+ ## Tool Selection Rules
59
+
60
+ Use `explore` first to find endpoints, then `xquik` to call them.
61
+
62
+ | Goal | Endpoint (via `xquik`) |
63
+ |------|------------------------|
64
+ | Single tweet by ID or URL | `GET /api/v1/x/tweets/{id}` |
65
+ | Full X Article by tweet ID | `GET /api/v1/x/articles/{id}` |
66
+ | Search tweets by keyword/hashtag | `GET /api/v1/x/tweets/search?q=...` |
67
+ | User profile, bio, follower counts | `GET /api/v1/x/users/{username}` |
68
+ | Download media from tweets | `POST /api/v1/x/media/download` |
69
+ | Check follow relationship | `GET /api/v1/x/followers/check?source=A&target=B` |
70
+ | Trending topics by region (X) | `GET /api/v1/trends?woeid=1` |
71
+ | Trending news from 7 sources | `GET /api/v1/radar` (via `xquik` tool) |
72
+ | Activity from monitored accounts | `GET /api/v1/events` |
73
+ | Budget, plan, usage percent | `GET /api/v1/account` |
74
+ | Monitor an X account | `POST /api/v1/monitors` |
75
+ | Set up webhook notifications | `POST /api/v1/webhooks` |
76
+ | Run a giveaway draw | `POST /api/v1/draws` |
77
+ | Subscribe or manage billing | `POST /api/v1/subscribe` |
78
+ | Compose/draft a tweet | `POST /api/v1/compose` (3-step: compose, refine, score) |
79
+ | Link your X username | `PUT /api/v1/account/x-identity` |
80
+ | Analyze tweet style | `POST /api/v1/styles` |
81
+ | Get cached style | `GET /api/v1/styles/{username}` |
82
+ | Compare two styles | `GET /api/v1/styles/compare` |
83
+ | Post a tweet | `POST /api/v1/x/tweets` (requires connected account) |
84
+ | Like/unlike a tweet | `POST`/`DELETE /api/v1/x/tweets/{id}/like` |
85
+ | Retweet | `POST /api/v1/x/tweets/{id}/retweet` |
86
+ | Follow/unfollow | `POST`/`DELETE /api/v1/x/users/{id}/follow` |
87
+ | Send a DM | `POST /api/v1/x/dm/{userId}` |
88
+ | Upload media | `POST /api/v1/x/media` |
89
+ | Create automation flow | `POST /api/v1/automations` |
90
+ | List automation flows | `GET /api/v1/automations` |
91
+ | Add step to flow | `POST /api/v1/automations/{slug}/steps` |
92
+ | Activate/deactivate flow | `PATCH /api/v1/automations/{slug}` |
93
+ | Open support ticket | `POST /api/v1/support/tickets` |
94
+ | List support tickets | `GET /api/v1/support/tickets` |
95
+ | Get user's recent tweets | `GET /api/v1/x/users/{id}/tweets` |
96
+ | Get user's liked tweets | `GET /api/v1/x/users/{id}/likes` |
97
+ | Get user's media tweets | `GET /api/v1/x/users/{id}/media` |
98
+ | Get tweet favoriters (who liked) | `GET /api/v1/x/tweets/{id}/favoriters` |
99
+ | Get mutual followers | `GET /api/v1/x/users/{id}/followers-you-know` |
100
+ | Get bookmarks | `GET /api/v1/x/bookmarks` |
101
+ | Get bookmark folders | `GET /api/v1/x/bookmarks/folders` |
102
+ | Get notifications | `GET /api/v1/x/notifications` |
103
+ | Get home timeline | `GET /api/v1/x/timeline` |
104
+ | Get DM history | `GET /api/v1/x/dm/{userId}/history` |
105
+ | Check credit balance | `GET /api/v1/credits` |
106
+ | Top up credits | `POST /api/v1/credits/topup` |
107
+
108
+ Use `POST /api/v1/extractions` ONLY for bulk data that simpler endpoints cannot provide (all followers, all replies to a tweet, community members, etc.). Always call `POST /api/v1/extractions/estimate` first.
109
+
110
+ ## Workflow Patterns
111
+
112
+ | Workflow | Steps |
113
+ |----------|-------|
114
+ | **Set up real-time alerts** | `POST /monitors` -> `POST /webhooks` -> `POST /webhooks/{id}/test` |
115
+ | **Run a giveaway** | `GET /account` -> `POST /draws` |
116
+ | **Bulk extraction** | `POST /extractions/estimate` -> `POST /extractions` -> `GET /extractions/{id}` |
117
+ | **Compose optimized tweet** | `POST /compose` (step=compose -> refine -> score) |
118
+ | **Analyze tweet style** | `POST /styles` -> `GET /styles/{username}` -> `POST /compose` with `styleUsername` |
119
+ | **Post a tweet** | `GET /x/accounts` -> `POST /x/tweets` with `account` + `text` |
120
+ | **Get trending news** | `GET /radar` (free, all 7 sources, via `xquik` tool) -> `POST /compose` with trending topic |
121
+ | **Create automation** | `POST /automations` -> `POST /automations/{slug}/steps` -> `PATCH /automations/{slug}` (activate) |
122
+ | **Open support ticket** | `POST /support/tickets` -> `GET /support/tickets/{id}` |
123
+
124
+ ## Common Mistakes
125
+
126
+ | Mistake | Fix |
127
+ |---------|-----|
128
+ | Combining free and paid calls in `Promise.all` | Call free endpoints first, then paid ones separately. A 402 in Promise.all kills all results |
129
+ | Using `compose` when user wants to send a tweet | `POST /compose` is for drafting. Use `POST /x/tweets` to send |
130
+ | Using `POST /x/tweets` when user wants help writing | Use the 3-step compose flow instead |
131
+ | Falling back to web search when API call fails | Use free data already fetched (radar, styles, compose). Never discard it |
132
+ | Not checking subscription before paid calls | Always attempt the call. Handle 402 by calling `POST /subscribe` for checkout URL |
133
+ | Passing API keys in code | Auth is injected automatically. Never include keys |
134
+ | Using `explore` for API calls | `explore` is read-only spec search. Use `xquik` for actual API calls |
135
+ | Looking up follow/DM by username | Follow and DM endpoints need numeric user ID. Look up via `GET /x/users/{username}` first |
136
+
137
+ ## Unsupported Operations
138
+
139
+ These are NOT available via the MCP server:
140
+
141
+ - API key management (create, list, delete)
142
+ - File export (CSV, XLSX, Markdown)
143
+ - Account locale update
144
+ - Scheduled tweets
145
+
146
+ - Direct X search (use extraction `tweet_search_extractor` for bulk search)
147
+
148
+ ## Cost Reference
149
+
150
+ - **Free**: account info, compose (all steps), styles (cached lookup/save/delete/compare), drafts, radar (via `xquik` tool, all 7 sources), subscribe, API keys, bot endpoints, integrations, X account management, automations (create, list, update, delete, steps), support tickets, credits (balance check, top up)
151
+ - **Subscription required**: tweet search, user lookup, tweet lookup, follow check, media download (first only, cached free), extractions, draws, style analysis (X API refresh), performance analysis, trends, all write actions (tweet, like, retweet, follow, DM, profile, media upload, communities)