x-developer 2.6.5 → 2.6.6

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.
Files changed (130) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +3 -3
  3. package/.codex-plugin/plugin.json +5 -5
  4. package/CHANGELOG.md +16 -3
  5. package/README.md +111 -70
  6. package/commands/post.md +5 -5
  7. package/commands/search.md +5 -8
  8. package/commands/trending.md +3 -5
  9. package/commands/user.md +4 -10
  10. package/context7.json +9 -9
  11. package/openclaw.plugin.json +4 -4
  12. package/package.json +10 -2
  13. package/scripts/check-versions.mjs +1 -1
  14. package/scripts/release-guard/content-policy.mjs +17 -17
  15. package/scripts/release-guard/policy.mjs +2 -2
  16. package/server.json +1 -1
  17. package/skills/x-twitter-scraper/SKILL.md +96 -90
  18. package/skills/x-twitter-scraper/metadata.json +2 -2
  19. package/skills/x-twitter-scraper/references/api-endpoints-api-keys.md +5 -5
  20. package/skills/x-twitter-scraper/references/api-endpoints-compose.md +16 -16
  21. package/skills/x-twitter-scraper/references/api-endpoints-credits.md +3 -3
  22. package/skills/x-twitter-scraper/references/api-endpoints-drafts.md +21 -21
  23. package/skills/x-twitter-scraper/references/api-endpoints-draws.md +15 -15
  24. package/skills/x-twitter-scraper/references/api-endpoints-error-codes.md +4 -4
  25. package/skills/x-twitter-scraper/references/api-endpoints-events.md +8 -8
  26. package/skills/x-twitter-scraper/references/api-endpoints-extractions.md +24 -23
  27. package/skills/x-twitter-scraper/references/api-endpoints-monitors.md +21 -21
  28. package/skills/x-twitter-scraper/references/api-endpoints-radar.md +13 -13
  29. package/skills/x-twitter-scraper/references/api-endpoints-support.md +6 -6
  30. package/skills/x-twitter-scraper/references/api-endpoints-trends.md +20 -5
  31. package/skills/x-twitter-scraper/references/api-endpoints-tweet-style-cache.md +39 -39
  32. package/skills/x-twitter-scraper/references/api-endpoints-webhooks.md +24 -24
  33. package/skills/x-twitter-scraper/references/api-endpoints-x-accounts.md +13 -13
  34. package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +41 -41
  35. package/skills/x-twitter-scraper/references/api-endpoints-x-media.md +9 -9
  36. package/skills/x-twitter-scraper/references/api-endpoints-x-write.md +73 -73
  37. package/skills/x-twitter-scraper/references/api-endpoints.md +11 -11
  38. package/skills/x-twitter-scraper/references/automate-twitter-giveaways.md +13 -13
  39. package/skills/x-twitter-scraper/references/best-x-api-alternative.md +38 -38
  40. package/skills/x-twitter-scraper/references/compare-twitter-apis.md +23 -24
  41. package/skills/x-twitter-scraper/references/draws.md +14 -14
  42. package/skills/x-twitter-scraper/references/export-twitter-followers.md +12 -12
  43. package/skills/x-twitter-scraper/references/extract-x-community-data.md +10 -10
  44. package/skills/x-twitter-scraper/references/extractions.md +54 -48
  45. package/skills/x-twitter-scraper/references/mcp-setup.md +30 -36
  46. package/skills/x-twitter-scraper/references/mcp-tools.md +59 -69
  47. package/skills/x-twitter-scraper/references/monitor-twitter-webhooks.md +17 -18
  48. package/skills/x-twitter-scraper/references/python-examples.md +18 -26
  49. package/skills/x-twitter-scraper/references/reliable-twitter-data-api-2026.md +58 -60
  50. package/skills/x-twitter-scraper/references/scrape-export-twitter-data.md +25 -27
  51. package/skills/x-twitter-scraper/references/security.md +9 -22
  52. package/skills/x-twitter-scraper/references/track-twitter-keywords-mentions.md +18 -18
  53. package/skills/x-twitter-scraper/references/twitter-api-alternative-faq.md +17 -17
  54. package/skills/x-twitter-scraper/references/twitter-api-without-x-account.md +10 -11
  55. package/skills/x-twitter-scraper/references/twitter-data-pipeline.md +23 -23
  56. package/skills/x-twitter-scraper/references/twitter-scraper-api-guide.md +50 -50
  57. package/skills/x-twitter-scraper/references/types-account-identity.md +1 -1
  58. package/skills/x-twitter-scraper/references/types-account.md +1 -1
  59. package/skills/x-twitter-scraper/references/types-api-keys.md +1 -1
  60. package/skills/x-twitter-scraper/references/types-bookmarks-and-timeline.md +1 -1
  61. package/skills/x-twitter-scraper/references/types-credits.md +1 -1
  62. package/skills/x-twitter-scraper/references/types-download-media.md +4 -4
  63. package/skills/x-twitter-scraper/references/types-draws.md +1 -1
  64. package/skills/x-twitter-scraper/references/types-error.md +1 -1
  65. package/skills/x-twitter-scraper/references/types-events.md +1 -1
  66. package/skills/x-twitter-scraper/references/types-extractions.md +79 -96
  67. package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +1 -1
  68. package/skills/x-twitter-scraper/references/types-monitors.md +1 -1
  69. package/skills/x-twitter-scraper/references/types-radar.md +1 -1
  70. package/skills/x-twitter-scraper/references/types-request-bodies.md +1 -1
  71. package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +1 -1
  72. package/skills/x-twitter-scraper/references/types-support.md +1 -1
  73. package/skills/x-twitter-scraper/references/types-trends.md +1 -1
  74. package/skills/x-twitter-scraper/references/types-tweet-drafts.md +1 -1
  75. package/skills/x-twitter-scraper/references/types-tweet-style-cache.md +1 -1
  76. package/skills/x-twitter-scraper/references/types-user-activity.md +1 -1
  77. package/skills/x-twitter-scraper/references/types-webhooks.md +1 -1
  78. package/skills/x-twitter-scraper/references/types-x-accounts.md +3 -3
  79. package/skills/x-twitter-scraper/references/types-x-api.md +25 -31
  80. package/skills/x-twitter-scraper/references/types-x-articles.md +1 -1
  81. package/skills/x-twitter-scraper/references/types-x-write.md +3 -3
  82. package/skills/x-twitter-scraper/references/types.md +15 -15
  83. package/skills/x-twitter-scraper/references/usage.md +6 -6
  84. package/skills/x-twitter-scraper/references/webhooks.md +27 -37
  85. package/skills/x-twitter-scraper/references/workflows.md +54 -63
  86. package/skills/x-twitter-scraper/skill-card.md +35 -27
  87. package/skills/x-twitter-scraper/skillspector-report.md +2 -2
  88. package/skills/xquik-social-research/SKILL.md +19 -16
  89. package/skills.sh.json +8 -8
  90. package/stub-server.mjs +42 -42
  91. package/task-guides/check-mutuals.md +9 -9
  92. package/task-guides/clean-followers.md +15 -15
  93. package/task-guides/export-tweets-csv.md +12 -12
  94. package/task-guides/extract-followers.md +16 -16
  95. package/task-guides/find-bangers.md +14 -14
  96. package/task-guides/find-influencers.md +10 -10
  97. package/task-guides/find-viral-tweets.md +15 -15
  98. package/task-guides/follow-unfollow.md +16 -15
  99. package/task-guides/for-you-feed.md +10 -10
  100. package/task-guides/going-viral.md +19 -18
  101. package/task-guides/grow-followers.md +13 -13
  102. package/task-guides/monitor-accounts.md +16 -16
  103. package/task-guides/optimize-tweets.md +16 -15
  104. package/task-guides/post-tweets.md +19 -18
  105. package/task-guides/run-giveaway.md +15 -15
  106. package/task-guides/search-tweets.md +13 -13
  107. package/task-guides/send-dms.md +13 -13
  108. package/task-guides/top-replies.md +10 -10
  109. package/task-guides/track-competitors.md +16 -16
  110. package/task-guides/track-hashtags.md +10 -10
  111. package/task-guides/track-mentions.md +12 -12
  112. package/task-guides/trending-news.md +11 -11
  113. package/task-guides/tweet-analytics.md +16 -16
  114. package/task-guides/tweet-ideas.md +10 -10
  115. package/task-guides/tweet-replies.md +15 -15
  116. package/task-guides/tweet-style.md +10 -10
  117. package/task-guides/tweet-webhooks.md +12 -12
  118. package/task-guides/update-x-profile.md +15 -15
  119. package/task-guides/user-tweets.md +21 -21
  120. package/task-guides/who-liked.md +10 -10
  121. package/task-guides/who-quoted.md +10 -10
  122. package/task-guides/who-retweeted.md +10 -10
  123. package/task-guides/write-threads.md +13 -13
  124. package/task-guides/write-tweets.md +15 -15
  125. package/task-guides/x-articles.md +9 -9
  126. package/task-guides/x-bookmarks.md +10 -10
  127. package/task-guides/x-communities.md +10 -10
  128. package/task-guides/x-lists.md +8 -8
  129. package/task-guides/x-spaces.md +9 -9
  130. package/task-guides/x-trends.md +11 -11
