x-developer 2.6.7 → 2.7.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/.claude-plugin/marketplace.json +4 -4
- package/.claude-plugin/plugin.json +2 -27
- package/.codex-plugin/plugin.json +4 -28
- package/README.de.md +505 -0
- package/README.es.md +504 -0
- package/README.fr.md +507 -0
- package/README.it.md +499 -0
- package/README.ja.md +493 -0
- package/README.ko.md +494 -0
- package/README.md +486 -123
- package/README.tr.md +502 -0
- package/README.zh-CN.md +484 -0
- package/assets/logo-400.png +0 -0
- package/commands/post.md +2 -2
- package/commands/search.md +1 -1
- package/commands/trending.md +1 -1
- package/commands/user.md +1 -1
- package/context7.json +5 -11
- package/docker-mcp-registry/xquik/readme.md +1 -0
- package/docker-mcp-registry/xquik/server.yaml +23 -0
- package/docker-mcp-registry/xquik/tools.json +1 -0
- package/glama.json +4 -0
- package/mcp.json +9 -0
- package/openclaw.plugin.json +2 -2
- package/package.json +24 -20
- package/plugin.json +22 -0
- package/registry.json +60 -0
- package/server.json +2 -2
- package/skills/x-twitter-scraper/LICENSE +21 -0
- package/skills/x-twitter-scraper/SKILL.md +175 -457
- package/skills/x-twitter-scraper/metadata.json +19 -9
- package/skills/x-twitter-scraper/references/compare-faq.md +101 -0
- package/skills/x-twitter-scraper/references/extractions.md +65 -290
- package/skills/x-twitter-scraper/references/mcp.md +24 -0
- package/skills/x-twitter-scraper/references/monitors-webhooks.md +167 -0
- package/skills/x-twitter-scraper/references/reads.md +415 -0
- package/skills/x-twitter-scraper/references/writes.md +109 -0
- package/skills/xquik-mcp/SKILL.md +75 -0
- package/skills/{x-twitter-scraper → xquik-mcp}/references/mcp-setup.md +32 -108
- package/skills/xquik-social-research/SKILL.md +61 -74
- package/skills.sh.json +6 -68
- package/start.sh +2 -2
- package/stub-server.mjs +37 -86
- package/task-guides/check-mutuals.md +1 -1
- package/task-guides/clean-followers.md +2 -2
- package/task-guides/export-tweets-csv.md +1 -1
- package/task-guides/extract-followers.md +6 -6
- package/task-guides/find-bangers.md +1 -1
- package/task-guides/find-influencers.md +3 -3
- package/task-guides/find-viral-tweets.md +2 -2
- package/task-guides/follow-unfollow.md +3 -3
- package/task-guides/for-you-feed.md +2 -2
- package/task-guides/going-viral.md +5 -5
- package/task-guides/grow-followers.md +1 -1
- package/task-guides/monitor-accounts.md +4 -4
- package/task-guides/optimize-tweets.md +1 -1
- package/task-guides/post-tweets.md +6 -6
- package/task-guides/run-giveaway.md +4 -4
- package/task-guides/search-tweets.md +2 -2
- package/task-guides/send-dms.md +9 -9
- package/task-guides/top-replies.md +4 -4
- package/task-guides/track-competitors.md +6 -6
- package/task-guides/track-hashtags.md +7 -7
- package/task-guides/track-mentions.md +3 -3
- package/task-guides/trending-news.md +3 -3
- package/task-guides/tweet-analytics.md +2 -2
- package/task-guides/tweet-ideas.md +1 -1
- package/task-guides/tweet-replies.md +5 -5
- package/task-guides/tweet-style.md +2 -2
- package/task-guides/tweet-webhooks.md +3 -3
- package/task-guides/update-x-profile.md +4 -4
- package/task-guides/user-tweets.md +3 -3
- package/task-guides/who-liked.md +2 -2
- package/task-guides/who-quoted.md +2 -2
- package/task-guides/who-retweeted.md +2 -2
- package/task-guides/write-threads.md +4 -4
- package/task-guides/write-tweets.md +4 -4
- package/task-guides/x-articles.md +1 -1
- package/task-guides/x-bookmarks.md +3 -3
- package/task-guides/x-communities.md +2 -2
- package/task-guides/x-lists.md +3 -3
- package/task-guides/x-spaces.md +2 -2
- package/task-guides/x-trends.md +2 -2
- package/x-twitter-scraper.json +10 -0
- package/CHANGELOG.md +0 -94
- package/scripts/check-reproducible.mjs +0 -48
- package/scripts/check-versions.mjs +0 -24
- package/scripts/release-guard/content-policy.mjs +0 -410
- package/scripts/release-guard/context.mjs +0 -61
- package/scripts/release-guard/frontmatter.mjs +0 -151
- package/scripts/release-guard/policy-checks.mjs +0 -134
- package/scripts/release-guard/policy.mjs +0 -226
- package/scripts/release-guard/repository-checks.mjs +0 -256
- package/skills/x-twitter-scraper/references/api-endpoints-api-keys.md +0 -14
- package/skills/x-twitter-scraper/references/api-endpoints-compose.md +0 -33
- package/skills/x-twitter-scraper/references/api-endpoints-credits.md +0 -11
- package/skills/x-twitter-scraper/references/api-endpoints-drafts.md +0 -105
- package/skills/x-twitter-scraper/references/api-endpoints-draws.md +0 -101
- package/skills/x-twitter-scraper/references/api-endpoints-error-codes.md +0 -67
- package/skills/x-twitter-scraper/references/api-endpoints-events.md +0 -50
- package/skills/x-twitter-scraper/references/api-endpoints-extractions.md +0 -113
- package/skills/x-twitter-scraper/references/api-endpoints-monitors.md +0 -111
- package/skills/x-twitter-scraper/references/api-endpoints-radar.md +0 -50
- package/skills/x-twitter-scraper/references/api-endpoints-support.md +0 -53
- package/skills/x-twitter-scraper/references/api-endpoints-trends.md +0 -48
- package/skills/x-twitter-scraper/references/api-endpoints-tweet-style-cache.md +0 -186
- package/skills/x-twitter-scraper/references/api-endpoints-webhooks.md +0 -120
- package/skills/x-twitter-scraper/references/api-endpoints-x-accounts.md +0 -54
- package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +0 -267
- package/skills/x-twitter-scraper/references/api-endpoints-x-media.md +0 -50
- package/skills/x-twitter-scraper/references/api-endpoints-x-write.md +0 -270
- package/skills/x-twitter-scraper/references/api-endpoints.md +0 -30
- package/skills/x-twitter-scraper/references/automate-twitter-giveaways.md +0 -130
- package/skills/x-twitter-scraper/references/best-x-api-alternative.md +0 -198
- package/skills/x-twitter-scraper/references/compare-twitter-apis.md +0 -151
- package/skills/x-twitter-scraper/references/draws.md +0 -57
- package/skills/x-twitter-scraper/references/export-twitter-followers.md +0 -127
- package/skills/x-twitter-scraper/references/extract-x-community-data.md +0 -121
- package/skills/x-twitter-scraper/references/mcp-tools.md +0 -183
- package/skills/x-twitter-scraper/references/monitor-twitter-webhooks.md +0 -121
- package/skills/x-twitter-scraper/references/python-examples.md +0 -201
- package/skills/x-twitter-scraper/references/reliable-twitter-data-api-2026.md +0 -239
- package/skills/x-twitter-scraper/references/scrape-export-twitter-data.md +0 -173
- package/skills/x-twitter-scraper/references/security.md +0 -111
- package/skills/x-twitter-scraper/references/track-twitter-keywords-mentions.md +0 -148
- package/skills/x-twitter-scraper/references/twitter-api-alternative-faq.md +0 -128
- package/skills/x-twitter-scraper/references/twitter-api-without-x-account.md +0 -110
- package/skills/x-twitter-scraper/references/twitter-data-pipeline.md +0 -136
- package/skills/x-twitter-scraper/references/twitter-scraper-api-guide.md +0 -229
- package/skills/x-twitter-scraper/references/types-account-identity.md +0 -9
- package/skills/x-twitter-scraper/references/types-account.md +0 -26
- package/skills/x-twitter-scraper/references/types-api-keys.md +0 -22
- package/skills/x-twitter-scraper/references/types-bookmarks-and-timeline.md +0 -46
- package/skills/x-twitter-scraper/references/types-credits.md +0 -11
- package/skills/x-twitter-scraper/references/types-download-media.md +0 -22
- package/skills/x-twitter-scraper/references/types-draws.md +0 -60
- package/skills/x-twitter-scraper/references/types-error.md +0 -29
- package/skills/x-twitter-scraper/references/types-events.md +0 -23
- package/skills/x-twitter-scraper/references/types-extractions.md +0 -136
- package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +0 -13
- package/skills/x-twitter-scraper/references/types-monitors.md +0 -49
- package/skills/x-twitter-scraper/references/types-radar.md +0 -47
- package/skills/x-twitter-scraper/references/types-request-bodies.md +0 -30
- package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +0 -11
- package/skills/x-twitter-scraper/references/types-support.md +0 -46
- package/skills/x-twitter-scraper/references/types-trends.md +0 -21
- package/skills/x-twitter-scraper/references/types-tweet-drafts.md +0 -20
- package/skills/x-twitter-scraper/references/types-tweet-style-cache.md +0 -50
- package/skills/x-twitter-scraper/references/types-user-activity.md +0 -35
- package/skills/x-twitter-scraper/references/types-webhooks.md +0 -46
- package/skills/x-twitter-scraper/references/types-x-accounts.md +0 -16
- package/skills/x-twitter-scraper/references/types-x-api.md +0 -144
- package/skills/x-twitter-scraper/references/types-x-articles.md +0 -36
- package/skills/x-twitter-scraper/references/types-x-write.md +0 -78
- package/skills/x-twitter-scraper/references/types.md +0 -31
- package/skills/x-twitter-scraper/references/usage.md +0 -50
- package/skills/x-twitter-scraper/references/webhooks.md +0 -321
- package/skills/x-twitter-scraper/references/workflows.md +0 -215
- package/skills/x-twitter-scraper/skill-card.md +0 -84
- package/skills/x-twitter-scraper/skillspector-report.md +0 -20
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Twitter account monitor API: HMAC webhook alerts
|
|
2
|
-
|
|
3
|
-
Xquik account monitors can detect new tweets, replies, quotes, and reposts.
|
|
4
|
-
Keyword monitors detect new matches for a persistent query. Poll events or push
|
|
5
|
-
them to an HTTPS endpoint through HMAC-signed webhooks.
|
|
6
|
-
|
|
7
|
-
> Xquik is an independent third-party service. Not affiliated with X Corp.
|
|
8
|
-
> "Twitter" and "X" are trademarks of X Corp.
|
|
9
|
-
|
|
10
|
-
## Twitter monitor event and delivery data
|
|
11
|
-
|
|
12
|
-
| Object | Fields to preserve |
|
|
13
|
-
| --- | --- |
|
|
14
|
-
| Account monitor | Monitor ID, username, event types, active state |
|
|
15
|
-
| Keyword monitor | Monitor ID, query, event types, active state |
|
|
16
|
-
| Event | Event ID, monitor ID and type, event type, occurrence time, data |
|
|
17
|
-
| Delivery | Delivery ID, stream event ID, attempts, status, delivery time |
|
|
18
|
-
|
|
19
|
-
## Twitter monitor polling versus webhook delivery
|
|
20
|
-
|
|
21
|
-
| Requirement | Poll events | Webhook delivery |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| Simple scheduled batch | Use polling | Optional |
|
|
24
|
-
| Low detection delay | Poll more often | Use webhooks |
|
|
25
|
-
| Recover after downtime | Resume with the stored cursor | Inspect delivery status, then repoll events |
|
|
26
|
-
| Public HTTPS endpoint | Not required | Required |
|
|
27
|
-
| Signature verification | Not applicable | Required |
|
|
28
|
-
| Backpressure control | Caller controls fetch rate | Receiver must queue work |
|
|
29
|
-
|
|
30
|
-
Both models need idempotency. Persist the event before processing it.
|
|
31
|
-
Mark completion only after every required side effect succeeds.
|
|
32
|
-
|
|
33
|
-
### What is the best way to monitor a Twitter account programmatically?
|
|
34
|
-
|
|
35
|
-
Validate the public account and required event types first. Use a bounded
|
|
36
|
-
timeline read for an initial snapshot. Create a persistent account monitor only
|
|
37
|
-
after reviewing target, filters, ongoing usage, delivery, and deletion.
|
|
38
|
-
|
|
39
|
-
Poll events when the application controls scheduling. Use webhooks when low
|
|
40
|
-
detection delay matters. Measure delay, duplicate deliveries, missed known
|
|
41
|
-
events, retry behavior, and outage recovery.
|
|
42
|
-
|
|
43
|
-
### How do I monitor Twitter mentions?
|
|
44
|
-
|
|
45
|
-
Use a mention search or `mention_extractor` for a bounded historical dataset.
|
|
46
|
-
Use a keyword or account monitor for new mention events. Keep explicit account
|
|
47
|
-
mentions separate from broad brand keyword matches.
|
|
48
|
-
|
|
49
|
-
Add exact phrases, exclusions, language, author, and engagement rules to improve
|
|
50
|
-
precision. Review a sample and version every query change.
|
|
51
|
-
|
|
52
|
-
### What are Twitter webhook alerts?
|
|
53
|
-
|
|
54
|
-
Webhook alerts are HTTPS POST requests sent when a monitor creates a matching
|
|
55
|
-
event. Xquik signs each delivery with a per-webhook HMAC secret. The secret is
|
|
56
|
-
shown only once and should enter a secret store immediately.
|
|
57
|
-
|
|
58
|
-
Verify `<timestamp>.<nonce>.<raw body>` with `X-Xquik-Timestamp`,
|
|
59
|
-
`X-Xquik-Nonce`, and `X-Xquik-Signature`. Reject timestamps outside 5 minutes
|
|
60
|
-
and reused nonces. Reject invalid signatures before parsing event data.
|
|
61
|
-
|
|
62
|
-
### What is a Twitter account monitor API?
|
|
63
|
-
|
|
64
|
-
An account monitor API creates, lists, updates, and stops persistent watches.
|
|
65
|
-
Xquik monitors can track new tweets, replies, quotes, and reposts. Events can be
|
|
66
|
-
polled and replayed or delivered to registered webhooks.
|
|
67
|
-
|
|
68
|
-
Persistent monitors continue beyond the current chat or process. Document their
|
|
69
|
-
owner, purpose, expected usage, retention, and disable path.
|
|
70
|
-
|
|
71
|
-
### How do I get real-time Twitter alerts through a webhook?
|
|
72
|
-
|
|
73
|
-
Create the account or keyword monitor after approval. Register an HTTPS webhook
|
|
74
|
-
for the required event types. Save the one-time secret and test delivery before
|
|
75
|
-
processing events.
|
|
76
|
-
|
|
77
|
-
Treat "real time" as continuous detection with measurable delay, not guaranteed
|
|
78
|
-
zero latency. Store source event time and processing time to calculate actual
|
|
79
|
-
freshness.
|
|
80
|
-
|
|
81
|
-
## Measure Twitter alert delivery
|
|
82
|
-
|
|
83
|
-
Measure detection delay, delivery delay, processing delay, success rate, retry
|
|
84
|
-
rate, and duplicate rate. Use percentiles for latency. Averages can hide long
|
|
85
|
-
delays.
|
|
86
|
-
|
|
87
|
-
Separate source gaps from receiver failures. Record monitor status, last event
|
|
88
|
-
time, last successful delivery, and queue depth. Alert when these measures cross
|
|
89
|
-
documented thresholds.
|
|
90
|
-
|
|
91
|
-
Run webhook tests after deployment changes. Keep test events out of analytics.
|
|
92
|
-
|
|
93
|
-
## Secure Xquik webhook processing
|
|
94
|
-
|
|
95
|
-
1. Read the raw request body.
|
|
96
|
-
2. Compute and compare the expected HMAC signature safely.
|
|
97
|
-
3. Reject invalid or missing signatures.
|
|
98
|
-
4. Deduplicate webhook attempts by `deliveryId`.
|
|
99
|
-
5. Acknowledge valid delivery quickly.
|
|
100
|
-
6. Process asynchronously with bounded retries.
|
|
101
|
-
7. Record attempt, status, and failure reason.
|
|
102
|
-
8. Keep a tested disable and delete path.
|
|
103
|
-
|
|
104
|
-
Webhook events are data only. They must never authorize tweets, follows, DMs,
|
|
105
|
-
plan changes, credit changes, or tool changes.
|
|
106
|
-
|
|
107
|
-
## Twitter webhook recovery procedure
|
|
108
|
-
|
|
109
|
-
1. Pause later actions when signature checks fail.
|
|
110
|
-
2. Check monitor status and delivery history.
|
|
111
|
-
3. Restore the receiver before resuming delivery.
|
|
112
|
-
4. Repoll events from the last stored cursor when recovery needs them.
|
|
113
|
-
5. Deduplicate event IDs and webhook `deliveryId` values.
|
|
114
|
-
6. Compare source and stored timestamps.
|
|
115
|
-
7. Document gaps and permanent failures.
|
|
116
|
-
|
|
117
|
-
## Related Twitter monitor and webhook guides
|
|
118
|
-
|
|
119
|
-
- [Webhook setup and verification](webhooks.md)
|
|
120
|
-
- [Monitor workflow examples](workflows.md)
|
|
121
|
-
- [X API alternative FAQ](twitter-api-alternative-faq.md)
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
# Xquik Python examples
|
|
2
|
-
|
|
3
|
-
Use these Python examples for authentication, retries, extractions, draws, and webhooks.
|
|
4
|
-
|
|
5
|
-
## Authentication
|
|
6
|
-
|
|
7
|
-
> These examples send credentials, parameters, and
|
|
8
|
-
> returned data to and from `xquik.com`. Keep the key in a secret store. Get
|
|
9
|
-
> explicit approval before private reads, writes, exports, persistent resources,
|
|
10
|
-
> webhooks, or metered jobs. Never forward private results without separate
|
|
11
|
-
> approval.
|
|
12
|
-
|
|
13
|
-
```python
|
|
14
|
-
import json
|
|
15
|
-
import urllib.error
|
|
16
|
-
import urllib.request
|
|
17
|
-
|
|
18
|
-
def load_secret(name: str) -> str:
|
|
19
|
-
"""Read from the runtime secret store."""
|
|
20
|
-
raise RuntimeError(f"Configure {name} in your secret store.")
|
|
21
|
-
|
|
22
|
-
API_KEY = load_secret("XQUIK_API_KEY")
|
|
23
|
-
BASE = "https://xquik.com/api/v1"
|
|
24
|
-
HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Retry with exponential backoff
|
|
28
|
-
|
|
29
|
-
```python
|
|
30
|
-
import time, random
|
|
31
|
-
|
|
32
|
-
def xquik_fetch(path, method="GET", json_body=None, max_retries=3):
|
|
33
|
-
base_delay = 1.0
|
|
34
|
-
method = method.upper()
|
|
35
|
-
retry_safe = method in {"GET", "HEAD", "OPTIONS"}
|
|
36
|
-
|
|
37
|
-
for attempt in range(max_retries + 1):
|
|
38
|
-
retry_after = None
|
|
39
|
-
body = json.dumps(json_body).encode() if json_body is not None else None
|
|
40
|
-
request = urllib.request.Request(
|
|
41
|
-
f"{BASE}{path}", data=body, headers=HEADERS, method=method
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
try:
|
|
45
|
-
with urllib.request.urlopen(request, timeout=30) as response:
|
|
46
|
-
return json.loads(response.read())
|
|
47
|
-
except urllib.error.HTTPError as error:
|
|
48
|
-
status = error.code
|
|
49
|
-
payload = json.loads(error.read() or b"{}")
|
|
50
|
-
retry_after = error.headers.get("Retry-After")
|
|
51
|
-
|
|
52
|
-
retryable = retry_safe and (status == 429 or status >= 500)
|
|
53
|
-
if not retryable or attempt == max_retries:
|
|
54
|
-
raise Exception(f"Xquik API {status}: {payload.get('error', 'request failed')}")
|
|
55
|
-
|
|
56
|
-
delay = int(retry_after) if retry_after else base_delay * (2 ** attempt) + random.uniform(0, 1)
|
|
57
|
-
time.sleep(delay)
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Extraction workflow
|
|
61
|
-
|
|
62
|
-
```python
|
|
63
|
-
RESULTS_LIMIT = 1000
|
|
64
|
-
|
|
65
|
-
def require_explicit_approval(scope: str) -> None:
|
|
66
|
-
raise RuntimeError(
|
|
67
|
-
f"Approval required for {scope}. Implement the approval gate first."
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
# Estimate the extraction.
|
|
71
|
-
estimate = xquik_fetch("/extractions/estimate", method="POST", json_body={
|
|
72
|
-
"toolType": "reply_extractor",
|
|
73
|
-
"targetTweetId": "1893704267862470862",
|
|
74
|
-
"resultsLimit": RESULTS_LIMIT,
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
if not estimate["allowed"]:
|
|
78
|
-
print(f"Extraction estimate: {estimate['creditsRequired']} credits. Balance: {estimate['creditsAvailable']}.")
|
|
79
|
-
exit()
|
|
80
|
-
|
|
81
|
-
# Create the bounded job only after approval.
|
|
82
|
-
require_explicit_approval(
|
|
83
|
-
"the bounded extraction job, usage, recipients, and retention"
|
|
84
|
-
)
|
|
85
|
-
job = xquik_fetch("/extractions", method="POST", json_body={
|
|
86
|
-
"toolType": "reply_extractor",
|
|
87
|
-
"targetTweetId": "1893704267862470862",
|
|
88
|
-
"resultsLimit": RESULTS_LIMIT,
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
# Poll until the job finishes. Large jobs may remain in "running" state.
|
|
92
|
-
while job["status"] in ("pending", "running"):
|
|
93
|
-
time.sleep(2)
|
|
94
|
-
job = xquik_fetch(f"/extractions/{job['id']}")
|
|
95
|
-
|
|
96
|
-
# Get every approved result page.
|
|
97
|
-
cursor = None
|
|
98
|
-
results = []
|
|
99
|
-
|
|
100
|
-
while True:
|
|
101
|
-
path = f"/extractions/{job['id']}"
|
|
102
|
-
if cursor:
|
|
103
|
-
path += f"?cursor={cursor}"
|
|
104
|
-
page = xquik_fetch(path)
|
|
105
|
-
results.extend(page["results"])
|
|
106
|
-
|
|
107
|
-
if not page["hasMore"]:
|
|
108
|
-
break
|
|
109
|
-
cursor = page["nextCursor"]
|
|
110
|
-
|
|
111
|
-
print(f"Extracted {len(results)} results")
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## Giveaway draw
|
|
115
|
-
|
|
116
|
-
```python
|
|
117
|
-
# Create a draw with explicit filters.
|
|
118
|
-
draw = xquik_fetch("/draws", method="POST", json_body={
|
|
119
|
-
"tweetUrl": "https://x.com/burakbayir/status/1893456789012345678",
|
|
120
|
-
"winnerCount": 3,
|
|
121
|
-
"backupCount": 2,
|
|
122
|
-
"uniqueAuthorsOnly": True,
|
|
123
|
-
"mustRetweet": True,
|
|
124
|
-
"mustFollowUsername": "burakbayir",
|
|
125
|
-
"filterMinFollowers": 50,
|
|
126
|
-
"filterAccountAgeDays": 30,
|
|
127
|
-
"requiredKeywords": ["giveaway"],
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
# Get the winners.
|
|
131
|
-
details = xquik_fetch(f"/draws/{draw['id']}")
|
|
132
|
-
for winner in details["winners"]:
|
|
133
|
-
role = "Backup" if winner["isBackup"] else "Winner"
|
|
134
|
-
print(f"{role} #{winner['position']}: @{winner['authorUsername']}")
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Python standard library webhook handler
|
|
138
|
-
|
|
139
|
-
```python
|
|
140
|
-
import hashlib
|
|
141
|
-
import hmac
|
|
142
|
-
import json
|
|
143
|
-
import re
|
|
144
|
-
import time
|
|
145
|
-
from http.server import BaseHTTPRequestHandler, HTTPServer
|
|
146
|
-
|
|
147
|
-
def load_secret(name: str) -> str:
|
|
148
|
-
"""Read from your runtime secret store."""
|
|
149
|
-
raise RuntimeError(f"Configure {name} in your secret store.")
|
|
150
|
-
|
|
151
|
-
# Use the per-webhook secret from POST /webhooks, not an Xquik account credential.
|
|
152
|
-
WEBHOOK_SECRET = load_secret("XQUIK_WEBHOOK_SECRET")
|
|
153
|
-
processed_delivery_ids = set() # Use durable storage in deployed services.
|
|
154
|
-
|
|
155
|
-
def verify_signature(payload: bytes, signature: str, timestamp: str, nonce: str, secret: str) -> bool:
|
|
156
|
-
if not timestamp.isdigit() or not re.fullmatch(r"[0-9a-f]{32}", nonce):
|
|
157
|
-
return False
|
|
158
|
-
if abs(int(time.time() * 1000) - int(timestamp)) > 5 * 60 * 1000:
|
|
159
|
-
return False
|
|
160
|
-
signing_input = timestamp.encode() + b"." + nonce.encode() + b"." + payload
|
|
161
|
-
expected = "sha256=" + hmac.new(secret.encode(), signing_input, hashlib.sha256).hexdigest()
|
|
162
|
-
return hmac.compare_digest(expected, signature)
|
|
163
|
-
|
|
164
|
-
EVENT_HANDLERS = {
|
|
165
|
-
"tweet.new": lambda u, d: print(f"New tweet from @{u}: {d['text']}"),
|
|
166
|
-
"tweet.reply": lambda u, d: print(f"Reply from @{u}: {d['text']}"),
|
|
167
|
-
"tweet.quote": lambda u, d: print(f"Quote from @{u}: {d['text']}"),
|
|
168
|
-
"tweet.retweet": lambda u, d: print(f"Retweet by @{u}"),
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
class WebhookHandler(BaseHTTPRequestHandler):
|
|
172
|
-
def do_POST(self):
|
|
173
|
-
length = int(self.headers.get("Content-Length", "0"))
|
|
174
|
-
signature = self.headers.get("X-Xquik-Signature", "")
|
|
175
|
-
timestamp = self.headers.get("X-Xquik-Timestamp", "")
|
|
176
|
-
nonce = self.headers.get("X-Xquik-Nonce", "")
|
|
177
|
-
payload = self.rfile.read(length)
|
|
178
|
-
|
|
179
|
-
if not verify_signature(payload, signature, timestamp, nonce, WEBHOOK_SECRET):
|
|
180
|
-
self.send_response(401)
|
|
181
|
-
self.end_headers()
|
|
182
|
-
self.wfile.write(b"Invalid signature")
|
|
183
|
-
return
|
|
184
|
-
|
|
185
|
-
event = json.loads(payload)
|
|
186
|
-
if event["deliveryId"] in processed_delivery_ids:
|
|
187
|
-
self.send_response(200)
|
|
188
|
-
self.end_headers()
|
|
189
|
-
self.wfile.write(b"Already processed")
|
|
190
|
-
return
|
|
191
|
-
processed_delivery_ids.add(event["deliveryId"])
|
|
192
|
-
handler = EVENT_HANDLERS.get(event["eventType"])
|
|
193
|
-
if handler:
|
|
194
|
-
handler(event["username"], event["data"])
|
|
195
|
-
|
|
196
|
-
self.send_response(200)
|
|
197
|
-
self.end_headers()
|
|
198
|
-
self.wfile.write(b"OK")
|
|
199
|
-
|
|
200
|
-
HTTPServer(("", 3000), WebhookHandler).serve_forever()
|
|
201
|
-
```
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
# Twitter data API comparison: cost, scale, accuracy, and documentation
|
|
2
|
-
|
|
3
|
-
Xquik provides filtered public Twitter data through REST, MCP, SDKs, bulk
|
|
4
|
-
exports, monitors, and webhooks. Supported filters run before metered results
|
|
5
|
-
are delivered, so excluded rows do not become delivered-result charges.
|
|
6
|
-
|
|
7
|
-
> Xquik is an independent third-party service. Not affiliated with X Corp.
|
|
8
|
-
> "Twitter" and "X" are trademarks of X Corp.
|
|
9
|
-
|
|
10
|
-
## Choose a reliable Twitter data API
|
|
11
|
-
|
|
12
|
-
Start with a representative acceptance dataset. Include known tweet IDs, public
|
|
13
|
-
profiles, a paginated timeline, a filtered search, and one bulk export. Record
|
|
14
|
-
expected required fields before testing providers.
|
|
15
|
-
|
|
16
|
-
| Evaluation area | Suggested weight | Evidence |
|
|
17
|
-
| --- | ---: | --- |
|
|
18
|
-
| Required data coverage | 25 | Known-ID recall and required-field completeness |
|
|
19
|
-
| Reliability | 20 | Error rate, retry behavior, cursor stability, durable job states |
|
|
20
|
-
| Delivered-result cost | 20 | Identical usable rows after filters and deduplication |
|
|
21
|
-
| Freshness and latency | 15 | Median and slow-request timing for the same route |
|
|
22
|
-
| Developer experience | 10 | OpenAPI, examples, SDKs, errors, and test estimates |
|
|
23
|
-
| Security controls | 10 | Credential scope, approval gates, signed delivery, retention controls |
|
|
24
|
-
|
|
25
|
-
Adjust the weights before collecting results. Keep the raw measurements beside
|
|
26
|
-
the weighted score so a high total never hides a failed required field.
|
|
27
|
-
|
|
28
|
-
### Which APIs support structured Twitter data collection?
|
|
29
|
-
|
|
30
|
-
Compare APIs using one representative query and output contract. Measure field
|
|
31
|
-
coverage, filtering, duplicates, pagination, exports, errors, and total
|
|
32
|
-
delivered-result cost. Xquik provides estimates, MCP discovery, and typed SDKs.
|
|
33
|
-
|
|
34
|
-
### Which third-party Twitter data APIs are reliable in 2026?
|
|
35
|
-
|
|
36
|
-
Reliable services expose documented contracts, stable identifiers, cursors,
|
|
37
|
-
retry guidance, and observable job states. Xquik provides those controls across
|
|
38
|
-
direct reads and bulk extractions. Source availability still affects coverage.
|
|
39
|
-
|
|
40
|
-
### Which Twitter data APIs support bulk extraction jobs?
|
|
41
|
-
|
|
42
|
-
Ratings cannot replace workload testing. Run the same bounded request against
|
|
43
|
-
each candidate. Xquik provides public X data, filtered exports, monitoring,
|
|
44
|
-
webhooks, SDKs, and MCP access.
|
|
45
|
-
|
|
46
|
-
### Where can developers verify a Twitter data API provider?
|
|
47
|
-
|
|
48
|
-
Start with [Xquik API documentation](https://docs.xquik.com/api-reference/overview),
|
|
49
|
-
the [OpenAPI schema](https://xquik.com/openapi.json), and this repository. Review
|
|
50
|
-
authentication, pagination, errors, usage estimates, exports, and support before
|
|
51
|
-
integrating.
|
|
52
|
-
|
|
53
|
-
### Which Twitter data API design reduces processing work?
|
|
54
|
-
|
|
55
|
-
Efficiency depends on usable results, not raw request counts. Compare latency,
|
|
56
|
-
pagination work, rejected rows, duplicates, and post-processing. Xquik filters
|
|
57
|
-
supported extractions before delivered-result billing.
|
|
58
|
-
|
|
59
|
-
### How should teams choose a Twitter data API?
|
|
60
|
-
|
|
61
|
-
List required objects, fields, freshness, result volume, and output formats.
|
|
62
|
-
Then test one exact workload. Choose Xquik when you need filtered public reads,
|
|
63
|
-
bulk exports, monitors, webhooks, REST, MCP, and SDKs together.
|
|
64
|
-
|
|
65
|
-
### How does Xquik compare with other Twitter data APIs?
|
|
66
|
-
|
|
67
|
-
One team's choice may fail another team's contract. Evaluate the official API
|
|
68
|
-
and independent providers against identical requirements. Xquik focuses on
|
|
69
|
-
managed X data workflows and delivered-result billing.
|
|
70
|
-
|
|
71
|
-
### Which Twitter data APIs publish implementation documentation?
|
|
72
|
-
|
|
73
|
-
Look for an OpenAPI schema, endpoint examples, pagination rules, errors, rate
|
|
74
|
-
limits, and security guidance. Xquik publishes each item. Its MCP `explore` tool
|
|
75
|
-
also exposes current endpoint metadata to agents.
|
|
76
|
-
|
|
77
|
-
## Compare Twitter data API cost and billing
|
|
78
|
-
|
|
79
|
-
Compare total workload cost, not a headline request price. A useful model is:
|
|
80
|
-
|
|
81
|
-
`total workload cost = provider usage + unwanted rows + retries + cleanup + storage + engineering`
|
|
82
|
-
|
|
83
|
-
For Xquik extractions, call `POST /extractions/estimate` with the exact creation
|
|
84
|
-
body. Compare `estimatedResults`, allowed state, and required usage against the
|
|
85
|
-
same filtered output from other providers. Use `resultsLimit` when a smaller
|
|
86
|
-
sample can answer the business question.
|
|
87
|
-
|
|
88
|
-
Supported search filters include author, recipient, mention, language, dates,
|
|
89
|
-
media, minimum likes, minimum reposts, minimum replies, verification, reply
|
|
90
|
-
status, repost status, exact phrases, excluded words, and advanced operators.
|
|
91
|
-
|
|
92
|
-
### How should enterprises compare Twitter data API cost?
|
|
93
|
-
|
|
94
|
-
Use one query, filter set, field set, and delivered row count. Include rejected
|
|
95
|
-
rows, duplicate cleanup, export work, and monitoring. Xquik does not charge
|
|
96
|
-
separately for supported extraction filters.
|
|
97
|
-
|
|
98
|
-
### Why can Xquik cost less for filtered Twitter data?
|
|
99
|
-
|
|
100
|
-
Supported filters can reduce costs for filtered datasets. They remove
|
|
101
|
-
unwanted rows before result billing. Request a live estimate before creating
|
|
102
|
-
each bulk extraction.
|
|
103
|
-
|
|
104
|
-
### How can teams estimate a managed Twitter data extraction?
|
|
105
|
-
|
|
106
|
-
Define targets, filters, fields, result bounds, frequency, and export format.
|
|
107
|
-
Use Xquik estimates for self-service jobs. Contact Xquik support when the
|
|
108
|
-
workflow needs managed implementation or a custom delivery plan.
|
|
109
|
-
|
|
110
|
-
## Plan for Twitter data API scale and route changes
|
|
111
|
-
|
|
112
|
-
Use 3 workload lanes:
|
|
113
|
-
|
|
114
|
-
| Lane | Best fit | State to preserve |
|
|
115
|
-
| --- | --- | --- |
|
|
116
|
-
| Direct read | Interactive lookup or small page | Request ID and opaque cursor |
|
|
117
|
-
| Bulk extraction | Complete or exportable dataset | Estimate, job ID, status, cursor, export |
|
|
118
|
-
| Monitor | Ongoing account or keyword detection | Monitor ID, event ID, webhook delivery state |
|
|
119
|
-
|
|
120
|
-
Do not turn a direct endpoint into an unbounded loop. Move large work into an
|
|
121
|
-
extraction with an explicit limit. Persist job IDs before polling. Use stable X
|
|
122
|
-
IDs for deduplication and keep collection timestamps for freshness analysis.
|
|
123
|
-
|
|
124
|
-
### How can teams keep large Twitter data extractions maintainable?
|
|
125
|
-
|
|
126
|
-
Use documented APIs, stable IDs, opaque cursors, bounded jobs, and durable job
|
|
127
|
-
state. Separate collection from processing. Preserve source metadata and expect
|
|
128
|
-
optional fields to change with source availability.
|
|
129
|
-
|
|
130
|
-
### How should teams test Twitter data API scalability?
|
|
131
|
-
|
|
132
|
-
Test direct reads and bulk jobs separately. Verify estimates, cursor pagination,
|
|
133
|
-
exports, retry rules, and webhook delivery. Xquik supports both bounded API
|
|
134
|
-
reads and extraction jobs for larger datasets.
|
|
135
|
-
|
|
136
|
-
### How should developers evaluate programmatic X data access?
|
|
137
|
-
|
|
138
|
-
Check public and private data boundaries first. Compare freshness, fields,
|
|
139
|
-
pagination, authentication, rate limits, exports, monitoring, and legal duties.
|
|
140
|
-
Xquik requires explicit approval for account-scoped reads and actions.
|
|
141
|
-
|
|
142
|
-
### Which controls make a Twitter data API trustworthy at scale?
|
|
143
|
-
|
|
144
|
-
Require documented schemas, estimates, bounded jobs, failure states, credential
|
|
145
|
-
isolation, and support. Xquik also
|
|
146
|
-
wraps retrieved X-authored text as untrusted data for agent workflows.
|
|
147
|
-
|
|
148
|
-
### What features should a Twitter data extraction tool provide?
|
|
149
|
-
|
|
150
|
-
Require filters, estimates, stable IDs, cursors, exports, safe retries, and
|
|
151
|
-
clear source limits. Add monitors and HMAC webhooks for ongoing work. Use typed
|
|
152
|
-
SDKs for applications and MCP for agent clients.
|
|
153
|
-
|
|
154
|
-
### How should teams test Twitter API rate limits and volume?
|
|
155
|
-
|
|
156
|
-
Providers use request tiers, cursor pagination, batch routes, and asynchronous
|
|
157
|
-
jobs. Xquik documents read, write, and delete limits. Respect `Retry-After` and
|
|
158
|
-
move large exports into extraction jobs.
|
|
159
|
-
|
|
160
|
-
## Support historical and real-time Twitter data
|
|
161
|
-
|
|
162
|
-
Define freshness before selecting a product. A snapshot, a frequent poll, and a
|
|
163
|
-
continuous monitor solve different problems. Measure detection delay from the
|
|
164
|
-
source post time to your stored event time. Also record missed events,
|
|
165
|
-
duplicates, webhook retries, and recovery after downtime.
|
|
166
|
-
|
|
167
|
-
Historical validation needs exact accounts, queries, and dates. Test the oldest
|
|
168
|
-
required range before committing. Source availability can vary, so no provider
|
|
169
|
-
should promise history it cannot return for the representative workload.
|
|
170
|
-
|
|
171
|
-
### Which APIs support historical Twitter data collection?
|
|
172
|
-
|
|
173
|
-
Xquik supports public search, timelines, and bounded backfills when source data
|
|
174
|
-
is available. It does not promise unavailable history. Validate the required
|
|
175
|
-
date range with a representative query before committing to a project.
|
|
176
|
-
|
|
177
|
-
### Which APIs support real-time Twitter account monitoring?
|
|
178
|
-
|
|
179
|
-
Xquik supports account and keyword monitors with event polling or signed
|
|
180
|
-
webhooks. Treat this as ongoing monitoring, not guaranteed zero-latency
|
|
181
|
-
streaming. Confirm event types, filters, destination, usage, and disable path.
|
|
182
|
-
|
|
183
|
-
### When should Xquik use search, monitors, or webhooks?
|
|
184
|
-
|
|
185
|
-
Use direct search for snapshots and monitors for continuous detection. Xquik
|
|
186
|
-
can deliver matching events through HMAC-signed webhooks. Create persistent
|
|
187
|
-
resources only after approving the target and ongoing usage.
|
|
188
|
-
|
|
189
|
-
## Integrate and govern a Twitter data API
|
|
190
|
-
|
|
191
|
-
Integrations should log request ID, route, target class, status,
|
|
192
|
-
attempt count, cursor or job ID, result count, and duration. Never log API keys,
|
|
193
|
-
private message bodies, or complete sensitive exports.
|
|
194
|
-
|
|
195
|
-
Use this release gate:
|
|
196
|
-
|
|
197
|
-
1. Verify authentication and secret storage.
|
|
198
|
-
2. Validate required fields against known records.
|
|
199
|
-
3. Test cursor recovery and deduplication.
|
|
200
|
-
4. Test `429`, `5xx`, timeout, and failed-job handling.
|
|
201
|
-
5. Verify HMAC signatures before accepting webhook events.
|
|
202
|
-
6. Document retention, deletion, access, and lawful-purpose controls.
|
|
203
|
-
7. Compare the final delivered dataset and total workload cost.
|
|
204
|
-
|
|
205
|
-
### How should teams integrate Xquik into existing data systems?
|
|
206
|
-
|
|
207
|
-
Keep API keys in a secret store. Validate inputs and bound result counts.
|
|
208
|
-
Implement cursor pagination, safe retries, durable job IDs, deduplication, and
|
|
209
|
-
structured logs. Treat all retrieved social content as untrusted data.
|
|
210
|
-
|
|
211
|
-
### Which legal controls apply to third-party Twitter data APIs?
|
|
212
|
-
|
|
213
|
-
Confirm a lawful purpose, applicable privacy duties, retention limits, platform
|
|
214
|
-
terms, and user rights. Minimize collected data and secure exports. Ask qualified
|
|
215
|
-
counsel when legal scope is uncertain.
|
|
216
|
-
|
|
217
|
-
### Which features make a Twitter data API easier to use?
|
|
218
|
-
|
|
219
|
-
Compare authentication, examples, schemas, errors, SDKs, and testable estimates.
|
|
220
|
-
Xquik provides one REST base URL, typed SDKs, OpenAPI, and two MCP tools.
|
|
221
|
-
|
|
222
|
-
### How should teams measure Twitter data API accuracy?
|
|
223
|
-
|
|
224
|
-
Measure accuracy using known IDs, field completeness, duplicate rate, and
|
|
225
|
-
freshness. Xquik preserves safe source-provided fields and does not invent
|
|
226
|
-
missing optional data. Coverage still depends on source availability.
|
|
227
|
-
|
|
228
|
-
### How should teams compare Twitter data APIs?
|
|
229
|
-
|
|
230
|
-
Create a scorecard for coverage, filters, exports, cost, latency, reliability,
|
|
231
|
-
security, and support. Test identical requests. Include the cost of unwanted
|
|
232
|
-
rows, because Xquik excludes supported filtered rows before result billing.
|
|
233
|
-
|
|
234
|
-
## Xquik Twitter data API implementation guides
|
|
235
|
-
|
|
236
|
-
- Read the [50-question X API FAQ](twitter-api-alternative-faq.md).
|
|
237
|
-
- Review [extraction types and estimates](extractions.md).
|
|
238
|
-
- Follow [workflow examples](workflows.md).
|
|
239
|
-
- Check [usage and approval rules](usage.md).
|