# X (Twitter) Brand Monitoring with AI Analysis | $0.0003/Tweet (`xquik/x-twitter-brand-monitoring`) Actor

Monitor your brand on X (Twitter) with AI, AI costs included. Track mentions in tweets with relevance, sentiment & customer-experience answers, plus changes since your last run, from $0.0003 per analyzed tweet. World's fastest & cheapest X (Twitter) scraper service. Not affiliated with X Corp.

- **URL**: https://apify.com/xquik/x-twitter-brand-monitoring.md
- **Developed by:** [Xquik](https://apify.com/xquik) (community)
- **Categories:** Social media, AI, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.0003 / analyzed tweet

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

<p align="center">
  <strong>English</strong> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.es.md">Español</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.tr.md">Türkçe</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.zh-CN.md">简体中文</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.ja.md">日本語</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.ko.md">한국어</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.de.md">Deutsch</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.fr.md">Français</a> ·
  <a href="https://github.com/Xquik-dev/x-twitter-scraper/blob/master/apify/x-twitter-brand-monitoring/README.it.md">Italiano</a>
</p>

<table align="center"><tr><td align="center">
<a href="https://youtu.be/4UOSpoOoC3Y?t=367"><img src="https://img.youtube.com/vi/4UOSpoOoC3Y/maxresdefault.jpg" width="720" alt="Framer connects Xquik MCP to coding agents"></a><br>
<a href="https://youtu.be/4UOSpoOoC3Y?t=367">Watch how Framer uses Xquik scrapers with Claude Code, Codex, Cursor, and more, from 6:07.</a>
</td></tr></table>

Xquik is the world's fastest & cheapest X (Twitter) scraper service with the
most complete X data. X (Twitter) Brand Monitoring tracks your brand mentions
with relevance, sentiment & customer-experience answers. Every other Apify Actor
charges before filtering or deduplicating. Xquik charges only for delivered,
unique, filter-matching results. AI costs are included in the per-tweet price.
You pay no AI provider, buy no tokens & bring no key.

Monitor brand mentions on X (Twitter) & track sentiment changes between runs.
**X (Twitter) Brand Monitoring with AI Analysis** collects every matching tweet.
It answers relevance, sentiment & customer-experience questions for each post
with AI. It compares those answers with an earlier dataset, so you see what
changed. Every row keeps the original tweet data, so exports, reviews &
follow-up analysis need no second scrape.

Watch a brand, a product line or a campaign for complaints, praise & purchase
questions. Brief support & marketing teams from real posts. Keep a history of
how customers talk about you from run to run.

- **Every field of the source tweet.** Text, author, counts, media, links,
  quoted & replied posts stay beside the answers.
- **Typed answers.** Each row has a relevance probability, a sentiment category
  with probabilities & a customer-experience category.
- **Change tracking.** Runs compare by decision, so small probability shifts do
  not count as changes.
- **Filter-first billing.** You pay only for unique, filter-matching tweets with
  a successful analysis.

### How to monitor a brand on X

1. Add search terms (for example `(Sony OR "WH-1000XM5") headphones lang:en`),
   profile handles, tweet URLs or tweet IDs.
2. Set `maxItems` & the extraction filters your task needs, such as date bounds,
   minimum likes or reply exclusion.
3. Put your brand names & aliases under `analysis.targets` & describe the brand
   in `analysis.context`.
4. Run the Actor, then keep the dataset ID for your next comparison.
5. On the next run, add `monitor.baselineDatasetId` with that ID. Keep
   questions, targets, context & context limits unchanged so answers stay
   comparable.

```json
{
  "searchTerms": ["(Sony OR \"WH-1000XM5\") headphones lang:en"],
  "maxItems": 100,
  "analysis": {
    "targets": [
      { "name": "Sony", "aliases": ["Sony headphones", "WH-1000XM5"] }
    ],
    "context": "Consumer headphones & customer service."
  },
  "monitor": {
    "baselineDatasetId": "YOUR_PREVIOUS_DATASET_ID",
    "maxBaselineRows": 100000
  }
}
```

Targets guide classification. They do not create search queries or remove
irrelevant tweets automatically, so choose search terms & filters that match
your research.

#### What the monitor answers

| Question            | Answer                                           |
| ------------------- | ------------------------------------------------ |
| Brand relevance     | Probability that the tweet discusses your target |
| Sentiment           | Positive, negative, mixed, neutral or unclear    |
| Customer experience | Customer, prospect, observer or unclear          |

Use relevance probabilities to review ambiguous namesakes. Sentiment describes
the author's expressed attitude toward the target.

#### How comparisons work

| Comparison status      | Meaning                                                 |
| ---------------------- | ------------------------------------------------------- |
| `first_run`            | No baseline was supplied                                |
| `new_to_baseline`      | This tweet ID was absent from the baseline              |
| `unchanged`            | Every comparable decision matches                       |
| `changed`              | At least 1 decision differs                             |
| `not_comparable`       | Required metadata, IDs or matching settings are missing |
| `analysis_unavailable` | This tweet has no successful analysis                   |

Answers compare by decision. A `choice` answer compares by its category. A
`score` answer compares by its nearest level. A `probability` answer compares by
its yes-or-no decision at 0.5. A decision counts as changed in three cases. The
earlier category falls below 0.4 probability. A score moves at least 0.6 levels.
A yes/no probability lands at least 0.1 from the threshold. Near ties between
runs stay `unchanged`, & so do shifts that keep the same decision. Model
variation between runs does not fill your report. `changes` lists each changed
question with its `previous` & `current` decision. Changes may come from model
variation, new context or edited source data. They do not prove changed facts, &
an absent tweet does not prove deletion.

The baseline limit defaults to 100,000 rows. Duplicate tweet IDs, loading
failures & changing dataset sizes stop comparison before collection. They never
become an empty baseline.

### Analyze your own text

Paste your own text in `texts`: drafts, replies, reviews or notes. The Actor
analyzes it & fetches nothing from X.

```json
{
  "texts": [
    "The new update is great, but sync still drops on mobile.",
    "Support fixed my issue in 10 minutes. Thank you."
  ]
}
```

- Each text becomes 1 row with the same `analysis` answers as a tweet.
- `tweet.id` is `text:1`, `text:2` & so on, & `tweet.type` is `text`.
- Each analyzed text costs the same $0.0003 as an analyzed tweet.
- With `texts` set, the run analyzes only those texts. Run X targets separately.

### Pricing

AI costs are included in the per-tweet price. You pay no AI provider, buy no
tokens & bring no key.

From $0.0003 per successfully analyzed tweet, with no start fee. The price
includes collection. The analysis allowance is 8 questions, 8,000 bytes per
question definition & 12,000 bytes of context per tweet. Extraction filters &
deduplication run before analysis, so you never pay for filtered-out or
duplicate rows. Failed analyses, skipped analyses & diagnostic rows have no
result charge. Apify bills platform usage for compute, storage & transfer
separately at your plan's rates. The Pricing tab shows it.

### Input & output examples

The input above is copy-ready. Output rows look like this (abbreviated):

```json
{
  "tweet": { "id": "2100344867507327087", "text": "…", "likeCount": 6409 },
  "analysis": {
    "status": "succeeded",
    "answers": [
      { "questionId": "relevance", "type": "probability", "probability": 0.97 },
      {
        "questionId": "sentiment",
        "type": "choice",
        "value": "neutral",
        "confidence": 0.88
      },
      {
        "questionId": "experience",
        "type": "choice",
        "value": "observer",
        "confidence": 0.69
      }
    ]
  },
  "monitor": { "status": "unchanged", "changedQuestionIds": [], "changes": [] }
}
```

Each result contains `tweet`, `analysis` & `monitor`. Answers include types,
question versions & available probabilities. Missing quote, reply, author &
media context stays explicit under `analysis.contextAvailability`. A failed or
skipped analysis keeps the collected tweet with an empty answer list & a
`reason`. Free diagnostics in the key-value store explain invalid inputs,
missing results & interrupted collection, & the run report separates collected
rows, charged analyses & pending charges.

### Run summary & flat answers

Each run writes an `analysis-summary` record to its key-value store & repeats it
under `results.analysisSummary` in the run report. It counts analyzed, failed &
skipped rows, sums engagement, and summarizes every question.

- `targets` reports mentions, share of voice & engagement per brand or alias.
- Each `targets` entry has `top`, its three most engaged mentions per answer
  category. Use it to alert on the strongest negative & positive mentions.
- Each `targets` entry has `choices`, the answer split among tweets that mention
  that brand.
- The `sentiment` block lists the three most engaged positive & negative
  mentions under `top`.
- `relevance` counts the mentions that are about the brand.
- `monitor.changedRows` lists tweets whose decisions moved since the baseline.
  Send them to a webhook or an alert.
- With `monitor.baselineDatasetId` set, the `monitor` block counts comparison
  statuses & lists up to 50 changed rows.
- Every row lists `sourceDomains`, the hostnames it links to.

The summary rounds numbers to 4 decimals. An empty run reports zero counts &
`null` means.

Every result row also carries `answers`, a flat map from question ID to the
chosen category, score, or probability. The `Flat answers` dataset view & CSV or
Excel exports show one column per question beside the tweet, so spreadsheets
need no JSON parsing. Failed & skipped rows carry an empty map.

### Task examples

Choose from 50 public tasks. Each starts from a real English search with a
bounded `maxItems`, ready-made targets & context, & the overview dataset view.
Edit the search or targets before running.

- [Monitor Nike brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-nike-brand-mentions-on-x)
- [Monitor Starbucks brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-starbucks-brand-mentions-on-x)
- [Monitor Tesla brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-tesla-brand-mentions-on-x)
- [Monitor Spotify brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-spotify-brand-mentions-on-x)
- [Monitor Netflix brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-netflix-brand-mentions-on-x)
- [Monitor Airbnb brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-airbnb-brand-mentions-on-x)
- [Monitor Uber brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-uber-brand-mentions-on-x)
- [Monitor Peloton brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-peloton-brand-mentions-on-x)
- [Monitor Shopify brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-shopify-brand-mentions-on-x)
- [Monitor Notion brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-notion-brand-mentions-on-x)
- [Monitor Duolingo brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-duolingo-brand-mentions-on-x)
- [Monitor Lululemon brand mentions on X](https://apify.com/xquik/x-twitter-brand-monitoring/examples/monitor-lululemon-brand-mentions-on-x)

The remaining tasks cover more brands, topics & markets on the Actor page.

### Related Xquik Actors

Every Xquik Actor shares the same extraction engine, filter-first billing &
diagnostics. Pick the one that matches the data you need.

- [X Tweet Scraper](https://apify.com/xquik/x-tweet-scraper): Scrapes tweets
  from searches, profile timelines, Lists & tweet IDs with 50+ filters & flat
  exports. Use it when you need tweet data without analysis. From $0.00015 per
  row.
- [X Profile Scraper](https://apify.com/xquik/x-profile-scraper): Scrapes
  profiles plus their posts, replies, media & followers from handles, IDs or
  URLs. Use it when you start from accounts rather than searches. From $0.00015
  per row.
- [X Reply Scraper](https://apify.com/xquik/x-reply-scraper): Scrapes replies,
  comments & whole conversations under posts with 25+ filters. Use it when you
  need the discussion beneath tweets. From $0.00015 per row.
- [X Engagement Scraper](https://apify.com/xquik/x-engagement-scraper): Scrapes
  replies, quotes, retweeters & threads for post URLs or IDs in bulk. Use it
  when you measure who engaged with posts. From $0.00015 per row.
- [X Follower Scraper](https://apify.com/xquik/x-follower-scraper): Scrapes
  followers, following, List members, subscribers & Community members as profile
  rows. Use it when you need audience or member lists. From $0.00015 per
  profile.
- [X User Search Scraper](https://apify.com/xquik/x-user-search-scraper):
  Searches users by handle, bio & location with follower, verification, age &
  location filters. Use it when you build account lists from search. From
  $0.00015 per profile.
- [X List Scraper](https://apify.com/xquik/x-list-scraper): Scrapes List posts,
  members & followers from List URLs or IDs. Use it when a curated List defines
  your sources. From $0.00015 per row.
- [X Community Scraper](https://apify.com/xquik/x-community-scraper): Scrapes
  Community info, posts, searches, members & moderators. Use it when your
  sources are X Communities. From $0.00015 per row.
- [X Trends Scraper](https://apify.com/xquik/x-trends-scraper): Scrapes
  real-time trends by location with rank, volume, query & WOEID. Use it when you
  track what is trending where. From $0.00015 per trend.
- [X Article Scraper](https://apify.com/xquik/x-article-scraper): Scrapes
  long-form X Articles as Markdown & text with covers, authors, dates & metrics.
  Use it when you need article bodies, not tweets. From $0.00015 per article.
- [X Media Downloader](https://apify.com/xquik/x-media-downloader): Extracts or
  stores photos, videos & GIFs from posts or profiles with MP4 & metadata
  options. Use it when you need the media files themselves. From $0.00015 per
  media row.
- [X Tweet Sentiment Analysis with AI](https://apify.com/xquik/x-tweet-sentiment-analysis):
  Labels attitude, intensity & sarcasm probability for every tweet with AI. Use
  it when you need general sentiment on any topic. From $0.0003 per analyzed
  tweet.
- [X (Twitter) Stock & Crypto AI Trading Signals](https://apify.com/xquik/x-twitter-stock-crypto-signals):
  Labels bullish, bearish, neutral or mixed stance, content type, conviction &
  asset relevance with AI. Use it when you follow stocks, crypto or trading
  talk. From $0.0003 per analyzed tweet.
- [X (Twitter) News Monitor with AI Analysis](https://apify.com/xquik/x-twitter-news-monitor):
  Labels news posts by format, source attribution & topic relevance with AI. Use
  it when you separate reporting from commentary. From $0.0003 per analyzed
  tweet.
- [X Tweet Classifier with AI Analysis](https://apify.com/xquik/x-twitter-tweet-classifier):
  Answers your own category, score & yes/no questions for every tweet with AI.
  Use it when the preset analyses do not fit your labels. From $0.0003 per
  analyzed tweet.
- [X Tweet Viral Score Analyzer with AI](https://apify.com/xquik/x-tweet-viral-score-analyzer):
  Estimates a Viral Score from 0 to 100 & a verdict for every tweet from 8 AI
  trait answers. Use it when you study why tweets spread or flop. From $0.0003
  per analyzed tweet.

### FAQ & support

#### Can I use my own questions?

Yes. Custom `analysis.questions` replace the defaults. Send 1-8 `choice`,
`score` or `probability` questions. Choice questions accept 2-255 categories.
Scores use at least 2 ordered levels. Keep the same questions across runs you
want to compare.

#### Why did a row come back with `analysis.status` of `failed` or `skipped`?

The Actor collected & delivered the tweet, but the AI analysis did not complete.
`analysis.reason` names the cause, such as `context_limit` when the tweet & its
context exceed `maxContextBytes`, or `service_unavailable` after retries. These
rows carry no result charge. Raise `maxContextBytes` (up to 12,000) or rerun the
affected IDs.

#### Does the analysis verify facts?

No. Answers describe what the post expresses & how the post frames it.
Probabilities express model confidence, not truth. Review important
classifications against the original tweet, which every row keeps.

#### Which languages work?

Extraction supports every language X serves. We validate analysis on English
customer scenarios first. Other supported languages return answers with the same
structure. `unclear` categories & probabilities show uncertainty in every
language.

#### How do I limit cost?

Filters, deduplication & `maxItems` run before analysis, so the Actor analyzes &
charges only unique, filter-matching tweets. Use precise search operators, date
bounds & engagement floors, & start with a small `maxItems` to check answer
quality before a large run.

#### Where do I get help?

Open an issue on the Actor page or contact support@xquik.com with the run ID.
Free diagnostics in the key-value store explain empty, partial or interrupted
runs.

Xquik is an independent third-party service. Not affiliated with X Corp.
"Twitter" and "X" are trademarks of X Corp.

# Changelog

This Actor's version history is a separate document: https://apify.com/xquik/x-twitter-brand-monitoring/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

Add Tweet, profile, search, or List URLs as strings or {"url":"..."} objects. Profile URLs may use /with\_replies, /media, or best-effort /likes. Tweet URL batches recheck unresolved IDs once after partial responses. Example: \["https://x.com/elonmusk", "https://x.com/search?q=AI"]

## `searchTerms` (type: `array`):

Run multiple searches in one Actor run. Max Items applies across the run. Compatible account date windows share one bounded retrieval. Recent windows combine the profile timeline with author search. Historical windows use exact search. The Actor verifies raw date and unix-time operators before adding results. Example: from:elonmusk AI, #bitcoin lang:en

## `texts` (type: `array`):

Your own texts to analyze, such as draft tweets, replies or notes. The Actor fetches nothing from X for them. Each text becomes 1 row and costs the same as 1 analyzed tweet. When you set this field, the run analyzes only these texts.

## `maxItems` (type: `integer`):

Optional result cap across the whole run. Leave empty to use your Apify max total charge as the result limit when set. Without a spend cap, Xquik uses its built-in default. The Apify pricing box shows the current per-result price before the run starts. Diagnostic rows count toward this cap. The form starts at 1,000. A run can return 100,000 rows & more, so raise it for a full export.

## `analysis` (type: `object`):

Set targets with brand names & aliases. Default questions assess relevance, sentiment & customer experience. Custom questions replace defaults. Optional context clarifies the brand. Up to 8 questions. maxContextBytes defaults to 12000. Concurrency defaults to 4, with a maximum of 16.

## `monitor` (type: `object`):

Optional baselineDatasetId identifies a completed dataset from this monitor. Omit it for a first run. maxBaselineRows defaults to 100000, range 1-100000. Unreadable, changing or oversized baselines stop the run before collection. Keep analysis settings unchanged for comparable answers.

## `twitterContent` (type: `string`):

Search query using X advanced search syntax. Supports keywords, hashtags, exact phrases, boolean operators, and date or unix-time windows. The Actor verifies each returned tweet against requested time bounds. Example: web scraping OR #datascience

## `twitterHandles` (type: `array`):

X usernames for profile timelines and author search. Profile Tweets matches the Posts tab on X: posts, reposts & the author's replies to their own posts. Add Exclude replies under Tweet type filters for original posts only. Profile With Replies keeps target-authored posts and replies. Add usernames with or without @. Example: elonmusk, @nasa

## `profileUrls` (type: `array`):

Alias for Start URLs. Add profile URL strings or {"url":"..."} objects. Auto-route and profile modes combine the profile timeline with author search.

## `tweetIds` (type: `array`):

Tweet IDs to look up directly. Other sources in the same input run too, and Max Items applies across the run. Process up to 10,000 tweet IDs per run. Chunks of 100 run concurrently. Partial responses recheck unresolved IDs once. Example: 1846987139428634858

## `listIds` (type: `array`):

X list IDs to scrape through the dedicated list route. This is usually much faster than pasting list URLs into Start URLs or using the List ID search filter below. Example: 1748648376080666720

## `mode` (type: `string`):

Choose which tweets to collect. Tweet classification excludes standalone article extraction & user lists.

## `maxItemsPerTarget` (type: `integer`):

Optional cap for each target in multi-target modes.

## `queryType` (type: `string`):

Latest returns newest first. Top is relevance-ranked and not exhaustive. Latest + Top runs both passes concurrently, deduplicates before billing, and backfills unused capacity from either pass. Account timelines ignore this setting.

## `content` (type: `object`):

Build content filters without writing X search syntax.

## `users` (type: `object`):

Optional structured author, reply, mention, and list filters.

## `time` (type: `object`):

Optional structured time filters.

## `engagement` (type: `object`):

Optional structured engagement filters.

## `media` (type: `object`):

Optional structured media filters.

## `lang` (type: `string`):

Filter tweets by language using a 2-letter ISO 639-1 code. The Actor verifies returned tweets and continues paging past mismatches.

## `tweetTypes` (type: `object`):

Optional tweet type filters. Include only one type, or exclude replies, reposts or quote tweets.

## `geo` (type: `object`):

Optional structured location filters.

## `cards` (type: `object`):

Optional structured card filters.

## `sources` (type: `object`):

Optional structured source filters.

## `conversation_id` (type: `string`):

Only include tweets belonging to this conversation thread. Use the first tweet's ID in the thread.

## `conversationIds` (type: `array`):

Alias for one or more conversation\_id searches.

## `quoted_tweet_id` (type: `string`):

Only include tweets that quote this specific tweet ID.

## `quoted_user_id` (type: `string`):

Only include tweets that quote any tweet from this user ID.

## `filter:has_engagement` (type: `boolean`):

Only include tweets with at least one like, retweet, or reply.

## `include:nativeretweets` (type: `boolean`):

Include native retweets in results (excluded by default).

## `filter:twimg` (type: `boolean`):

Only include tweets containing twimg.com images.

## `filter:native_video` (type: `boolean`):

Only include tweets with natively uploaded video.

## `filter:vine` (type: `boolean`):

Only include tweets with Vine videos.

## `filter:consumer_video` (type: `boolean`):

Only include tweets with consumer-uploaded video.

## `filter:pro_video` (type: `boolean`):

Only include tweets with professionally produced video.

## `filter:spaces` (type: `boolean`):

Only include tweets containing a Spaces link.

## `filter:mentions` (type: `boolean`):

Only include tweets containing @mentions.

## `filter:hashtags` (type: `boolean`):

Only include tweets containing hashtags.

## `includeSearchTerms` (type: `boolean`):

Attach the first matching search term as `searchTerm` on each unique Tweet. Use it to identify which query produced each deduplicated result.

## `respectProfileSubpages` (type: `boolean`):

Honor profile subpage paths such as /with\_replies, /media, and /likes when routing profile URLs. /with\_replies returns target-authored posts and replies. The Actor excludes conversation context from other authors.

## `replyTweetIds` (type: `array`):

Tweet IDs whose direct replies to collect. The Actor combines 5 authenticated views, 3 ranking modes, every forward cursor module, labeled hidden-content branches, Top time partitions, and search. Nested replies never count as direct. Incomplete targets add a detailed diagnostic when capacity remains. Real replies always take priority.

## `quoteTweetIds` (type: `array`):

Tweet IDs to read with mode quotes.

## `threadTweetIds` (type: `array`):

Tweet IDs to read with mode thread.

## `from` (type: `string`):

Only include tweets sent by this username (without the @ symbol). Example: elonmusk

## `to` (type: `string`):

Only include tweets that are replies to this username (without @). Example: OpenAI

## `@` (type: `string`):

Only include tweets that mention this username (without @). Example: Google

## `since` (type: `string`):

Only include verified tweets on or after this date. Format: YYYY-MM-DD\_HH:MM:SS\_UTC. Example: 2026-01-01\_00:00:00\_UTC

## `until` (type: `string`):

Only include verified tweets before this date. Same format as Since Date. Example: 2026-04-01\_00:00:00\_UTC

## `since_time` (type: `string`):

Only include verified tweets on or after this unix timestamp (seconds). Example: 1704067200

## `until_time` (type: `string`):

Only include verified tweets before this unix timestamp (seconds). Example: 1711929600

## `within_time` (type: `string`):

Only include tweets from the last N time units. Example: 1d (1 day), 12h (12 hours), 30m (30 minutes), 60s (60 seconds)

## `since_id` (type: `string`):

Only include tweets with an ID greater than (posted after) this tweet ID.

## `max_id` (type: `string`):

Only include tweets with an ID less than (posted before) this tweet ID.

## `min_faves` (type: `integer`):

Only include tweets with at least this many likes. Set to 0 to disable.

## `-min_faves` (type: `integer`):

Only include tweets with at most this many likes. Set to 0 to disable.

## `min_retweets` (type: `integer`):

Only include tweets with at least this many retweets. Set to 0 to disable.

## `-min_retweets` (type: `integer`):

Only include tweets with at most this many retweets. Set to 0 to disable.

## `min_replies` (type: `integer`):

Only include tweets with at least this many replies. Set to 0 to disable.

## `-min_replies` (type: `integer`):

Only include tweets with at most this many replies. Set to 0 to disable.

## `filter:blue_verified` (type: `boolean`):

Only include tweets from X Premium (Blue) verified accounts.

## `filter:nativeretweets` (type: `boolean`):

Only include native retweets.

## `filter:replies` (type: `boolean`):

Only include reply tweets.

## `filter:quote` (type: `boolean`):

Only include quote tweets.

## `filter:media` (type: `boolean`):

Apply X's media search operator. Results usually include attached media, but X can also match media-like card content.

## `filter:images` (type: `boolean`):

Apply X's image search operator. Results usually include image media. X can also match card or link image content.

## `filter:videos` (type: `boolean`):

Apply X's video search operator. Results usually include native video media.

## `filter:links` (type: `boolean`):

Only include tweets containing external links.

## `filter:news` (type: `boolean`):

Only include tweets containing news article links.

## `filter:safe` (type: `boolean`):

Only include tweets marked as safe (excludes sensitive content).

## `near` (type: `string`):

Only include tweets geotagged near this place. Example: San Francisco

## `within` (type: `string`):

Radius for the Near Place filter. Format: integer + unit (km or mi), no spaces. Example: 10km, 25mi

## `geocode` (type: `string`):

Filter by exact coordinates in lat,long,radius format. Use no spaces. Give the radius in km or mi. Example: 37.7749,-122.4194,10km

## `list` (type: `string`):

Filter search results to Tweets from members of this X List. Use List IDs unless you need to combine this filter with other search operators.

## `url` (type: `string`):

Only include tweets containing this URL or domain. Example: github.com

## `card_name` (type: `string`):

Filter by poll or card type. Common values: poll2choice\_text\_only, poll3choice\_text\_only, poll4choice\_text\_only, poll2choice\_image, poll3choice\_image, poll4choice\_image.

## `includeRaw` (type: `boolean`):

API alias for Output Variant raw.

## `includeArticles` (type: `boolean`):

Deprecated compatibility input. Article data is already included when X provides it.

## `includeUnavailableFields` (type: `boolean`):

Deprecated compatibility input. Safe availability fields are already included when X provides them.

## `includeOriginalTweet` (type: `boolean`):

Deprecated compatibility input. Fetch source tweets separately with Tweet IDs.

## Actor input object example

```json
{
  "searchTerms": [
    "from:elonmusk AI",
    "#bitcoin lang:en"
  ],
  "texts": [
    "We shipped dark mode today. Try it and tell us what breaks."
  ],
  "maxItems": 1000,
  "analysis": {
    "targets": [
      {
        "name": "Sony",
        "aliases": [
          "Sony headphones",
          "WH-1000XM5",
          "WH-1000XM6"
        ]
      }
    ],
    "context": "Consumer headphones & customer service."
  },
  "monitor": {
    "maxBaselineRows": 100000
  },
  "twitterContent": "web scraping OR #datascience",
  "twitterHandles": [
    "elonmusk",
    "@nasa"
  ],
  "tweetIds": [
    "1846987139428634858"
  ],
  "listIds": [
    "1748648376080666720"
  ],
  "mode": "legacy",
  "queryType": "Latest + Top",
  "lang": "en",
  "filter:has_engagement": false,
  "include:nativeretweets": false,
  "filter:twimg": false,
  "filter:native_video": false,
  "filter:vine": false,
  "filter:consumer_video": false,
  "filter:pro_video": false,
  "filter:spaces": false,
  "filter:mentions": false,
  "filter:hashtags": false,
  "includeSearchTerms": true,
  "respectProfileSubpages": false,
  "min_faves": 0,
  "-min_faves": 0,
  "min_retweets": 0,
  "-min_retweets": 0,
  "min_replies": 0,
  "-min_replies": 0,
  "filter:blue_verified": false,
  "filter:nativeretweets": false,
  "filter:replies": false,
  "filter:quote": false,
  "filter:media": false,
  "filter:images": false,
  "filter:videos": false,
  "filter:links": false,
  "filter:news": false,
  "filter:safe": false,
  "within": "10km",
  "geocode": "37.7749,-122.4194,10km",
  "includeRaw": false,
  "includeArticles": false,
  "includeUnavailableFields": false,
  "includeOriginalTweet": false
}
```

# Actor output Schema

## `results` (type: `string`):

Original tweets with analysis status, typed answers & question versions. Failed analyses remain available without a result charge.

## `diagnostics` (type: `string`):

Free actionable diagnostics for empty, partial, invalid, aborted, or recovered runs. Real results remain in the dataset.

## `runReport` (type: `string`):

Outcome, completion reason, counts, pages, duration, and privacy-safe anomalies.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "(Sony OR \"WH-1000XM5\" OR \"WH-1000XM6\") (headphones OR earbuds) lang:en -filter:nativeretweets"
    ],
    "maxItems": 1000,
    "analysis": {
        "targets": [
            {
                "name": "Sony",
                "aliases": [
                    "Sony headphones",
                    "WH-1000XM5",
                    "WH-1000XM6"
                ]
            }
        ],
        "context": "Consumer headphones & customer service."
    },
    "monitor": {
        "maxBaselineRows": 100000
    },
    "queryType": "Latest + Top",
    "includeSearchTerms": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("xquik/x-twitter-brand-monitoring").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["(Sony OR \"WH-1000XM5\" OR \"WH-1000XM6\") (headphones OR earbuds) lang:en -filter:nativeretweets"],
    "maxItems": 1000,
    "analysis": {
        "targets": [{
                "name": "Sony",
                "aliases": [
                    "Sony headphones",
                    "WH-1000XM5",
                    "WH-1000XM6",
                ],
            }],
        "context": "Consumer headphones & customer service.",
    },
    "monitor": { "maxBaselineRows": 100000 },
    "queryType": "Latest + Top",
    "includeSearchTerms": True,
}

# Run the Actor and wait for it to finish
run = client.actor("xquik/x-twitter-brand-monitoring").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "(Sony OR \\"WH-1000XM5\\" OR \\"WH-1000XM6\\") (headphones OR earbuds) lang:en -filter:nativeretweets"
  ],
  "maxItems": 1000,
  "analysis": {
    "targets": [
      {
        "name": "Sony",
        "aliases": [
          "Sony headphones",
          "WH-1000XM5",
          "WH-1000XM6"
        ]
      }
    ],
    "context": "Consumer headphones & customer service."
  },
  "monitor": {
    "maxBaselineRows": 100000
  },
  "queryType": "Latest + Top",
  "includeSearchTerms": true
}' |
apify call xquik/x-twitter-brand-monitoring --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xquik/x-twitter-brand-monitoring"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lcFpie2p8OWzP0z8e/builds/bQVOuJsedcdJ0lG8G/openapi.json