@@ -1,21 +1,11 @@
1
- # Xquik MCP Tools Reference
1
+ # Xquik MCP tools reference
2
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 for `xquik.com/api/v1`.
3
+ The MCP server at `https://xquik.com/mcp` provides 2 API tools. The client sends requests through the server, which authenticates calls to `xquik.com/api/v1`.
4
4
 
5
5
  Hosted MCP v2.6.0 supports `2026-07-28` through `server/discover`.
6
6
  Current MCP SDKs add request metadata and headers automatically.
7
7
  Modern calls need no initialization session.
8
8
 
9
- ## Contents
10
-
11
- - [Tools](#tools)
12
- - [Safety Gates](#safety-gates)
13
- - [Tool Selection Rules](#tool-selection-rules)
14
- - [Workflow Patterns](#workflow-patterns)
15
- - [Common Mistakes](#common-mistakes)
16
- - [Unsupported Operations](#unsupported-operations)
17
- - [Usage Reference](#usage-reference)
18
-
19
9
  ## Tools
20
10
 
21
11
  | Tool | Description | Usage |
@@ -23,9 +13,9 @@ Modern calls need no initialization session.
23
13
  | `explore` | Search the API endpoint catalog (read-only, no network calls) | Included |
24
14
  | `xquik` | Send confirmed Xquik API requests | Varies by endpoint |
25
15
 
26
- ### `explore` - Search the API Spec
16
+ ### Search the API spec with `explore`
27
17
 
28
- The tool provides an in-memory `spec.endpoints` array. Filter/search it to find endpoints before calling them.
18
+ The tool provides an in-memory `spec.endpoints` array. Search or filter it before calling an endpoint.
29
19
 
30
20
  ```typescript
31
21
  interface EndpointInfo {
@@ -42,20 +32,20 @@ interface EndpointInfo {
42
32
  declare const spec: { endpoints: EndpointInfo[] };
43
33
  ```
44
34
 
45
- Examples:
35
+ For example:
46
36
 
47
37
  ```javascript
48
- // Find all included-usage endpoints
38
+ // Find all included-usage endpoints.
49
39
  async () => spec.endpoints.filter(e => e.free);
50
40
 
51
- // Find endpoints by category
41
+ // Find endpoints by category.
52
42
  async () => spec.endpoints.filter(e => e.category === 'x-write');
53
43
 
54
- // Search by keyword
44
+ // Search summaries by keyword.
55
45
  async () => spec.endpoints.filter(e => e.summary.toLowerCase().includes('tweet'));
56
46
  ```
57
47
 
58
- ### `xquik` - Send API Requests
48
+ ### Send API requests with `xquik`
59
49
 
60
50
  The tool provides `xquik.request()` with authentication and required idempotency headers injected automatically. Never pass API keys or headers. The sandbox reuses each generated key for bounded transient retries. After an unresolved write failure, verify state. Start a new attempt only when `safe_to_retry` is true and the user approves.
61
51
 
@@ -63,13 +53,13 @@ For `409 coverage_cursor_unavailable`, wait the exact `Retry-After` seconds and
63
53
  retry the same cursor once. For `410 coverage_cursor_gone`, the response omits
64
54
  `Retry-After`. Restart without a cursor and deduplicate by ID.
65
55
 
66
- ## Safety Gates
56
+ ## Require approval
67
57
 
68
- Apply these gates before using `xquik`:
58
+ Apply these rules before using `xquik`:
69
59
 
70
60
  | Capability | Rule |
71
61
  |------------|------|
72
- | Public writes | Show the exact tweet, reply, like, retweet, follow, unfollow, profile, or community action and wait for explicit approval. |
62
+ | Public writes | Show the exact tweet, reply, like, retweet, follow, unfollow, profile, or community action. Wait for explicit approval. |
73
63
  | Direct messages | Show sender, recipient, and message text. Never send bulk or automatic DMs. |
74
64
  | Persistent resources | Create monitors and webhooks only when the user explicitly asks for ongoing delivery. Show target, event types, URL, and ongoing usage before creation. |
75
65
  | Private reads | Confirm before fetching DMs, bookmarks, notifications, or home timeline. Forward returned private data to other tools only after explicit approval. |
@@ -87,7 +77,7 @@ declare const xquik: {
87
77
  declare const spec: { endpoints: EndpointInfo[] };
88
78
  ```
89
79
 
90
- ## Tool Selection Rules
80
+ ## Tool selection rules
91
81
 
92
82
  Use `explore` first to find endpoints, then `xquik` to call them.
93
83
 
@@ -96,81 +86,81 @@ Use `explore` first to find endpoints, then `xquik` to call them.
96
86
  | Single tweet by ID or URL | `GET /api/v1/x/tweets/{id}` |
97
87
  | Full X Article by tweet ID | `GET /api/v1/x/articles/{tweetId}` |
98
88
  | Search tweets by keyword/hashtag | `GET /api/v1/x/tweets/search?q=...` |
99
- | User profile, bio, follower counts | `GET /api/v1/x/users/{id}` (`id` can be username or numeric ID) |
89
+ | User profile, bio, and follower counts | `GET /api/v1/x/users/{id}`; `id` accepts a username or numeric ID |
100
90
  | Download media from tweets | `POST /api/v1/x/media/download` |
101
91
  | Check follow relationship | `GET /api/v1/x/followers/check?source=A&target=B` |
102
- | Trending topics by region (X) | `GET /api/v1/trends?woeid=1` |
103
- | Trending news from 7 sources | `GET /api/v1/radar` (via `xquik` tool) |
92
+ | X trending topics by region | `GET /api/v1/trends?woeid=1` |
93
+ | Trending news from 7 sources | `GET /api/v1/radar` through `xquik` |
104
94
  | Activity from monitored accounts | `GET /api/v1/events` |
105
95
  | Credit balance | `GET /api/v1/credits` |
106
- | Monitor an X account | `POST /api/v1/monitors` (persistent; confirmation required) |
107
- | Set up webhook notifications | `POST /api/v1/webhooks` (persistent; confirmation required) |
96
+ | Monitor an X account | `POST /api/v1/monitors`; persistent and requires approval |
97
+ | Set up webhook notifications | `POST /api/v1/webhooks`; persistent and requires approval |
108
98
  | Run a giveaway draw | `POST /api/v1/draws` |
109
- | Compose/draft a tweet | `POST /api/v1/compose` (3-step: compose, refine, score) |
99
+ | Compose or draft a tweet | `POST /api/v1/compose`; run compose, refine, then score |
110
100
  | Link your X username | Use the Xquik dashboard account settings |
111
101
  | Analyze tweet style | `POST /api/v1/styles` |
112
102
  | Get cached style | `GET /api/v1/styles/{id}` |
113
103
  | Compare two styles | `GET /api/v1/styles/compare` |
114
- | Post a tweet | `POST /api/v1/x/tweets` (confirmation required) |
115
- | Like/unlike a tweet | `POST` or delete request to `/api/v1/x/tweets/{id}/like` (confirmation required) |
116
- | Retweet | `POST /api/v1/x/tweets/{id}/retweet` (confirmation required) |
117
- | Unretweet | delete request to `/api/v1/x/tweets/{id}/retweet` (confirmation required) |
118
- | Follow/unfollow | `POST` or delete request to `/api/v1/x/users/{id}/follow` (confirmation required) |
119
- | Send a DM | `POST /api/v1/x/dm/{userId}` (confirmation required) |
120
- | Upload media | `POST /api/v1/x/media` (confirmation required before use in a post or profile change) |
104
+ | Post a tweet | `POST /api/v1/x/tweets`; requires approval |
105
+ | Like or unlike a tweet | `POST /api/v1/x/tweets/{id}/like` likes it. A delete request to the same route unlikes it. Both require approval. |
106
+ | Retweet | `POST /api/v1/x/tweets/{id}/retweet`; requires approval |
107
+ | Unretweet | Send a delete request to `/api/v1/x/tweets/{id}/retweet`; requires approval |
108
+ | Follow or unfollow | `POST /api/v1/x/users/{id}/follow` follows. A delete request to the same route unfollows. Both require approval. |
109
+ | Send a DM | `POST /api/v1/x/dm/{userId}`; requires approval |
110
+ | Upload media | `POST /api/v1/x/media`; approve its use in a post or profile change |
121
111
  | Open support ticket | `POST /api/v1/support/tickets` |
122
112
  | List support tickets | `GET /api/v1/support/tickets` |
123
113
  | Get user's recent tweets | `GET /api/v1/x/users/{id}/tweets` |
124
114
  | Get user's liked tweets | `GET /api/v1/x/users/{id}/likes` |
125
115
  | Get user's media tweets | `GET /api/v1/x/users/{id}/media` |
126
- | Get tweet favoriters (who liked) | `GET /api/v1/x/tweets/{id}/favoriters` |
116
+ | Get accounts that liked a tweet | `GET /api/v1/x/tweets/{id}/favoriters` |
127
117
  | Get mutual followers | `GET /api/v1/x/users/{id}/followers-you-know` |
128
- | Get followers/following | `GET /api/v1/x/users/{id}/followers` / `GET /api/v1/x/users/{id}/following` |
129
- | Get tweet quotes/replies/retweeters/thread | `GET /api/v1/x/tweets/{id}/quotes`, `/replies`, `/retweeters`, `/thread` |
118
+ | Get followers or following | `GET /api/v1/x/users/{id}/followers` or `GET /api/v1/x/users/{id}/following` |
119
+ | Get tweet quotes, replies, retweeters, or thread | `GET /api/v1/x/tweets/{id}/quotes`, `/replies`, `/retweeters`, or `/thread` |
130
120
  | Read X Lists | `GET /api/v1/x/lists/{id}/members`, `/followers`, `/tweets` |
131
121
  | Read X Communities | `GET /api/v1/x/communities/search`, `/tweets`, `/{id}/info`, `/{id}/members`, `/{id}/moderators`, `/{id}/tweets` |
132
- | Get bookmarks | `GET /api/v1/x/bookmarks` (private; confirmation required) |
122
+ | Get bookmarks | `GET /api/v1/x/bookmarks`; private and requires approval |
133
123
  | Get bookmark folders | `GET /api/v1/x/bookmarks/folders` |
134
- | Get notifications | `GET /api/v1/x/notifications` (private; confirmation required) |
135
- | Get home timeline | `GET /api/v1/x/timeline` (private; confirmation required) |
136
- | Get DM history | `GET /api/v1/x/dm/{userId}/history?account={username}` (private; exact-account approval required; block ambiguous selection) |
124
+ | Get notifications | `GET /api/v1/x/notifications`; private and requires approval |
125
+ | Get home timeline | `GET /api/v1/x/timeline`; private and requires approval |
126
+ | Get DM history | `GET /api/v1/x/dm/{userId}/history?account={username}`; private and requires exact-account approval |
137
127
  | Check credit balance | `GET /api/v1/credits` |
138
128
 
139
- 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.
129
+ Use `POST /api/v1/extractions` only for bulk data that simpler endpoints cannot provide. Examples include complete follower lists, replies, and community members. Always call `POST /api/v1/extractions/estimate` first.
140
130
 
141
131
  Fresh cursorless Tweet Search with `queryType=Latest` is newest-first across
142
132
  pages. Existing cursors retain their ordering. Thread reads accept 32 effective
143
133
  result filters. They exclude `nativeRetweets`, `sinceTime`, and `untilTime`.
144
134
  See [direct lookups](api-endpoints-x-api.md) for the exact names.
145
135
 
146
- ## Workflow Patterns
136
+ ## Workflow patterns
147
137
 
148
138
  | Workflow | Steps |
149
139
  |----------|-------|
150
- | **Set up real-time alerts** | Confirm target, event types, destination, and usage estimate -> `POST /monitors` -> `POST /webhooks` -> `POST /webhooks/{id}/test` |
151
- | **Run a giveaway** | Confirm tweet URL and rules -> `POST /draws` |
152
- | **Bulk extraction** | `POST /extractions/estimate` -> `POST /extractions` -> `GET /extractions/{id}` |
153
- | **Compose optimized tweet** | `POST /compose` (step=compose -> refine -> score) |
154
- | **Analyze tweet style** | `POST /styles` -> `GET /styles/{id}` -> `POST /compose` with `styleUsername` |
155
- | **Post a tweet** | `GET /x/accounts` -> confirm -> `POST /x/tweets` with `account` and `text` -> hosted MCP injects a unique `Idempotency-Key` -> poll `statusUrl` |
156
- | **Get trending news** | `GET /radar` (supported sources, via `xquik` tool) -> `POST /compose` with trending topic |
157
- | **Open support ticket** | `POST /support/tickets` -> `GET /support/tickets/{id}` |
158
- | **Collect maximum-coverage replies** | `GET /x/tweets/{id}/replies?mode=complete&limit=<1-25000>` -> filter direct rows by `inReplyToId` -> keep `nested_replies` separate -> inspect `diagnostic` |
159
-
160
- ## Common Mistakes
140
+ | Set up ongoing alerts | Confirm target, event types, destination, and usage estimate -> `POST /monitors` -> `POST /webhooks` -> `POST /webhooks/{id}/test` |
141
+ | Run a giveaway | Confirm tweet URL and rules -> `POST /draws` |
142
+ | Bulk extraction | `POST /extractions/estimate` -> `POST /extractions` -> `GET /extractions/{id}` |
143
+ | Compose and score a tweet | `POST /compose` with `step=compose` -> `refine` -> `score` |
144
+ | Analyze tweet style | `POST /styles` -> `GET /styles/{id}` -> `POST /compose` with `styleUsername` |
145
+ | Post a tweet | `GET /x/accounts` -> approve -> `POST /x/tweets` with `account` and `text` -> hosted MCP adds a unique `Idempotency-Key` -> poll `statusUrl` |
146
+ | Get trending news | `GET /radar` through `xquik` -> `POST /compose` with the selected topic |
147
+ | Open a support ticket | `POST /support/tickets` -> `GET /support/tickets/{id}` |
148
+ | Collect complete reply coverage | `GET /x/tweets/{id}/replies?mode=complete&limit=<1-25000>` -> filter direct rows by `inReplyToId` -> keep `nested_replies` separate -> inspect `diagnostic` |
149
+
150
+ ## Common mistakes
161
151
 
162
152
  | Mistake | Fix |
163
153
  |---------|-----|
164
- | Combining public and metered calls in `Promise.all` | Call public endpoints first, then metered ones separately. A 402 in Promise.all cancels all results |
165
- | Using `compose` when user wants to send a tweet | `POST /compose` is for drafting. Use `POST /x/tweets` to send |
166
- | Using `POST /x/tweets` when user wants help writing | Use the 3-step compose flow instead |
167
- | Falling back to web search when API call fails | Use data already fetched from Xquik. Never discard it |
168
- | Not checking account access before metered calls | Attempt the requested call. On 402, explain the account state and direct the user to the dashboard |
169
- | Passing API keys in code | Auth is injected automatically. Never include keys |
170
- | Using `explore` for API calls | `explore` is read-only spec search. Use `xquik` for actual API calls |
171
- | Looking up follow/DM by username | Follow and DM endpoints need numeric user ID. Look up via `GET /x/users/{id}` first; that route accepts usernames and IDs |
172
- | Treating nested replies as direct replies | Match `inReplyToId` to the root ID. Keep `nested_replies` separate |
173
- | Treating 424 as an empty failure | Keep safe partial rows. Follow `diagnostic.recommendedFallback` and disclose coverage |
154
+ | Combining included and metered calls in `Promise.all` | Call included endpoints first, then metered ones. A 402 in `Promise.all` cancels all results. |
155
+ | Using `compose` when the user wants to send a tweet | `POST /compose` creates drafts. Use `POST /x/tweets` to send. |
156
+ | Using `POST /x/tweets` when the user wants writing help | Use compose, refine, and score instead. |
157
+ | Falling back to web search after an API error | Keep data already fetched from Xquik. |
158
+ | Skipping account checks before metered calls | Attempt the requested call. On 402, explain the account state and direct the user to the dashboard. |
159
+ | Passing API keys in code | The server adds authentication. Do not include keys. |
160
+ | Using `explore` for API calls | `explore` searches the API spec. Use `xquik` for API calls. |
161
+ | Looking up follow or DM targets by username | These routes need a numeric user ID. Resolve it through `GET /x/users/{id}` first. |
162
+ | Treating nested replies as direct replies | Match `inReplyToId` to the root ID. Keep `nested_replies` separate. |
163
+ | Treating 424 as an empty failure | Keep safe partial rows. Follow `diagnostic.recommendedFallback` and disclose coverage. |
174
164
 
175
165
  ## REST-only operations
176
166
 
@@ -187,7 +177,7 @@ These 8 credential, checkout, or guest-wallet operations remain outside MCP:
187
177
  - Guest wallet status polling
188
178
  - Guest wallet top-ups
189
179
 
190
- ## Usage Reference
180
+ ## Usage reference
191
181
 
192
- - Public or included: account info, compose steps, cached styles, drafts, radar, support tickets, credits balance check, and webhook management.
193
- - Metered or account-gated: tweet search, user lookup, tweet lookup, follow check, media download, extractions, draws, active monitors, style analysis, performance analysis, trends, and confirmation-gated write actions.
182
+ - Included operations cover account info, compose steps, cached styles, drafts, Radar, support tickets, credit balance, and webhook management.
183
+ - Metered or account-gated operations cover tweet search, lookups, media, extractions, draws, monitors, analysis, trends, and approved writes.
@@ -1,4 +1,4 @@
1
- # Twitter Account Monitor API: HMAC Webhook Alerts
1
+ # Twitter account monitor API: HMAC webhook alerts
2
2
 
3
3
  Xquik account monitors can detect new tweets, replies, quotes, and reposts.
4
4
  Keyword monitors detect new matches for a persistent query. Poll events or push
@@ -7,27 +7,27 @@ them to an HTTPS endpoint through HMAC-signed webhooks.
7
7
  > Xquik is an independent third-party service. Not affiliated with X Corp.
8
8
  > "Twitter" and "X" are trademarks of X Corp.
9
9
 
10
- ## Twitter Monitor Event and Delivery Data
10
+ ## Twitter monitor event and delivery data
11
11
 
12
- | Object | Fields to Preserve |
12
+ | Object | Fields to preserve |
13
13
  | --- | --- |
14
14
  | Account monitor | Monitor ID, username, event types, active state |
15
15
  | Keyword monitor | Monitor ID, query, event types, active state |
16
16
  | Event | Event ID, monitor ID and type, event type, occurrence time, data |
17
17
  | Delivery | Delivery ID, stream event ID, attempts, status, delivery time |
18
18
 
19
- ## Twitter Monitor Polling Versus Webhook Delivery
19
+ ## Twitter monitor polling versus webhook delivery
20
20
 
21
- | Requirement | Poll Events | Webhook Delivery |
21
+ | Requirement | Poll events | Webhook delivery |
22
22
  | --- | --- | --- |
23
- | Simple scheduled batch | Strong fit | Optional |
24
- | Low detection delay | More frequent polling needed | Strong fit |
23
+ | Simple scheduled batch | Use polling | Optional |
24
+ | Low detection delay | Poll more often | Use webhooks |
25
25
  | Recover after downtime | Resume with the stored cursor | Inspect delivery status, then repoll events |
26
26
  | Public HTTPS endpoint | Not required | Required |
27
27
  | Signature verification | Not applicable | Required |
28
28
  | Backpressure control | Caller controls fetch rate | Receiver must queue work |
29
29
 
30
- Both models need idempotency. Persist the event before downstream processing.
30
+ Both models need idempotency. Persist the event before processing it.
31
31
  Mark completion only after every required side effect succeeds.
32
32
 
33
33
  ### What is the best way to monitor a Twitter account programmatically?
@@ -57,7 +57,7 @@ shown only once and should enter a secret store immediately.
57
57
 
58
58
  Verify `<timestamp>.<nonce>.<raw body>` with `X-Xquik-Timestamp`,
59
59
  `X-Xquik-Nonce`, and `X-Xquik-Signature`. Reject timestamps outside 5 minutes
60
- and reused nonces. Reject invalid signatures before parsing business data.
60
+ and reused nonces. Reject invalid signatures before parsing event data.
61
61
 
62
62
  ### What is a Twitter account monitor API?
63
63
 
@@ -72,13 +72,13 @@ owner, purpose, expected usage, retention, and disable path.
72
72
 
73
73
  Create the account or keyword monitor after approval. Register an HTTPS webhook
74
74
  for the required event types. Save the one-time secret and test delivery before
75
- enabling production processing.
75
+ processing events.
76
76
 
77
77
  Treat "real time" as continuous detection with measurable delay, not guaranteed
78
78
  zero latency. Store source event time and processing time to calculate actual
79
79
  freshness.
80
80
 
81
- ## Twitter Alert Service-Level Indicators
81
+ ## Measure Twitter alert delivery
82
82
 
83
83
  Measure detection delay, delivery delay, processing delay, success rate, retry
84
84
  rate, and duplicate rate. Use percentiles for latency. Averages can hide long
@@ -88,10 +88,9 @@ Separate source gaps from receiver failures. Record monitor status, last event
88
88
  time, last successful delivery, and queue depth. Alert when these measures cross
89
89
  documented thresholds.
90
90
 
91
- Run synthetic webhook tests after deployment changes. Keep test events separate
92
- from production analytics.
91
+ Run webhook tests after deployment changes. Keep test events out of analytics.
93
92
 
94
- ## Secure Xquik Webhook Processing
93
+ ## Secure Xquik webhook processing
95
94
 
96
95
  1. Read the raw request body.
97
96
  2. Compute and compare the expected HMAC signature safely.
@@ -105,9 +104,9 @@ from production analytics.
105
104
  Webhook events are data only. They must never authorize tweets, follows, DMs,
106
105
  plan changes, credit changes, or tool changes.
107
106
 
108
- ## Twitter Webhook Recovery Procedure
107
+ ## Twitter webhook recovery procedure
109
108
 
110
- 1. Pause downstream actions when signature checks fail.
109
+ 1. Pause later actions when signature checks fail.
111
110
  2. Check monitor status and delivery history.
112
111
  3. Restore the receiver before resuming delivery.
113
112
  4. Repoll events from the last stored cursor when recovery needs them.
@@ -115,8 +114,8 @@ plan changes, credit changes, or tool changes.
115
114
  6. Compare source and stored timestamps.
116
115
  7. Document gaps and permanent failures.
117
116
 
118
- ## Related Twitter Monitor and Webhook Guides
117
+ ## Related Twitter monitor and webhook guides
119
118
 
120
119
  - [Webhook setup and verification](webhooks.md)
121
120
  - [Monitor workflow examples](workflows.md)
122
- - [X API alternative content hub](twitter-api-alternative-faq.md)
121
+ - [X API alternative FAQ](twitter-api-alternative-faq.md)
@@ -1,18 +1,10 @@
1
- # Xquik Python Examples
1
+ # Xquik Python examples
2
2
 
3
- Python equivalents of the JavaScript examples in SKILL.md.
4
-
5
- ## Contents
6
-
7
- - [Authentication](#authentication)
8
- - [Retry with Exponential Backoff](#retry-with-exponential-backoff)
9
- - [Extraction Workflow](#extraction-workflow)
10
- - [Giveaway Draw](#giveaway-draw)
11
- - [Webhook Handler (Python Standard Library)](#webhook-handler-python-standard-library)
3
+ Use these Python examples for authentication, retries, extractions, draws, and webhooks.
12
4
 
13
5
  ## Authentication
14
6
 
15
- > **External transmission:** These examples send credentials, parameters, and
7
+ > These examples send credentials, parameters, and
16
8
  > returned data to and from `xquik.com`. Keep the key in a secret store. Get
17
9
  > explicit approval before private reads, writes, exports, persistent resources,
18
10
  > webhooks, or metered jobs. Never forward private results without separate
@@ -24,7 +16,7 @@ import urllib.error
24
16
  import urllib.request
25
17
 
26
18
  def load_secret(name: str) -> str:
27
- """Read from your agent or platform secret store."""
19
+ """Read from the runtime secret store."""
28
20
  raise RuntimeError(f"Configure {name} in your secret store.")
29
21
 
30
22
  API_KEY = load_secret("XQUIK_API_KEY")
@@ -32,7 +24,7 @@ BASE = "https://xquik.com/api/v1"
32
24
  HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"}
33
25
  ```
34
26
 
35
- ## Retry with Exponential Backoff
27
+ ## Retry with exponential backoff
36
28
 
37
29
  ```python
38
30
  import time, random
@@ -65,7 +57,7 @@ def xquik_fetch(path, method="GET", json_body=None, max_retries=3):
65
57
  time.sleep(delay)
66
58
  ```
67
59
 
68
- ## Extraction Workflow
60
+ ## Extraction workflow
69
61
 
70
62
  ```python
71
63
  RESULTS_LIMIT = 1000
@@ -75,7 +67,7 @@ def require_explicit_approval(scope: str) -> None:
75
67
  f"Approval required for {scope}. Implement the approval gate first."
76
68
  )
77
69
 
78
- # Step 1: Estimate
70
+ # Estimate the extraction.
79
71
  estimate = xquik_fetch("/extractions/estimate", method="POST", json_body={
80
72
  "toolType": "reply_extractor",
81
73
  "targetTweetId": "1893704267862470862",
@@ -83,10 +75,10 @@ estimate = xquik_fetch("/extractions/estimate", method="POST", json_body={
83
75
  })
84
76
 
85
77
  if not estimate["allowed"]:
86
- print(f"Estimate requires {estimate['creditsRequired']}; available {estimate['creditsAvailable']}")
78
+ print(f"Extraction estimate: {estimate['creditsRequired']} credits. Balance: {estimate['creditsAvailable']}.")
87
79
  exit()
88
80
 
89
- # Step 2: Create job
81
+ # Create the bounded job only after approval.
90
82
  require_explicit_approval(
91
83
  "the bounded extraction job, usage, recipients, and retention"
92
84
  )
@@ -96,12 +88,12 @@ job = xquik_fetch("/extractions", method="POST", json_body={
96
88
  "resultsLimit": RESULTS_LIMIT,
97
89
  })
98
90
 
99
- # Step 3: Poll until complete (large jobs may return "running")
91
+ # Poll until the job finishes. Large jobs may remain in "running" state.
100
92
  while job["status"] in ("pending", "running"):
101
93
  time.sleep(2)
102
94
  job = xquik_fetch(f"/extractions/{job['id']}")
103
95
 
104
- # Step 4: Get results
96
+ # Get every approved result page.
105
97
  cursor = None
106
98
  results = []
107
99
 
@@ -119,10 +111,10 @@ while True:
119
111
  print(f"Extracted {len(results)} results")
120
112
  ```
121
113
 
122
- ## Giveaway Draw
114
+ ## Giveaway draw
123
115
 
124
116
  ```python
125
- # Create draw with all filters
117
+ # Create a draw with explicit filters.
126
118
  draw = xquik_fetch("/draws", method="POST", json_body={
127
119
  "tweetUrl": "https://x.com/burakbayir/status/1893456789012345678",
128
120
  "winnerCount": 3,
@@ -135,14 +127,14 @@ draw = xquik_fetch("/draws", method="POST", json_body={
135
127
  "requiredKeywords": ["giveaway"],
136
128
  })
137
129
 
138
- # Get winners
130
+ # Get the winners.
139
131
  details = xquik_fetch(f"/draws/{draw['id']}")
140
132
  for winner in details["winners"]:
141
- role = "BACKUP" if winner["isBackup"] else "WINNER"
133
+ role = "Backup" if winner["isBackup"] else "Winner"
142
134
  print(f"{role} #{winner['position']}: @{winner['authorUsername']}")
143
135
  ```
144
136
 
145
- ## Webhook Handler (Python Standard Library)
137
+ ## Python standard library webhook handler
146
138
 
147
139
  ```python
148
140
  import hashlib
@@ -156,9 +148,9 @@ def load_secret(name: str) -> str:
156
148
  """Read from your runtime secret store."""
157
149
  raise RuntimeError(f"Configure {name} in your secret store.")
158
150
 
159
- # Per-webhook secret from POST /webhooks response, not a Xquik account credential
151
+ # Use the per-webhook secret from POST /webhooks, not an Xquik account credential.
160
152
  WEBHOOK_SECRET = load_secret("XQUIK_WEBHOOK_SECRET")
161
- processed_delivery_ids = set() # Use durable storage in production
153
+ processed_delivery_ids = set() # Use durable storage in deployed services.
162
154
 
163
155
  def verify_signature(payload: bytes, signature: str, timestamp: str, nonce: str, secret: str) -> bool:
164
156
  if not timestamp.isdigit() or not re.fullmatch(r"[0-9a-f]{32}", nonce):