x-twitter-scraper 0.5.2 → 0.6.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.
- package/CHANGELOG.md +8 -0
- package/README.md +17 -3
- package/assets/pi-package.png +0 -0
- package/package.json +9 -2
- package/skills/x-twitter-scraper/LICENSE +21 -0
- package/skills/x-twitter-scraper/SKILL.md +389 -0
- package/skills/x-twitter-scraper/metadata.json +38 -0
- package/skills/x-twitter-scraper/references/api-endpoints-api-keys.md +31 -0
- package/skills/x-twitter-scraper/references/api-endpoints-compose.md +33 -0
- package/skills/x-twitter-scraper/references/api-endpoints-credits.md +11 -0
- package/skills/x-twitter-scraper/references/api-endpoints-drafts.md +86 -0
- package/skills/x-twitter-scraper/references/api-endpoints-draws.md +75 -0
- package/skills/x-twitter-scraper/references/api-endpoints-error-codes.md +37 -0
- package/skills/x-twitter-scraper/references/api-endpoints-events.md +48 -0
- package/skills/x-twitter-scraper/references/api-endpoints-extractions.md +97 -0
- package/skills/x-twitter-scraper/references/api-endpoints-monitors.md +74 -0
- package/skills/x-twitter-scraper/references/api-endpoints-radar.md +49 -0
- package/skills/x-twitter-scraper/references/api-endpoints-support.md +47 -0
- package/skills/x-twitter-scraper/references/api-endpoints-trends.md +25 -0
- package/skills/x-twitter-scraper/references/api-endpoints-tweet-style-cache.md +155 -0
- package/skills/x-twitter-scraper/references/api-endpoints-webhooks.md +74 -0
- package/skills/x-twitter-scraper/references/api-endpoints-x-accounts.md +42 -0
- package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +206 -0
- package/skills/x-twitter-scraper/references/api-endpoints-x-media.md +40 -0
- package/skills/x-twitter-scraper/references/api-endpoints-x-write.md +204 -0
- package/skills/x-twitter-scraper/references/api-endpoints.md +30 -0
- package/skills/x-twitter-scraper/references/draws.md +57 -0
- package/skills/x-twitter-scraper/references/extractions.md +237 -0
- package/skills/x-twitter-scraper/references/mcp-setup.md +326 -0
- package/skills/x-twitter-scraper/references/mcp-tools.md +174 -0
- package/skills/x-twitter-scraper/references/python-examples.md +182 -0
- package/skills/x-twitter-scraper/references/security.md +124 -0
- package/skills/x-twitter-scraper/references/types-account-identity.md +9 -0
- package/skills/x-twitter-scraper/references/types-account.md +26 -0
- package/skills/x-twitter-scraper/references/types-api-keys.md +22 -0
- package/skills/x-twitter-scraper/references/types-bookmarks-and-timeline.md +46 -0
- package/skills/x-twitter-scraper/references/types-credits.md +11 -0
- package/skills/x-twitter-scraper/references/types-download-media.md +22 -0
- package/skills/x-twitter-scraper/references/types-draws.md +60 -0
- package/skills/x-twitter-scraper/references/types-error.md +10 -0
- package/skills/x-twitter-scraper/references/types-events.md +43 -0
- package/skills/x-twitter-scraper/references/types-extractions.md +106 -0
- package/skills/x-twitter-scraper/references/types-mcp-add-webhook.md +14 -0
- package/skills/x-twitter-scraper/references/types-mcp-check-follow.md +10 -0
- package/skills/x-twitter-scraper/references/types-mcp-compose-tweet.md +31 -0
- package/skills/x-twitter-scraper/references/types-mcp-estimate-extraction.md +15 -0
- package/skills/x-twitter-scraper/references/types-mcp-get-account.md +26 -0
- package/skills/x-twitter-scraper/references/types-mcp-get-draw.md +30 -0
- package/skills/x-twitter-scraper/references/types-mcp-get-events.md +19 -0
- package/skills/x-twitter-scraper/references/types-mcp-get-trends.md +16 -0
- package/skills/x-twitter-scraper/references/types-mcp-get-user-info.md +16 -0
- package/skills/x-twitter-scraper/references/types-mcp-list-monitors.md +15 -0
- package/skills/x-twitter-scraper/references/types-mcp-lookup-tweet.md +25 -0
- package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +22 -0
- package/skills/x-twitter-scraper/references/types-mcp-refine-tweet.md +13 -0
- package/skills/x-twitter-scraper/references/types-mcp-run-draw.md +18 -0
- package/skills/x-twitter-scraper/references/types-mcp-run-extraction.md +12 -0
- package/skills/x-twitter-scraper/references/types-mcp-score-tweet.md +16 -0
- package/skills/x-twitter-scraper/references/types-mcp-search-tweets.md +17 -0
- package/skills/x-twitter-scraper/references/types-mcp-test-webhook.md +11 -0
- package/skills/x-twitter-scraper/references/types-monitors.md +20 -0
- package/skills/x-twitter-scraper/references/types-radar.md +40 -0
- package/skills/x-twitter-scraper/references/types-request-bodies.md +30 -0
- package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +15 -0
- package/skills/x-twitter-scraper/references/types-support.md +25 -0
- package/skills/x-twitter-scraper/references/types-trends.md +18 -0
- package/skills/x-twitter-scraper/references/types-tweet-drafts.md +20 -0
- package/skills/x-twitter-scraper/references/types-tweet-style-cache.md +50 -0
- package/skills/x-twitter-scraper/references/types-user-activity.md +35 -0
- package/skills/x-twitter-scraper/references/types-webhooks.md +38 -0
- package/skills/x-twitter-scraper/references/types-x-accounts.md +16 -0
- package/skills/x-twitter-scraper/references/types-x-api.md +69 -0
- package/skills/x-twitter-scraper/references/types-x-articles.md +21 -0
- package/skills/x-twitter-scraper/references/types-x-write.md +39 -0
- package/skills/x-twitter-scraper/references/types.md +48 -0
- package/skills/x-twitter-scraper/references/usage.md +50 -0
- package/skills/x-twitter-scraper/references/webhooks.md +243 -0
- package/skills/x-twitter-scraper/references/workflows.md +202 -0
- package/skills/x-twitter-scraper/skill-card.md +76 -0
- package/skills/x-twitter-scraper/skillspector-report.md +17 -0
- package/skills/xquik-social-research/LICENSE +21 -0
- package/skills/xquik-social-research/SKILL.md +79 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Xquik REST API Endpoints: Webhooks
|
|
2
|
+
|
|
3
|
+
### Create Webhook
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
POST /webhooks
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
**Body:**
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"url": "https://your-server.com/webhook",
|
|
13
|
+
"eventTypes": ["tweet.new", "tweet.reply"]
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Response** includes a `secret` field (shown only once). Store it for signature verification.
|
|
18
|
+
|
|
19
|
+
### List Webhooks
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
GET /webhooks
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Returns all webhooks (up to 200). Secret is never exposed in list responses.
|
|
26
|
+
|
|
27
|
+
### Update Webhook
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
PATCH /webhooks/{id}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Body:** `{ "url": "...", "eventTypes": [...], "isActive": true|false }` (all optional)
|
|
34
|
+
|
|
35
|
+
### Delete Webhook
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
delete request to `/webhooks/{id}`
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Permanently removes the webhook. All future deliveries are stopped.
|
|
42
|
+
|
|
43
|
+
### Test Webhook
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
POST /webhooks/{id}/test
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Sends a `webhook.test` event to the webhook endpoint, HMAC-signed with the webhook's secret. Returns success or failure status with HTTP response details.
|
|
50
|
+
|
|
51
|
+
**Payload delivered to your endpoint:**
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"eventType": "webhook.test",
|
|
55
|
+
"data": {
|
|
56
|
+
"message": "Test delivery from Xquik"
|
|
57
|
+
},
|
|
58
|
+
"timestamp": "2026-02-27T12:00:00.000Z"
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The delivery includes the `X-Xquik-Signature` header, identical to production deliveries.
|
|
63
|
+
|
|
64
|
+
Returns `400 webhook_inactive` if the webhook is disabled. Reactivate via `PATCH /webhooks/{id}` before testing.
|
|
65
|
+
|
|
66
|
+
### List Deliveries
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
GET /webhooks/{id}/deliveries
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
View delivery attempts and statuses for a webhook. Statuses: `pending`, `delivered`, `failed`, `exhausted`.
|
|
73
|
+
|
|
74
|
+
---
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Xquik REST API Endpoints: X Accounts (Connected)
|
|
2
|
+
|
|
3
|
+
Manage connected X accounts for confirmation-gated write actions.
|
|
4
|
+
|
|
5
|
+
**Connecting or re-authenticating an X account is done by the user in the Xquik dashboard**, not via this skill. The skill never handles X login material. The agent should direct the user to the dashboard account page when a new account needs to be connected or an existing session needs to be refreshed.
|
|
6
|
+
|
|
7
|
+
The OpenAPI surface includes dashboard-owned account connection routes:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
POST /x/accounts
|
|
11
|
+
POST /x/account-connection-challenges/{id}/submit
|
|
12
|
+
POST /x/accounts/{id}/reauth
|
|
13
|
+
POST /x/accounts/bulk-retry
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Do not call these from this skill. They are listed here only so the skill docs match the public API surface and keep the dashboard-only boundary explicit.
|
|
17
|
+
|
|
18
|
+
### List X Accounts
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
GET /x/accounts
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Returns all connected X accounts. Response: `{ accounts: [{ id, username, displayName, isActive, createdAt }] }`.
|
|
25
|
+
|
|
26
|
+
### Get X Account
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
GET /x/accounts/{id}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Returns `{ id, username, displayName, isActive, createdAt }`.
|
|
33
|
+
|
|
34
|
+
### Disconnect X Account
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
delete request to `/x/accounts/{id}`
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Permanently removes the account from Xquik. Returns `{ success: true }`. Before calling, confirm with the user.
|
|
41
|
+
|
|
42
|
+
---
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Xquik REST API Endpoints: X API (Direct Lookups)
|
|
2
|
+
|
|
3
|
+
Metered operations that require account access.
|
|
4
|
+
|
|
5
|
+
### Get Tweet
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
GET /x/tweets/{id}
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Returns full tweet with engagement metrics (likes, retweets, replies, quotes, views, bookmarks), author info (username, followers, verified status, profile picture), and optional attached media (photos/videos with URLs).
|
|
12
|
+
|
|
13
|
+
### Get Article
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
GET /x/articles/{tweetId}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Retrieve the full content of an X Article (long-form post) by numeric tweet ID. If the user gives an article URL, use the final status ID as `tweetId`. Returns title, body text with block-level formatting, cover image, inline images, and engagement metrics. Metered.
|
|
20
|
+
|
|
21
|
+
**Response:**
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"title": "Why AI Will Transform Everything",
|
|
25
|
+
"coverImage": "https://pbs.twimg.com/...",
|
|
26
|
+
"bodyHtml": "<p>The future of AI...</p>",
|
|
27
|
+
"likeCount": 5200,
|
|
28
|
+
"retweetCount": 890,
|
|
29
|
+
"replyCount": 245,
|
|
30
|
+
"viewCount": 150000,
|
|
31
|
+
"bookmarkCount": 1200,
|
|
32
|
+
"author": {
|
|
33
|
+
"id": "44196397",
|
|
34
|
+
"username": "elonmusk",
|
|
35
|
+
"name": "Elon Musk"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Search Tweets
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
GET /x/tweets/search?q={query}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Search using X syntax: keywords, `#hashtags`, `from:user`, `to:user`, `"exact phrases"`, `OR`, `-exclude`.
|
|
47
|
+
|
|
48
|
+
Returns tweet info with optional engagement metrics (likeCount, retweetCount, replyCount) and optional attached media. Some fields may be omitted if unavailable.
|
|
49
|
+
|
|
50
|
+
### Get User
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
GET /x/users/{id}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Returns profile info. `id` accepts either an X username without `@` or a numeric user ID. Fields `id`, `username`, `name` are always present. All other fields (`description`, `followers`, `following`, `verified`, `profilePicture`, `location`, `createdAt`, `statusesCount`) are optional and omitted when unavailable.
|
|
57
|
+
|
|
58
|
+
### Batch & Search Users
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
GET /x/users/batch?ids=44196397,783214
|
|
62
|
+
GET /x/users/search?q=founder
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Batch lookup accepts up to 100 comma-separated numeric user IDs. User search returns matching profiles and may include a pagination cursor.
|
|
66
|
+
|
|
67
|
+
### Check Follower
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
GET /x/followers/check?source={username}&target={username}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Returns `isFollowing` and `isFollowedBy` for both directions.
|
|
74
|
+
|
|
75
|
+
### Get User Tweets
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
GET /x/users/{id}/tweets
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Get a user's recent tweets by user ID. Metered per returned tweet.
|
|
82
|
+
|
|
83
|
+
### Batch Tweets
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
GET /x/tweets?ids=1893456789012345678,1893456789012345679
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Get multiple tweets by comma-separated tweet IDs. Maximum 100 IDs.
|
|
90
|
+
|
|
91
|
+
### Get User Likes
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
GET /x/users/{id}/likes
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Get tweets liked by a user. Metered per returned result.
|
|
98
|
+
|
|
99
|
+
### Get User Media
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
GET /x/users/{id}/media
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Get a user's media tweets (tweets containing photos/videos). Metered per returned result.
|
|
106
|
+
|
|
107
|
+
### Get Tweet Favoriters
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
GET /x/tweets/{id}/favoriters
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Get users who liked a tweet. Metered per returned result.
|
|
114
|
+
|
|
115
|
+
### Tweet Conversation & Engagement Lists
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
GET /x/tweets/{id}/quotes
|
|
119
|
+
GET /x/tweets/{id}/replies
|
|
120
|
+
GET /x/tweets/{id}/retweeters
|
|
121
|
+
GET /x/tweets/{id}/thread
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Read quote tweets, replies, retweeters, or the conversation thread for a tweet. These are paginated read operations.
|
|
125
|
+
|
|
126
|
+
### User Social Graph Reads
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
GET /x/users/{id}/followers
|
|
130
|
+
GET /x/users/{id}/following
|
|
131
|
+
GET /x/users/{id}/mentions
|
|
132
|
+
GET /x/users/{id}/verified-followers
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Read followers, following, mentions, and verified followers for a username or numeric user ID. These are paginated read operations.
|
|
136
|
+
|
|
137
|
+
### Get Mutual Followers
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
GET /x/users/{id}/followers-you-know
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Get mutual followers (followers you know). Metered per returned result.
|
|
144
|
+
|
|
145
|
+
### X Lists
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
GET /x/lists/{id}/followers
|
|
149
|
+
GET /x/lists/{id}/members
|
|
150
|
+
GET /x/lists/{id}/tweets
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Read list followers, members, or list timeline tweets by list ID.
|
|
154
|
+
|
|
155
|
+
### X Communities
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
GET /x/communities/search
|
|
159
|
+
GET /x/communities/tweets
|
|
160
|
+
GET /x/communities/{id}/info
|
|
161
|
+
GET /x/communities/{id}/members
|
|
162
|
+
GET /x/communities/{id}/moderators
|
|
163
|
+
GET /x/communities/{id}/tweets
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Search communities and read community metadata, members, moderators, or tweets. Community writes are listed under X Write and require confirmation.
|
|
167
|
+
|
|
168
|
+
### Get Bookmarks
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
GET /x/bookmarks
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Get bookmarked tweets. Requires a connected X account. Metered per returned result.
|
|
175
|
+
|
|
176
|
+
**Sensitive:** Returns private data. Confirm with user before calling.
|
|
177
|
+
|
|
178
|
+
### Get Bookmark Folders
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
GET /x/bookmarks/folders
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Get bookmark folders. Requires a connected X account. Metered.
|
|
185
|
+
|
|
186
|
+
### Get Notifications
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
GET /x/notifications
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Get notifications with type filter. Requires a connected X account. Metered per returned result.
|
|
193
|
+
|
|
194
|
+
**Sensitive:** Returns private data. Confirm with user before calling.
|
|
195
|
+
|
|
196
|
+
### Get Home Timeline
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
GET /x/timeline
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Get home timeline. Requires a connected X account. Metered per returned result.
|
|
203
|
+
|
|
204
|
+
**Sensitive:** Returns private data. Confirm with user before calling.
|
|
205
|
+
|
|
206
|
+
---
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Xquik REST API Endpoints: X Media (Download)
|
|
2
|
+
|
|
3
|
+
### Download Media
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
POST /x/media/download
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Download images, videos, and GIFs from tweets. Single or bulk (up to 50). Returns a shareable gallery URL.
|
|
10
|
+
|
|
11
|
+
**Body:** Provide either `tweetInput` (single tweet) or `tweetIds` (bulk). Exactly 1 is required.
|
|
12
|
+
|
|
13
|
+
| Field | Type | Description |
|
|
14
|
+
|-------|------|-------------|
|
|
15
|
+
| `tweetInput` | string | Tweet URL or numeric tweet ID for a single download. Accepts `x.com` and `twitter.com` URL formats |
|
|
16
|
+
| `tweetIds` | string[] | Array of tweet URLs or IDs for bulk download. Maximum 50 items. Returns a single combined gallery |
|
|
17
|
+
|
|
18
|
+
**Response (single):**
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"tweetId": "1893456789012345678",
|
|
22
|
+
"galleryUrl": "https://xquik.com/g/abc123",
|
|
23
|
+
"cacheHit": false
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Response (bulk):**
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"galleryUrl": "https://xquik.com/g/def456",
|
|
31
|
+
"totalTweets": 3,
|
|
32
|
+
"totalMedia": 7
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
First download is metered. Subsequent requests for the same tweet return cached URLs when `cacheHit: true`. All downloads are saved to shareable gallery pages under `https://xquik.com/g/{token}`.
|
|
37
|
+
|
|
38
|
+
Returns `400 no_media` if the tweet has no downloadable media. Returns `400 too_many_tweets` if bulk array exceeds 50 items.
|
|
39
|
+
|
|
40
|
+
---
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Xquik REST API Endpoints: X Write
|
|
2
|
+
|
|
3
|
+
Write actions performed through connected X accounts. All endpoints are metered. Every request requires an `account` field (username or account ID) identifying which connected account to use.
|
|
4
|
+
|
|
5
|
+
### Create Tweet
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
POST /x/tweets
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Body:**
|
|
12
|
+
|
|
13
|
+
| Field | Type | Required | Description |
|
|
14
|
+
|-------|------|----------|-------------|
|
|
15
|
+
| `account` | string | Yes | Connected X username or account ID |
|
|
16
|
+
| `text` | string | No | Tweet text (280 chars, or 25,000 if `is_note_tweet` is true). Required unless `media` is provided |
|
|
17
|
+
| `reply_to_tweet_id` | string | No | Tweet ID to reply to |
|
|
18
|
+
| `attachment_url` | string | No | URL to attach as a card |
|
|
19
|
+
| `community_id` | string | No | Community ID to post into |
|
|
20
|
+
| `is_note_tweet` | boolean | No | Long-form note tweet (up to 25,000 chars) |
|
|
21
|
+
| `media` | string[] | No | Public image URLs to attach (max 4). `POST /x/media` returns `mediaUrl` values for this field |
|
|
22
|
+
|
|
23
|
+
**Response:** `{ tweetId, success: true }`
|
|
24
|
+
|
|
25
|
+
**Errors:** `502 x_write_failed`
|
|
26
|
+
|
|
27
|
+
### Delete Tweet
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
delete request to `/x/tweets/{id}`
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Body:** `{ "account": "username" }`
|
|
34
|
+
|
|
35
|
+
**Response:** `{ success: true }`
|
|
36
|
+
|
|
37
|
+
### Like Tweet
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
POST /x/tweets/{id}/like
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Body:** `{ "account": "username" }`
|
|
44
|
+
|
|
45
|
+
### Unlike Tweet
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
delete request to `/x/tweets/{id}/like`
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Body:** `{ "account": "username" }`
|
|
52
|
+
|
|
53
|
+
### Retweet
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
POST /x/tweets/{id}/retweet
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Body:** `{ "account": "username" }`
|
|
60
|
+
|
|
61
|
+
### Unretweet
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
delete request to `/x/tweets/{id}/retweet`
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Body:** `{ "account": "username" }`
|
|
68
|
+
|
|
69
|
+
### Follow User
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
POST /x/users/{id}/follow
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Body:** `{ "account": "username" }`
|
|
76
|
+
|
|
77
|
+
**Errors:** `502 x_write_failed`
|
|
78
|
+
|
|
79
|
+
### Unfollow User
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
delete request to `/x/users/{id}/follow`
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Body:** `{ "account": "username" }`
|
|
86
|
+
|
|
87
|
+
### Remove Follower
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
POST /x/users/{id}/remove-follower
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Remove a user from your followers without blocking them.
|
|
94
|
+
|
|
95
|
+
**Body:** `{ "account": "username" }`
|
|
96
|
+
|
|
97
|
+
**Usage:** Metered per call.
|
|
98
|
+
|
|
99
|
+
### Send DM
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
POST /x/dm/{userId}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Body:**
|
|
106
|
+
|
|
107
|
+
| Field | Type | Required | Description |
|
|
108
|
+
|-------|------|----------|-------------|
|
|
109
|
+
| `account` | string | Yes | Connected X username or account ID |
|
|
110
|
+
| `text` | string | Yes | Message text |
|
|
111
|
+
| `media_ids` | string[] | No | Media IDs to attach |
|
|
112
|
+
| `reply_to_message_id` | string | No | Message ID to reply to |
|
|
113
|
+
|
|
114
|
+
### Get DM History
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
GET /x/dm/{userId}/history
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Get DM conversation history with a user. Requires a connected X account. Metered per returned result.
|
|
121
|
+
|
|
122
|
+
**Sensitive:** Returns private DM conversations. Confirm with user before calling. Forward to other tools only after explicit approval.
|
|
123
|
+
|
|
124
|
+
### Update Profile
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
PATCH /x/profile
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Body:** `{ "account": "username", "name": "...", "description": "...", "location": "...", "url": "..." }` (account required, others optional)
|
|
131
|
+
|
|
132
|
+
### Update Avatar
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
PATCH /x/profile/avatar
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Update profile avatar. Max 700 KB, GIF/JPEG/PNG. Metered.
|
|
139
|
+
|
|
140
|
+
**Body:** FormData with `account` (required) and `file` (required, max 700 KB).
|
|
141
|
+
|
|
142
|
+
### Update Banner
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
PATCH /x/profile/banner
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Update profile banner. Max 2 MB, GIF/JPEG/PNG. Metered.
|
|
149
|
+
|
|
150
|
+
**Body:** FormData with `account` (required) and `file` (required, max 2 MB).
|
|
151
|
+
|
|
152
|
+
### Upload Media
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
POST /x/media
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Body:** FormData with `account` (required), `file` (required), and `is_long_video` (optional boolean). Alternatively, JSON body with `account` (required) and `url` (required, direct media URL) for URL-based upload.
|
|
159
|
+
|
|
160
|
+
**Response:** Returns `mediaId`, `mediaUrl`, and `success`. Pass `mediaUrl` in the `media` array when creating a tweet.
|
|
161
|
+
|
|
162
|
+
### Create Community
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
POST /x/communities
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Body:** `{ "account": "username", "name": "...", "description": "..." }` (all required)
|
|
169
|
+
|
|
170
|
+
### Delete Community
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
delete request to `/x/communities/{id}`
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Body:** `{ "account": "username", "community_name": "..." }` (name required for confirmation)
|
|
177
|
+
|
|
178
|
+
### Join Community
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
POST /x/communities/{id}/join
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Body:** `{ "account": "username" }`
|
|
185
|
+
|
|
186
|
+
**Errors:** `409 already_member`
|
|
187
|
+
|
|
188
|
+
### Leave Community
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
delete request to `/x/communities/{id}/join`
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Body:** `{ "account": "username" }`
|
|
195
|
+
|
|
196
|
+
### Get Write Action Status
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
GET /x/write-actions/{id}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Check a pending write action by the ID returned from an earlier write response.
|
|
203
|
+
|
|
204
|
+
---
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Xquik REST API Endpoints
|
|
2
|
+
|
|
3
|
+
Routing index for the REST API reference. Load only the section file needed for the user task instead of loading the full endpoint catalog.
|
|
4
|
+
|
|
5
|
+
Base URL: `https://xquik.com/api/v1`
|
|
6
|
+
|
|
7
|
+
All requests require the `x-api-key` header unless the section says session auth only. All responses are JSON. HTTPS only.
|
|
8
|
+
|
|
9
|
+
Plan and credit changes are dashboard-only. Agents may read usage state with `GET /credits`, but must not start plan or credit changes.
|
|
10
|
+
|
|
11
|
+
| Need | Reference |
|
|
12
|
+
|---|---|
|
|
13
|
+
| API Keys | [api-keys.md](api-endpoints-api-keys.md) |
|
|
14
|
+
| Monitors | [monitors.md](api-endpoints-monitors.md) |
|
|
15
|
+
| Events | [events.md](api-endpoints-events.md) |
|
|
16
|
+
| Webhooks | [webhooks.md](api-endpoints-webhooks.md) |
|
|
17
|
+
| Draws | [draws.md](api-endpoints-draws.md) |
|
|
18
|
+
| Extractions | [extractions.md](api-endpoints-extractions.md) |
|
|
19
|
+
| X API (Direct Lookups) | [x-api.md](api-endpoints-x-api.md) |
|
|
20
|
+
| X Media (Download) | [x-media.md](api-endpoints-x-media.md) |
|
|
21
|
+
| Trends | [trends.md](api-endpoints-trends.md) |
|
|
22
|
+
| Radar | [radar.md](api-endpoints-radar.md) |
|
|
23
|
+
| Compose | [compose.md](api-endpoints-compose.md) |
|
|
24
|
+
| Drafts | [drafts.md](api-endpoints-drafts.md) |
|
|
25
|
+
| Tweet Style Cache | [tweet-style-cache.md](api-endpoints-tweet-style-cache.md) |
|
|
26
|
+
| X Accounts (Connected) | [x-accounts.md](api-endpoints-x-accounts.md) |
|
|
27
|
+
| X Write | [x-write.md](api-endpoints-x-write.md) |
|
|
28
|
+
| Credits | [credits.md](api-endpoints-credits.md) |
|
|
29
|
+
| Support | [support.md](api-endpoints-support.md) |
|
|
30
|
+
| Error Codes | [error-codes.md](api-endpoints-error-codes.md) |
|
|
@@ -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
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
Metered per participant entry.
|