X Twitter Scraper
Use this skill when a user wants to integrate Xquik into an app, script, data pipeline, or AI agent workflow for X API and Twitter scraper tasks.
Use Cases
- Search tweets, fetch tweet details, read timelines, and download media.
- Look up users, check relationships, and export followers or following.
- Start extraction jobs for replies, reposts, quotes, likes, lists, communities, articles, and search results.
- Create account monitors and verify HMAC-signed webhook events.
- Add TypeScript, Python, Go, Java, Kotlin, C#, Ruby, PHP, CLI, or Terraform clients.
- Run hosted tweet and audience collection through Apify Actors.
- Connect agent runtimes through the Xquik MCP server.
- Install TweetClaw when the workflow belongs inside OpenClaw and needs plugin-managed approvals for X account actions.
Source Checks
Before writing code, inspect the current Xquik source material:
Do not invent endpoint names, request fields, response fields, scopes, pricing, limits, or package names. Read the relevant SDK README and API reference page first.
Implementation Flow
- Identify the workflow: search, lookup, extraction, monitor, webhook, media, write action, billing, or MCP.
- Choose the integration surface: generated SDK for application code, REST for custom clients, Apify Actors for hosted collection, MCP for agents, TweetClaw for OpenClaw plugin workflows, or webhooks for event delivery.
- Confirm authentication requirements from the docs and use environment variables for API keys.
- Use typed request and response models when an SDK exists for the user's language.
- Add retries and pagination according to the SDK or API docs.
- Add explicit user confirmation before write actions, payment flows, or long-running monitoring.
- Keep webhook verification server-side and compare HMAC signatures before processing events.
- Return structured data to the caller instead of scraping generated UI output.
SDK Pattern
When application code is involved, match the SDK to the user's project language:
- Inspect project files and package manifests to identify the language and framework.
- Open the SDK index, then read the matching SDK README before choosing install commands, package names, imports, or client methods.
- Prefer the official SDK for the detected language when one exists.
- Use REST only when the project language has no suitable official SDK or the user asks for a custom client.
- Keep API keys in environment variables or the project's existing secret manager.
Use project-native typed request and response models. Keep network calls in server-side code unless the SDK docs explicitly support browser use.
Apify Actor Pattern
Use the Apify path when a workflow needs hosted runs, datasets, schedules, or Apify-native orchestration.
| Need |
Actor |
REST ID |
| Tweets, search, timelines, lists, articles, replies, quotes, threads, retweeters, or best-effort favoriters |
xquik/x-tweet-scraper |
xquik~x-tweet-scraper |
| Followers, following, verified followers, list members, list subscribers, or community members |
xquik/x-follower-scraper |
xquik~x-follower-scraper |
Authenticate with an Apify API token. Keep it in APIFY_API_TOKEN. Fetch the current input schema from the relevant Actor page before selecting fields.
Start a bounded tweet run:
curl --fail --silent --show-error --request POST \
"https://api.apify.com/v2/actors/xquik~x-tweet-scraper/runs" \
--header "Authorization: Bearer ${APIFY_API_TOKEN}" \
--header "Content-Type: application/json" \
--data '{"twitterHandles":["apify"],"outputVariant":"rich","maxItems":25}'
Start a bounded follower run:
curl --fail --silent --show-error --request POST \
"https://api.apify.com/v2/actors/xquik~x-follower-scraper/runs" \
--header "Authorization: Bearer ${APIFY_API_TOKEN}" \
--header "Content-Type: application/json" \
--data '{"twitterHandles":["apify"],"relation":"followers","outputMode":"compact","maxItems":50}'
Record the returned run ID. Poll the Actor run with a bounded retry loop. Stop on SUCCEEDED, FAILED, ABORTED, or TIMED-OUT. On success, read defaultDatasetId, then fetch its dataset items.
Treat maxItems as the cap for the entire tweet run, including runs with several search terms. Keep follower target metadata when attribution matters. Treat rows with resultType: "diagnostic" as status information, not scraped records. Inspect any run-report row before trusting an incomplete result.
Review each Actor's live Apify pricing box before every paid run. Apify platform usage may apply separately. Start with a small maxItems value and ask before raising the cap.
Webhook Pattern
When adding webhook handlers:
- Read the documented signing header name and payload format.
- Verify the HMAC signature before parsing business logic.
- Reject missing, malformed, or mismatched signatures.
- Make handlers idempotent because webhook delivery can retry.
- Store only the fields needed for the product workflow.
MCP Pattern
Use the MCP server when the user wants an agent to explore or call Xquik tools directly. Keep application code on REST or SDK clients when the app needs stable typed contracts, tests, or internal abstractions.
OpenClaw Plugin Pattern
Use TweetClaw when the user is working in OpenClaw, wants installable plugin metadata, or needs an approval-reviewed path for account-changing X actions. Keep application services on REST or SDK clients when the project needs typed contracts, server-side abstractions, or long-lived backend jobs outside OpenClaw.
Before suggesting install commands or tool names, read the TweetClaw README and package metadata. Do not assume the published npm version matches source HEAD.
Treat create, reply, quote, like, bookmark, retweet, follow, delete, media, and monitor actions as approval-worthy unless the current TweetClaw docs state a narrower policy. Keep read-only tweet search, reply search, profile lookup, follower export, and evidence collection low risk, while still respecting rate limits and account authorization.
Safety And Accuracy
- Keep language neutral and technical.
- State that Xquik is a third-party X data and automation API.
- Do not claim affiliation with X Corp.
- Do not bypass access controls or platform policies.
- Do not expose API keys, webhook secrets, account cookies, tokens, or raw signatures.
- Do not hard-code credentials in examples or tests.
- Never put Apify API tokens in URL query parameters.
- Do not document private infrastructure details.
- Prefer official Xquik docs, SDK READMEs, and the OpenAPI spec over memory.
Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.
1---2name: x-twitter-scraper3description: Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.4---5
6# X Twitter Scraper
7
8Use this skill when a user wants to integrate Xquik into an app, script, data pipeline, or AI agent workflow for X API and Twitter scraper tasks.
9
10## Use Cases
11
12- Search tweets, fetch tweet details, read timelines, and download media.
13- Look up users, check relationships, and export followers or following.
14- Start extraction jobs for replies, reposts, quotes, likes, lists, communities, articles, and search results.
15- Create account monitors and verify HMAC-signed webhook events.
16- Add TypeScript, Python, Go, Java, Kotlin, C#, Ruby, PHP, CLI, or Terraform clients.
17- Run hosted tweet and audience collection through Apify Actors.
18- Connect agent runtimes through the Xquik MCP server.
19- Install TweetClaw when the workflow belongs inside OpenClaw and needs plugin-managed approvals for X account actions.
20
21## Source Checks
22
23Before writing code, inspect the current Xquik source material:
24
25- REST API docs: https://docs.xquik.com/api-reference/overview
26- SDK index: https://docs.xquik.com/sdks
27- OpenAPI spec: https://xquik.com/openapi.json
28- MCP server docs: https://docs.xquik.com/mcp/overview
29- Skill repo: https://github.com/Xquik-dev/x-twitter-scraper
30- TweetClaw OpenClaw plugin: https://github.com/Xquik-dev/tweetclaw
31- TweetClaw npm registry metadata: https://registry.npmjs.org/@xquik%2Ftweetclaw
32- X Tweet Scraper Actor: https://apify.com/xquik/x-tweet-scraper
33- X Follower Scraper Actor: https://apify.com/xquik/x-follower-scraper
34
35Do not invent endpoint names, request fields, response fields, scopes, pricing, limits, or package names. Read the relevant SDK README and API reference page first.
36
37## Implementation Flow
38
391. Identify the workflow: search, lookup, extraction, monitor, webhook, media, write action, billing, or MCP.
402. Choose the integration surface: generated SDK for application code, REST for custom clients, Apify Actors for hosted collection, MCP for agents, TweetClaw for OpenClaw plugin workflows, or webhooks for event delivery.
413. Confirm authentication requirements from the docs and use environment variables for API keys.
424. Use typed request and response models when an SDK exists for the user's language.
435. Add retries and pagination according to the SDK or API docs.
446. Add explicit user confirmation before write actions, payment flows, or long-running monitoring.
457. Keep webhook verification server-side and compare HMAC signatures before processing events.
468. Return structured data to the caller instead of scraping generated UI output.
47
48## SDK Pattern
49
50When application code is involved, match the SDK to the user's project language:
51
52- Inspect project files and package manifests to identify the language and framework.
53- Open the SDK index, then read the matching SDK README before choosing install commands, package names, imports, or client methods.
54- Prefer the official SDK for the detected language when one exists.
55- Use REST only when the project language has no suitable official SDK or the user asks for a custom client.
56- Keep API keys in environment variables or the project's existing secret manager.
57
58Use project-native typed request and response models. Keep network calls in server-side code unless the SDK docs explicitly support browser use.
59
60## Apify Actor Pattern
61
62Use the Apify path when a workflow needs hosted runs, datasets, schedules, or Apify-native orchestration.
63
64| Need | Actor | REST ID |
65|---|---|---|
66| Tweets, search, timelines, lists, articles, replies, quotes, threads, retweeters, or best-effort favoriters | `xquik/x-tweet-scraper` | `xquik~x-tweet-scraper` |
67| Followers, following, verified followers, list members, list subscribers, or community members | `xquik/x-follower-scraper` | `xquik~x-follower-scraper` |
68
69Authenticate with an Apify API token. Keep it in `APIFY_API_TOKEN`. Fetch the current input schema from the relevant Actor page before selecting fields.
70
71Start a bounded tweet run:
72
73```bash
74curl --fail --silent --show-error --request POST \
75 "https://api.apify.com/v2/actors/xquik~x-tweet-scraper/runs" \
76 --header "Authorization: Bearer ${APIFY_API_TOKEN}" \
77 --header "Content-Type: application/json" \
78 --data '{"twitterHandles":["apify"],"outputVariant":"rich","maxItems":25}'
79```
80
81Start a bounded follower run:
82
83```bash
84curl --fail --silent --show-error --request POST \
85 "https://api.apify.com/v2/actors/xquik~x-follower-scraper/runs" \
86 --header "Authorization: Bearer ${APIFY_API_TOKEN}" \
87 --header "Content-Type: application/json" \
88 --data '{"twitterHandles":["apify"],"relation":"followers","outputMode":"compact","maxItems":50}'
89```
90
91Record the returned run ID. Poll the Actor run with a bounded retry loop. Stop on `SUCCEEDED`, `FAILED`, `ABORTED`, or `TIMED-OUT`. On success, read `defaultDatasetId`, then fetch its dataset items.
92
93Treat `maxItems` as the cap for the entire tweet run, including runs with several search terms. Keep follower target metadata when attribution matters. Treat rows with `resultType: "diagnostic"` as status information, not scraped records. Inspect any run-report row before trusting an incomplete result.
94
95Review each Actor's live Apify pricing box before every paid run. Apify platform usage may apply separately. Start with a small `maxItems` value and ask before raising the cap.
96
97## Webhook Pattern
98
99When adding webhook handlers:
100
101- Read the documented signing header name and payload format.
102- Verify the HMAC signature before parsing business logic.
103- Reject missing, malformed, or mismatched signatures.
104- Make handlers idempotent because webhook delivery can retry.
105- Store only the fields needed for the product workflow.
106
107## MCP Pattern
108
109Use the MCP server when the user wants an agent to explore or call Xquik tools directly. Keep application code on REST or SDK clients when the app needs stable typed contracts, tests, or internal abstractions.
110
111## OpenClaw Plugin Pattern
112
113Use TweetClaw when the user is working in OpenClaw, wants installable plugin metadata, or needs an approval-reviewed path for account-changing X actions. Keep application services on REST or SDK clients when the project needs typed contracts, server-side abstractions, or long-lived backend jobs outside OpenClaw.
114
115Before suggesting install commands or tool names, read the TweetClaw README and package metadata. Do not assume the published npm version matches source HEAD.
116
117Treat create, reply, quote, like, bookmark, retweet, follow, delete, media, and monitor actions as approval-worthy unless the current TweetClaw docs state a narrower policy. Keep read-only tweet search, reply search, profile lookup, follower export, and evidence collection low risk, while still respecting rate limits and account authorization.
118
119## Safety And Accuracy
120
121- Keep language neutral and technical.
122- State that Xquik is a third-party X data and automation API.
123- Do not claim affiliation with X Corp.
124- Do not bypass access controls or platform policies.
125- Do not expose API keys, webhook secrets, account cookies, tokens, or raw signatures.
126- Do not hard-code credentials in examples or tests.
127- Never put Apify API tokens in URL query parameters.
128- Do not document private infrastructure details.
129- Prefer official Xquik docs, SDK READMEs, and the OpenAPI spec over memory.
130
131Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.