Watch Framer build a tweet ticker with Xquik, from 6:07.
This CLI calls the Xquik API.
Use this Twitter CLI by Xquik to search tweets & export followers as JSON. It runs in a terminal or a script. Public reads need no X (Twitter) developer account.
Xquik is the world's fastest and cheapest X (Twitter) scraper service with the most complete X (Twitter) data. Most other Apify Actors charge before filtering or deduplication. Xquik charges only for delivered, unique, filter-matching results and never pads rows. Xquik is independent and not affiliated with X Corp.
The Xquik REST API read 45 tweets per second on 2026-10-15. That cost $0.15 per 1,000. The fastest of 4 rival Actors read 12.5 per second. The cheapest cost $0.173 per 1,000. Compare each run. Most rival Actors charge before they filter or dedup. Xquik charges only for delivered, unique, filter-matching results.
Install Node.js 18 or later, then install the npm package.
npm install --global x-twitter-scraper-cliOr run the CLI once without installing it.
npx x-twitter-scraper-cli --helpnpm installs only the build for your platform. Nothing downloads when the CLI runs.
Create an API key in the Xquik dashboard and export it.
export X_TWITTER_SCRAPER_API_KEY="your-api-key"This command returns 10 recent X (Twitter) posts from 1 account.
x-twitter-scraper x:tweets search \
--q from:elonmusk \
--limit 10Next, read the CLI guide, REST API reference or search operators.
- 74,000+ downloads of Xquik's X (Twitter) API packages across 6 registries (source)
- 35.8 s p99 REST server read time over 7 days, failures included (source)
- This repo meets the OpenSSF Best Practices passing criteria (source)
Checked on 2026-11-30. See each number with its date & source on xquik.com/benchmarks or as JSON.
Install Go 1.21 or later. Go downloads the toolchain this CLI needs.
go install 'github.com/Xquik-dev/x-twitter-scraper-cli/cmd/x-twitter-scraper@latest'Go writes the binary to $GOBIN or $(go env GOPATH)/bin.
If the command is unavailable, add that directory to PATH.
export PATH="$PATH:$(go env GOPATH)/bin"Each GitHub release has archives for macOS, Linux & Windows.
Linux users can also pick a .deb, .rpm, .apk or Arch Linux package.
Compare each download with the release's checksums file.
From a cloned repository, run ./scripts/run args... instead.
Each command follows the same shape.
x-twitter-scraper [resource] <command> [flags...]Run a command with --help before you add flags.
| Task | Start command |
|---|---|
| Search tweets | x-twitter-scraper x:tweets search --help |
| Get a user's posts | x-twitter-scraper x:users retrieve-tweets --help |
| Scrape Twitter followers | x-twitter-scraper x:users retrieve-followers --help |
| Scrape following accounts | x-twitter-scraper x:users retrieve-following --help |
| Read a home timeline | x-twitter-scraper x get-home-timeline --help |
| Export a large dataset | x-twitter-scraper extractions estimate-cost --help |
| Monitor an account | x-twitter-scraper monitors create --help |
| Post a tweet or reply | x-twitter-scraper x:tweets create --help |
| Environment variable | Description | Required | Default value |
|---|---|---|---|
X_TWITTER_SCRAPER_API_KEY |
Xquik API key | no | null |
X_TWITTER_SCRAPER_BEARER_TOKEN |
OAuth 2.1 access token | no | null |
--api-keysets the Xquik API key.--bearer-tokensets an OAuth 2.1 access token.--helpshows command-line usage.--debugadds HTTP request & response details to logs.--versionor-vshows the CLI version.--base-urlsends requests to another API base URL.--formatsets the output format.--format-errorsets the error format.--transformfilters output with GJSON syntax.--transform-errorfilters errors with GJSON syntax.--raw-outputor-rprints a string result without JSON quotes.
Credential flags also read their matching environment variables. Debug logs may contain private response data. Do not share them.
Prefix a path with @ to send its contents.
x-twitter-scraper <command> --arg @abe.jpgUse file references inside JSON or YAML.
x-twitter-scraper <command> --arg '{image: "@abe.jpg"}'
# The same input as YAML.
x-twitter-scraper <command> <<YAML
arg:
image: "@abe.jpg"
YAMLEscape a leading @ when sending a literal value.
x-twitter-scraper <command> --username '\@abe'JSON endpoints detect text and binary files.
Use @file:// for text, @data:// for base64, and 3 slashes for absolute paths.
x-twitter-scraper <command> --arg @data://file.txtRun bin/check-local before you open a pull request.
It posts the result as the xquik-local-checks commit status.
Maintainers publish releases from main with bin/release-local.
bin/release-local --dry-run builds every release asset and publishes nothing.
No. Public reads need only an Xquik API key. Private reads & account actions need a connected X (Twitter) account.
No. Xquik runs its own REST API. This CLI calls that API, not the official X API.
- X (Twitter) scraper API & X (Twitter) MCP server with REST, MCP & Skill setup.
- X (Twitter) API SDKs for TypeScript, Python, Go & Java.
- X (Twitter) API SDKs for Ruby, Kotlin, C# & PHP.
- Twitter advanced search operators with tested examples.
- X (Twitter) agent plugins for OpenClaw & Hermes Agent.
- X (Twitter) integrations for n8n, Prefect, Haystack & Paperclip.
- X (Twitter) integrations for Terraform, Convex, Supabase & Strapi.
- X (Twitter) MCP for AI agents, VS Code & Raycast.
- Xquik X API & Twitter scraper.
- X (Twitter) API documentation and its source.
Xquik is an independent third-party service. Not affiliated with X Corp. "Twitter" and "X" are trademarks of X Corp.
