### Install CLI with Go Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Installs the CLI using Go. Ensure you have Go version 1.22 or later installed. The binary will be placed in your Go bin directory. ```sh go install 'github.com/Xquik-dev/x-twitter-scraper-cli/cmd/x-twitter-scraper@latest' ``` -------------------------------- ### Install X Twitter Scraper CLI Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Install the CLI using Go 1.22+. Ensure the Go bin directory is in your PATH and verify the installation. ```sh go install 'github.com/Xquik-dev/x-twitter-scraper-cli/cmd/x-twitter-scraper@latest' # Ensure the Go bin directory is in PATH export PATH="$PATH:$(go env GOPATH)/bin" # Verify x-twitter-scraper --version ``` -------------------------------- ### extractions run Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Starts a new bulk extraction job for X data. ```APIDOC ## extractions run — Start a new extraction job ### Description Starts a new bulk extraction job to fetch large datasets (e.g., tweets from search, user timelines) and returns paginated results. ### Usage ```sh # Tweet search extraction x-twitter-scraper extractions run \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --tool-type "tweet_search_extractor" \ --search-query "AI from:openai" \ --exact-phrase "large language model" \ --exclude-words "spam bot" # Target a specific user's timeline x-twitter-scraper extractions run \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --tool-type "user_timeline_extractor" \ --target-username "elonmusk" ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. - `--tool-type` (string) - Required - The type of extraction job (e.g., "tweet_search_extractor", "user_timeline_extractor"). - `--search-query` (string) - Optional - The search query for tweet extraction. - `--exact-phrase` (string) - Optional - A specific phrase to match in tweet search. - `--exclude-words` (string) - Optional - Words to exclude from search results. - `--target-username` (string) - Optional - The username for user timeline extraction. ``` -------------------------------- ### Example CLI Search Command Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Demonstrates a typical command to search for tweets. This command requires an API key and specifies the search query and a limit. ```sh x-twitter-scraper x:tweets search \ --api-key 'My API Key' \ --q from:elonmusk \ --limit 10 ``` -------------------------------- ### Get a Monitor by ID Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves details of a specific monitor using its unique ID. ```sh x-twitter-scraper monitors retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "monitor_abc123" ``` -------------------------------- ### X Communities Retrieve Info Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get community details. ```APIDOC ## x:communities retrieve-info — Get community details ### Description Retrieves detailed information about a specific X (Twitter) Community by its ID. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--id` (string) - Required - The ID of the community. ``` -------------------------------- ### Styles Retrieve Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get a cached style profile by ID. ```APIDOC ## styles retrieve — Get a cached style profile by ID ### Description Retrieves a specific cached style profile using its ID. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--id` (string) - Required - The ID of the style profile to retrieve. ``` -------------------------------- ### Account Retrieve Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get API account info. ```APIDOC ## account retrieve — Get API account info ### Description Retrieves information about your X-Twitter Scraper API account. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. ``` -------------------------------- ### Styles Get Performance Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get engagement metrics for style profile tweets. ```APIDOC ## styles get-performance — Get engagement metrics for style profile tweets ### Description Retrieves engagement metrics for tweets associated with a specific style profile. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--id` (string) - Required - The ID of the style profile. ``` -------------------------------- ### Draws Retrieve Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get draw details. ```APIDOC ## draws retrieve — Get draw details ### Description Retrieves the details of a specific draw by its ID. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--id` (string) - Required - The ID of the draw. ``` -------------------------------- ### Get X Notifications Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches notifications for the authenticated user. You can filter by notification type and use a cursor for pagination. ```sh x-twitter-scraper x get-notifications \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --type "All" \ --cursor "next_cursor" ``` -------------------------------- ### Get Authenticated User's Home Timeline Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves the home timeline for the authenticated user. Pagination is supported using the cursor. ```sh x-twitter-scraper x get-home-timeline \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --cursor "next_cursor_value" ``` -------------------------------- ### Get User Profile Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves a user's profile information. Requires an API key and the user ID. The --format option can be set to 'pretty' for readable output. ```sh x-twitter-scraper x:users retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "elonmusk" \ --format pretty ``` -------------------------------- ### Add Go Bin to PATH Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Adds the Go bin directory to your system's PATH if commands are not found after installation. Modify your shell profile (.zshrc, .bashrc, etc.) accordingly. ```sh # Add to your shell profile (.zshrc, .bashrc, etc.) export PATH="$PATH:$(go env GOPATH)/bin" ``` -------------------------------- ### Get trending topics via Radar Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches trending topics using the Radar feature. Requires an API key. ```sh x-twitter-scraper radar retrieve-trending-topics \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Start a New Extraction Job Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Initiates a bulk data extraction job. Supports various tool types like tweet search and user timeline extraction, with options for search queries, exact phrases, excluded words, and target usernames. ```sh # Tweet search extraction x-twitter-scraper extractions run \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --tool-type "tweet_search_extractor" \ --search-query "AI from:openai" \ --exact-phrase "large language model" \ --exclude-words "spam bot" # Target a specific user's timeline x-twitter-scraper extractions run \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --tool-type "user_timeline_extractor" \ --target-username "elonmusk" ``` -------------------------------- ### Create a New Monitor Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Creates a new real-time monitor to watch an X account for specific event types. Multiple event types can be specified. ```sh x-twitter-scraper monitors create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --username "elonmusk" \ --event-type "tweet" \ --event-type "retweet" ``` -------------------------------- ### Output Formatting Options Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Demonstrates various output formatting options including pretty-print, YAML, and JSONL. Requires an API key and query parameters. ```sh # Pretty-print with color and structure x-twitter-scraper x:tweets search --api-key "$KEY" --q "golang" --format pretty ``` ```sh # YAML output x-twitter-scraper x:users retrieve --api-key "$KEY" --id "elonmusk" --format yaml ``` ```sh # One tweet per line (JSONL) — useful for piping to jq or other tools x-twitter-scraper x:tweets search --api-key "$KEY" --q "AI" --format jsonl ``` -------------------------------- ### List All Monitors Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all configured monitors. The output format can be specified, with 'pretty' being a human-readable option. ```sh x-twitter-scraper monitors list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --format pretty ``` -------------------------------- ### File Input Syntax Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Demonstrates how to pass file contents as flag values using the '@' syntax, including auto-detection, plain text, and base64 encoding. Also shows how to escape a literal '@' sign. ```sh # Auto-detect encoding (text → string, binary → base64) x-twitter-scraper x:media upload --api-key "$KEY" --file @photo.jpg ``` ```sh # Force plain text encoding x-twitter-scraper some-command --arg @file://data.txt ``` ```sh # Force base64 encoding x-twitter-scraper some-command --arg @data://binary.dat ``` ```sh # Escape a literal @ sign to avoid file interpretation x-twitter-scraper x:tweets create --api-key "$KEY" --account '\@myhandle' --text "Hello" ``` -------------------------------- ### Output Formatting Options Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Demonstrates various options for formatting CLI output, including pretty-printing, YAML, JSONL, and GJSON transformations. ```APIDOC ## Output Formatting & Transforms ### Description Provides flexible output rendering and GJSON-powered data extraction capabilities. ### Method CLI Command with `--format` and `--transform` flags ### Examples Pretty-print with color and structure: ```sh x-twitter-scraper x:tweets search --api-key "$KEY" --q "golang" --format pretty ``` YAML output: ```sh x-twitter-scraper x:users retrieve --api-key "$KEY" --id "elonmusk" --format yaml ``` One tweet per line (JSONL) — useful for piping to jq or other tools: ```sh x-twitter-scraper x:tweets search --api-key "$KEY" --q "AI" --format jsonl ``` Extract a nested field with GJSON: ```sh x-twitter-scraper x:tweets retrieve --api-key "$KEY" --id "123" \ --transform "data.author.username" \ --raw-output # Output: elonmusk ``` Extract array of tweet texts: ```sh x-twitter-scraper x:tweets search --api-key "$KEY" --q "AI" \ --transform "data.#.text" \ --format json ``` Interactive explorer (keyboard navigation, search): ```sh x-twitter-scraper x:users retrieve --api-key "$KEY" --id "elonmusk" --format explore ``` Debug mode (prints full HTTP requests and responses): ```sh x-twitter-scraper x:tweets search --api-key "$KEY" --q "test" --debug ``` ``` -------------------------------- ### Extractions Retrieve Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get results of a completed extraction job. ```APIDOC ## extractions retrieve — Get results of a completed job ### Description Retrieves the results of a completed extraction job. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--id` (string) - Required - The ID of the extraction job. - `--limit` (integer) - Optional - The maximum number of results to retrieve. - `--after` (string) - Optional - A cursor value to retrieve results after a specific point. ``` -------------------------------- ### monitors create Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Creates a new real-time monitor for X account events. ```APIDOC ## monitors create — Create a new monitor ### Description Creates a new real-time monitor to watch X accounts for specific event types and fire webhooks. ### Usage ```sh x-twitter-scraper monitors create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --username "elonmusk" \ --event-type "tweet" \ --event-type "retweet" ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. - `--username` (string) - Required - The X username to monitor. - `--event-type` (string) - Required - The type of event to monitor (e.g., "tweet", "retweet", "like", "follow"). Can be specified multiple times. ``` -------------------------------- ### Get members of a list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves all members belonging to a specific Twitter list. ```APIDOC ## x:lists retrieve-members — Get members of a list ### Description Retrieves the members of a specified Twitter list. ### Method CLI Command ### Endpoint x:lists retrieve-members ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. - **--id** (string) - Required - The ID of the list to retrieve members from. ### Request Example ```sh x-twitter-scraper x:lists retrieve-members \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "list_abc123" ``` ``` -------------------------------- ### X Accounts Create Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Register a new X sub-account. ```APIDOC ## x:accounts create — Register a new X sub-account ### Description Registers a new X (Twitter) sub-account linked to your main API account. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--username` (string) - Required - The X username for the new sub-account. ``` -------------------------------- ### Get tweets from a list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches all tweets posted by members of a specific Twitter list. ```APIDOC ## x:lists retrieve-tweets — Get tweets from a list ### Description Retrieves tweets from a specified Twitter list. ### Method CLI Command ### Endpoint x:lists retrieve-tweets ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. - **--id** (string) - Required - The ID of the list to retrieve tweets from. ### Request Example ```sh x-twitter-scraper x:lists retrieve-tweets \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "list_abc123" ``` ``` -------------------------------- ### x:users:follow create / delete-all Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Allows following or unfollowing users. ```APIDOC ## x:users:follow create / delete-all — Follow or unfollow users ### Description Enables following a target user or unfollowing all users. ### Method POST (for create), DELETE (for delete-all) ### Endpoint Not explicitly defined, CLI command. ### Parameters #### Query Parameters - **api-key** (string) - Required - Your API key for authentication. - **id** (string) - Required - The ID of the target user to follow or unfollow. ### Request Example ```sh x-twitter-scraper x:users:follow create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "target_user_id" ``` ``` -------------------------------- ### Get tweets from a community Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves tweets associated with a specific Twitter community using its ID. ```APIDOC ## x:communities:tweets list-by-community — Get tweets from a community ### Description Retrieves tweets from a specified Twitter community. ### Method CLI Command ### Endpoint x:communities:tweets list-by-community ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. - **--id** (string) - Required - The ID of the community to retrieve tweets from. ### Request Example ```sh x-twitter-scraper x:communities:tweets list-by-community \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "community_abc123" ``` ``` -------------------------------- ### Link CLI to Local SDK Copy Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Links the CLI against a local copy of the X Twitter Scraper Go SDK. If no path is provided, it defaults to '../xtwitterscraper-go'. ```bash ./scripts/link ../path/to/xtwitterscraper-go ``` -------------------------------- ### List bookmark folders Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves a list of bookmark folders. Requires an API key. ```sh x-twitter-scraper x:bookmarks retrieve-folders \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Get members of a list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches members of a specified Twitter list. Requires an API key and the list ID. ```sh x-twitter-scraper x:lists retrieve-members \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "list_abc123" ``` -------------------------------- ### x:users retrieve-batch Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Batch retrieves profiles for up to 100 users. ```APIDOC ## x:users retrieve-batch — Batch lookup up to 100 users ### Description Retrieves profile information for multiple users in a single request, up to a limit of 100 users. ### Method GET (implied by retrieval operation) ### Endpoint Not explicitly defined, CLI command. ### Parameters #### Query Parameters - **api-key** (string) - Required - Your API key for authentication. - **ids** (string) - Required - A comma-separated string of user IDs or usernames to retrieve. ### Request Example ```sh x-twitter-scraper x:users retrieve-batch \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --ids "user1,user2,user3" ``` ``` -------------------------------- ### Get tweets from a community Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches tweets associated with a specific Twitter community ID. Requires an API key. ```sh x-twitter-scraper x:communities:tweets list-by-community \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "community_abc123" ``` -------------------------------- ### Pass File as Argument Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Shows how to pass a file as an argument to a CLI command using the '@' syntax. This is useful for uploading files like images. ```bash x-twitter-scraper --arg @abe.jpg ``` -------------------------------- ### List API Keys Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all API keys associated with your xquik account. Requires an API key. ```sh x-twitter-scraper api-keys list --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Get webhook event payloads Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Provides commands to list all webhook events or retrieve a specific event payload by its ID. ```APIDOC ## events retrieve / list — Get webhook event payloads ### Description Manages webhook events, allowing listing of all events or retrieval of a specific event by its ID. ### Method CLI Command ### Endpoint events list, events retrieve ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. - **--id** (string) - Required for retrieve - The ID of the event to retrieve. ### Request Examples List all events: ```sh x-twitter-scraper events list --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` Retrieve a specific event: ```sh x-twitter-scraper events retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "event_abc123" ``` ``` -------------------------------- ### Create API Key Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Creates a new API key for the xquik service with a specified label. Requires an existing API key. ```sh x-twitter-scraper api-keys create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --label "Production Key" ``` -------------------------------- ### Get trending topics via Radar Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves a list of currently trending topics on Twitter using the Radar feature. ```APIDOC ## radar retrieve-trending-topics — Get trending topics via Radar ### Description Retrieves trending topics from Twitter using the Radar service. ### Method CLI Command ### Endpoint radar retrieve-trending-topics ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. ### Request Example ```sh x-twitter-scraper radar retrieve-trending-topics \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` ``` -------------------------------- ### Get webhook event payloads Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves webhook event payloads. Requires an API key and optionally an event ID. ```sh x-twitter-scraper events list --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` ```sh x-twitter-scraper events retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "event_abc123" ``` -------------------------------- ### API Keys Create Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Create a new API key. ```APIDOC ## api-keys create — Create a new API key ### Description Creates a new API key for accessing the X-Twitter Scraper service. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your existing X-Twitter Scraper API key. - `--label` (string) - Optional - A label for the new API key. ``` -------------------------------- ### Run CLI Locally Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Executes the CLI tool locally after cloning the git repository. Replace 'args...' with your desired command-line arguments. ```sh ./scripts/run args... ``` -------------------------------- ### Get Quote Tweets Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves tweets that quote a specific tweet. Use --include-replies=false to exclude replies from the results. ```sh x-twitter-scraper x:tweets get-quotes \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "1234567890123456789" \ --include-replies=false ``` -------------------------------- ### File Input using '@' syntax Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Explains how to use the '@' syntax to pass file contents as flag values, with options for auto-detection or forced encoding. ```APIDOC ## File Input (`@` syntax) ### Description Allows passing file contents as flag values using the `@filename` syntax, with options for encoding. ### Method CLI Command with `@` prefix for file arguments ### Examples Auto-detect encoding (text → string, binary → base64): ```sh x-twitter-scraper x:media upload --api-key "$KEY" --file @photo.jpg ``` Force plain text encoding: ```sh x-twitter-scraper some-command --arg @file://data.txt ``` Force base64 encoding: ```sh x-twitter-scraper some-command --arg @data://binary.dat ``` Escape a literal `@` sign to avoid file interpretation: ```sh x-twitter-scraper x:tweets create --api-key "$KEY" --account '\@myhandle' --text "Hello" ``` ``` -------------------------------- ### Subscribe to a plan Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Subscribes the user to a specified plan. Requires an API key and the plan ID. ```sh x-twitter-scraper subscribe create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --plan-id "plan_basic" ``` -------------------------------- ### Get tweets from a list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches tweets contained within a specified Twitter list. Requires an API key and the list ID. ```sh x-twitter-scraper x:lists retrieve-tweets \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "list_abc123" ``` -------------------------------- ### Interactive Explorer and Debug Mode Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Illustrates how to use the interactive explorer for navigating results and enabling debug mode for detailed HTTP request/response logging. Requires an API key. ```sh # Interactive explorer (keyboard navigation, search) x-twitter-scraper x:users retrieve --api-key "$KEY" --id "elonmusk" --format explore ``` ```sh # Debug mode (prints full HTTP requests and responses) x-twitter-scraper x:tweets search --api-key "$KEY" --q "test" --debug ``` -------------------------------- ### Get Full Conversation Thread Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches the entire conversation thread associated with a given tweet ID. Requires an API key. ```sh x-twitter-scraper x:tweets get-thread \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "1234567890123456789" ``` -------------------------------- ### x get-home-timeline Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches the home timeline for the authenticated user. ```APIDOC ## x get-home-timeline — Get authenticated user's home timeline ### Description Fetches the home timeline for the authenticated user. ### Usage ```sh x-twitter-scraper x get-home-timeline \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --cursor "next_cursor_value" ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. - `--cursor` (string) - Optional - Cursor for pagination to fetch next set of tweets. ``` -------------------------------- ### Account Set X Username Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Link an X username to the account. ```APIDOC ## account set-x-username — Link an X username to the account ### Description Links a specific X (Twitter) username to your X-Twitter Scraper API account. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--username` (string) - Required - The X username to link. ``` -------------------------------- ### Get Style Profile Performance Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves engagement metrics for tweets associated with a style profile. Requires an API key and profile ID. ```sh x-twitter-scraper styles get-performance \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "style_abc123" ``` -------------------------------- ### Get Direct Message Conversation History Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves the history of direct messages with another user. Supports pagination using --cursor. ```sh x-twitter-scraper x:dm retrieve-history \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --user-id "other_user_id" \ --cursor "next_cursor" ``` -------------------------------- ### Manage support tickets Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Commands for creating, replying to, and listing support tickets. Requires an API key and ticket/subject/body details. ```sh # Open a new ticket x-twitter-scraper support:tickets create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --subject "Issue with extraction" \ --body "Extraction job ext_123 returned empty results." ``` ```sh # Reply to a ticket x-twitter-scraper support:tickets reply \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "ticket_abc123" \ --body "Here is additional context about the issue." ``` ```sh # List open tickets x-twitter-scraper support:tickets list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Get Retweeters for a Tweet Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Use this command to retrieve a list of users who have retweeted a specific tweet. Requires an API key and the tweet ID. ```sh x-twitter-scraper x:tweets get-retweeters \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "1234567890123456789" ``` -------------------------------- ### x:users retrieve-following Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists the accounts a specified user is following. ```APIDOC ## x:users retrieve-following — List accounts a user follows ### Description Retrieves a list of users that a specified Twitter user is currently following. ### Method GET (implied by retrieval operation) ### Endpoint Not explicitly defined, CLI command. ### Parameters #### Query Parameters - **api-key** (string) - Required - Your API key for authentication. - **id** (string) - Required - The user ID or username whose following list is to be retrieved. - **page-size** (integer) - Optional - The number of accounts to retrieve per page. Defaults to a system-defined value. ### Request Example ```sh x-twitter-scraper x:users retrieve-following \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "elonmusk" \ --page-size 100 ``` ``` -------------------------------- ### Link CLI to SDK Version Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Links the CLI against a different version of the X Twitter Scraper Go SDK for development. You can specify a repository URL with a version tag, branch, or commit hash. ```bash ./scripts/link github.com/org/repo@version ``` -------------------------------- ### Escape '@' for String Literals Source: https://github.com/xquik-dev/x-twitter-scraper-cli/blob/main/README.md Escapes the '@' character to ensure it is treated as a literal string rather than a file reference. Use this when your string value starts with '@'. ```bash x-twitter-scraper --username '\@abe' ``` -------------------------------- ### Compare Writing Styles Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Compares the writing styles of two X usernames. Requires an API key. ```sh x-twitter-scraper styles compare \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --username1 "elonmusk" \ --username2 "sama" ``` -------------------------------- ### Get Replies to a Tweet Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches replies made to a specific tweet. You can filter by time using --since-time and paginate using --cursor. ```sh x-twitter-scraper x:tweets get-replies \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "1234567890123456789" \ --since-time "1700000000" \ --cursor "next_cursor_value" ``` -------------------------------- ### monitors list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all existing monitors. ```APIDOC ## monitors list — List all monitors ### Description Lists all existing monitors. ### Usage ```sh x-twitter-scraper monitors list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --format pretty ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. - `--format` (string) - Optional - The output format (e.g., "pretty"). ``` -------------------------------- ### Retrieve a Single Tweet Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Get full details for a specific tweet using its ID. Supports pretty formatting and a positional argument shorthand for the API key and ID. ```sh x-twitter-scraper x:tweets retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "1234567890123456789" \ --format pretty # Positional argument shorthand x-twitter-scraper x:tweets retrieve --api-key "$KEY" 1234567890123456789 ``` -------------------------------- ### Create New X Sub-Account Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Registers a new X sub-account linked to your xquik API account. Requires an API key. ```sh x-twitter-scraper x:accounts create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --username "newxhandle" ``` -------------------------------- ### API Keys List Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt List all API keys. ```APIDOC ## api-keys list — List all API keys ### Description Lists all API keys associated with your X-Twitter Scraper account. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. ``` -------------------------------- ### Get Trending Hashtags and Topics Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves trending hashtags and topics. You can specify a count and a WOEID (Where On Earth ID) to filter by region. WOEID 1 is worldwide, and 23424977 is for US topics. ```sh # Worldwide trending (default) x-twitter-scraper x get-trends \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --count 30 \ --woeid 1 # US trending topics x-twitter-scraper x get-trends \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --count 50 \ --woeid 23424977 ``` -------------------------------- ### Styles List Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt List all cached style profiles. ```APIDOC ## styles list — List all cached style profiles ### Description Lists all style profiles that have been cached. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. ``` -------------------------------- ### List Users Followed by a User Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches a list of accounts that a specified user is following. You can control the number of results per page with --page-size. ```sh x-twitter-scraper x:users retrieve-following \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "elonmusk" \ --page-size 100 ``` -------------------------------- ### Styles Compare Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Compare two style profiles. ```APIDOC ## styles compare — Compare two style profiles ### Description Compares the writing styles of two specified Twitter usernames. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--username1` (string) - Required - The first Twitter username to compare. - `--username2` (string) - Required - The second Twitter username to compare. ``` -------------------------------- ### X Accounts List Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt List all linked X accounts. ```APIDOC ## x:accounts list — List all linked X accounts ### Description Lists all X (Twitter) accounts that are linked to your X-Twitter Scraper API account. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. ``` -------------------------------- ### Draws Run Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Execute a draw. ```APIDOC ## draws run — Execute a draw ### Description Executes a giveaway draw based on a tweet ID and specified winner count. ### Method CLI Command ### Endpoint N/A (CLI command) ### Parameters #### CLI Arguments - `--api-key` (string) - Required - Your X-Twitter Scraper API key. - `--tweet-id` (string) - Required - The ID of the tweet to run the draw from. - `--winner-count` (integer) - Required - The number of winners to select. ``` -------------------------------- ### Batch Retrieve User Profiles Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches profiles for up to 100 users in a single request. Provide a comma-separated list of user IDs. ```sh x-twitter-scraper x:users retrieve-batch \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --ids "user1,user2,user3" ``` -------------------------------- ### Generate Man Pages Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Generate man pages for the CLI tool, either compressed or uncompressed. The output can be directed to a specific directory. ```sh # Generate man pages x-twitter-scraper @manpages --output ./man --gzip # produces man/man1/x-twitter-scraper.1.gz x-twitter-scraper @manpages --text # produces uncompressed man/man1/x-twitter-scraper.1 ``` -------------------------------- ### Retrieve X Community Details Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches detailed information about a specific X Community using its ID. Requires an API key. ```sh x-twitter-scraper x:communities retrieve-info \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "community_abc123" ``` -------------------------------- ### x:users retrieve Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves a user's profile information. ```APIDOC ## x:users retrieve — Get a user profile ### Description Fetches the profile details of a specific Twitter user. ### Method GET (implied by retrieval operation) ### Endpoint Not explicitly defined, CLI command. ### Parameters #### Query Parameters - **api-key** (string) - Required - Your API key for authentication. - **id** (string) - Required - The username or user ID of the profile to retrieve. - **format** (string) - Optional - The output format for the retrieved data (e.g., 'pretty'). ### Request Example ```sh x-twitter-scraper x:users retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "elonmusk" \ --format pretty ``` ``` -------------------------------- ### Retrieve API Account Info Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches information about the current xquik API account. Requires an API key. ```sh x-twitter-scraper account retrieve --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### List Draws Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all executed draws. Requires an API key. ```sh x-twitter-scraper draws list --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### List Trending Topics Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists trending topics. Requires your API key. ```sh x-twitter-scraper trends list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Global Flags Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Every command supports these global flags for authentication, output control, and other settings. ```APIDOC ## Global Flags Every command supports these global flags: ```sh x-twitter-scraper [resource] [flags...] # Authentication --api-key # or env: X_TWITTER_SCRAPER_API_KEY --bearer-token # or env: X_TWITTER_SCRAPER_BEARER_TOKEN (OAuth 2.1) # Output control --format auto|explore|json|jsonl|pretty|raw|yaml # default: auto --format-error auto|explore|json|jsonl|pretty|raw|yaml --transform # extract/transform data output --transform-error -r, --raw-output # print strings without JSON quotes # Other --debug # log full HTTP request/response --base-url # override API base URL --version, -v --help ``` ``` -------------------------------- ### List Cached Style Profiles Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all available cached style profiles. Requires an API key. ```sh x-twitter-scraper styles list --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Subscribe to a plan Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Subscribes the user to a specified subscription plan. ```APIDOC ## subscribe create — Subscribe to a plan ### Description Subscribes the user to a specified subscription plan. ### Method CLI Command ### Endpoint subscribe create ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. - **--plan-id** (string) - Required - The ID of the plan to subscribe to. ### Request Example ```sh x-twitter-scraper subscribe create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --plan-id "plan_basic" ``` ``` -------------------------------- ### List Linked X Accounts Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all X accounts currently linked to your xquik API account. Requires an API key. ```sh x-twitter-scraper x:accounts list --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### Follow or Unfollow Users Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Commands to follow or unfollow users. Use 'create' to follow and 'delete-all' to unfollow. Requires an API key and the target user ID. ```sh x-twitter-scraper x:users:follow create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "target_user_id" ``` -------------------------------- ### webhooks create Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Registers a new webhook to receive real-time event notifications. ```APIDOC ## webhooks create — Register a new webhook ### Description Registers a new webhook to receive real-time push notifications for events via HTTPS endpoints. ### Usage ```sh x-twitter-scraper webhooks create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --url "https://myapp.example.com/webhook" \ --event-type "tweet" \ --event-type "follow" ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. - `--url` (string) - Required - The HTTPS URL to receive webhook events. - `--event-type` (string) - Required - The type of event to subscribe to (e.g., "tweet", "follow"). Can be specified multiple times. ``` -------------------------------- ### Link X Username to Account Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Links an X username to your xquik API account. Requires an API key. ```sh x-twitter-scraper account set-x-username \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --username "myxhandle" ``` -------------------------------- ### Add credits to account Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Adds a specified amount of credits to the account. Requires an API key and the amount. ```sh x-twitter-scraper credits topup-balance \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --amount 100 ``` -------------------------------- ### Generate Shell Completion Scripts Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Generate shell completion scripts for bash, zsh, fish, and PowerShell to improve command-line usability. Place the output in the appropriate directory for your shell. ```sh # Generate shell completion scripts (hidden command) x-twitter-scraper @completion bash > /etc/bash_completion.d/x-twitter-scraper x-twitter-scraper @completion zsh > ~/.zsh/completions/_x-twitter-scraper x-twitter-scraper @completion fish > ~/.config/fish/completions/x-twitter-scraper.fish x-twitter-scraper @completion pwsh > x-twitter-scraper.ps1 ``` -------------------------------- ### Compose a tweet with AI assistance Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Creates a tweet using AI based on a prompt and a specified style. Requires an API key, prompt, and style ID. ```sh x-twitter-scraper compose create \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --prompt "Write a tweet about AI advancements in 2024" \ --style-id "style_abc123" ``` -------------------------------- ### extractions list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all initiated extraction jobs. ```APIDOC ## extractions list — List all extraction jobs ### Description Lists all initiated extraction jobs. ### Usage ```sh x-twitter-scraper extractions list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --status "completed" \ --limit 20 ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. - `--status` (string) - Optional - Filter jobs by status (e.g., "completed", "running"). - `--limit` (integer) - Optional - The maximum number of jobs to list. ``` -------------------------------- ### Check Follow Relationship Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Checks the follow relationship between two users. Requires an API key and the source and target user IDs. ```sh x-twitter-scraper x:followers check \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --source-user-id "user_a_id" \ --target-user-id "user_b_id" ``` -------------------------------- ### Add credits Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Adds a specified amount of credits to the account. ```APIDOC ## credits topup-balance — Add credits ### Description Adds a specified amount of credits to the user's account. ### Method CLI Command ### Endpoint credits topup-balance ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. - **--amount** (integer) - Required - The amount of credits to add. ### Request Example ```sh x-twitter-scraper credits topup-balance \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --amount 100 ``` ``` -------------------------------- ### x:users retrieve-search Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Searches for users by name or username. ```APIDOC ## x:users retrieve-search — Search users by name or username ### Description Searches for Twitter users based on their name or username. ### Method GET (implied by retrieval operation) ### Endpoint Not explicitly defined, CLI command. ### Parameters #### Query Parameters - **api-key** (string) - Required - Your API key for authentication. - **q** (string) - Required - The search query (name or username). ### Request Example ```sh x-twitter-scraper x:users retrieve-search \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --q "Elon" ``` ``` -------------------------------- ### Update Profile Banner Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Use this command to update your X profile banner image. Ensure the image file is correctly specified. ```sh x-twitter-scraper x:profile update-banner \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --account "@myaccount" \ --image @banner.jpg ``` -------------------------------- ### List bookmark folders Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves a list of all folders created for organizing bookmarked tweets. ```APIDOC ## x:bookmarks retrieve-folders — List bookmark folders ### Description Retrieves a list of folders used to organize bookmarked tweets. ### Method CLI Command ### Endpoint x:bookmarks retrieve-folders ### Parameters #### Query Parameters - **--api-key** (string) - Required - Your API key for authentication. ### Request Example ```sh x-twitter-scraper x:bookmarks retrieve-folders \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` ``` -------------------------------- ### Search X Communities Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Searches for X Communities based on a query string. Requires an API key. ```sh x-twitter-scraper x:communities retrieve-search \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --q "AI enthusiasts" ``` -------------------------------- ### Retrieve Extraction Results Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Fetches results for a completed extraction job. Use --limit and --after for pagination. ```sh x-twitter-scraper extractions retrieve \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "ext_job_abc123" \ --limit 500 \ --after "cursor_value" ``` -------------------------------- ### List Registered Webhooks Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all currently registered webhooks for your account. ```sh x-twitter-scraper webhooks list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` -------------------------------- ### List User Followers Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Retrieves a list of users who follow a specified user. Supports pagination with --page-size and --cursor. ```sh x-twitter-scraper x:users retrieve-followers \ --api-key "$X_TWITTER_SCRAPER_API_KEY" \ --id "elonmusk" \ --page-size 200 \ --cursor "next_cursor" ``` -------------------------------- ### webhooks list Source: https://context7.com/xquik-dev/x-twitter-scraper-cli/llms.txt Lists all registered webhooks. ```APIDOC ## webhooks list — List registered webhooks ### Description Lists all registered webhooks. ### Usage ```sh x-twitter-scraper webhooks list \ --api-key "$X_TWITTER_SCRAPER_API_KEY" ``` ### Parameters - `--api-key` (string) - Required - Your X Scraper API key. ```