Documentation Index
Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
Use the CLI for shell workflows, cron jobs, local debugging, JSON output, and quick API calls without writing application code.
Install
go install github.com/Xquik-dev/x-twitter-scraper-cli/cmd/x-twitter-scraper@latest
Make sure your Go bin directory is on PATH:
export PATH="$PATH:$(go env GOPATH)/bin"
Authenticate
export X_TWITTER_SCRAPER_API_KEY="xq_YOUR_KEY_HERE"
You can also pass --api-key per command or use X_TWITTER_SCRAPER_BEARER_TOKEN for OAuth 2.1 access tokens.
Basic Example
x-twitter-scraper x:tweets search \
--q from:elonmusk \
--limit 10 \
--format json
Use --help at any level:
x-twitter-scraper x:tweets search --help
Error Handling
The CLI writes API errors to stderr and exits non-zero for failed requests. Use --format-error json when scripts need machine-readable errors.
x-twitter-scraper x:users get \
--username not-a-real-user \
--format json \
--format-error json
Retryable API responses follow the same semantics as the REST API. See error handling and rate limits.
Commands that call paginated endpoints include pagination fields in their JSON output. Keep the response body when your script needs to request the next page with endpoint cursor parameters.
Webhooks & References