Twitter/X

The Twitter/X source collects posts, replies, and public account content from Twitter/X as part of a Data Stream.

📘

Datastreamer selects from available providers automatically based on your Job configuration. You do not need to manage provider accounts or credentials to use this source.


Configuring a Job

When creating a Job for the Twitter/X source, you define what content to collect. Common configuration options include:

  • Query: a search expression using Twitter/X advanced search syntax (see below)
  • Account targets: specific handles to monitor
  • Date range: the time window to collect data from
  • Language filter: restrict results to a specific language
  • Document limit: maximum number of documents per Job run

Refer to the Job creation documentation for full configuration details: Creating Jobs

⚠️

Do not include dates in your query string.

The Job system handles date ranges and historical searches. Including dates inside the query may cause errors or limit provider selection.


Twitter/X Query Syntax

Queries for the Twitter/X source use Twitter/X advanced search formatting. The table below covers the most common operators.

OperatorExampleDescription
Phrase"dog house"Exact phrase match
NOT-mouseExclude this term
Fromfrom:catPosts from this handle (no @ symbol)
Toto:dogPosts directed at this handle (no @ symbol)
Hashtag(#dogsrule)Hashtags in parentheses, always with # symbol
Languagelang:enISO 2-letter language code
Replies onlyfilter:repliesFilter to replies only (default includes both posts and replies)
Min repliesmin_replies:100Minimum reply count
Min likesmin_faves:100Minimum like count
Min retweetsmin_retweets:100Minimum retweet/repost count
Has linkfilter:linksOnly posts containing links

Twitter/X treats spaces as AND and uses negation with a minus sign rather than NOT. Examples:

IntentQueryBoolean equivalent
Either termcat OR dogcat OR dog
Both termscat dogcat AND dog
Exclude a term(cat OR dog) -mouse(cat OR dog) NOT mouse
Combined(cat OR dog) ferret(cat OR dog) AND ferret
Complex(cat OR dog) mouse from:parrot(cat OR dog) AND mouse AND from:parrot

For a full reference, see X Advanced Search.


What is Collected

Each document returned from the Twitter/X source represents a post or reply. Fields are mapped to the Datastreamer unified schema and include content text, author metadata, engagement metrics (likes, retweets, replies, quotes), and post date.

Platform-specific fields are available under the twitter schema namespace. See the Schema Reference for field details.


Troubleshooting

Job fails or returns no data

  • Check that the query syntax is valid
  • Verify the date range contains data
  • Confirm filters are not too restrictive
  • Review Job logs for specific errors

Unexpectedly high document counts

  • Add engagement filters (e.g. min_faves, min_retweets) to reduce volume
  • Set a document limit on the Job
  • Review the DVU pricing page

Provider switch noted in Job logs

  • This is expected behavior. If a provider is unavailable, the Job is routed to an alternative automatically. No action is required.

Related