XFlux

Blog/

Twitter Search Operators for Agents (from:, lang:, quotes)

Copy-paste Twitter search operators for an API or MCP tool: from:handle, lang:en, quoted phrases, OR, and minus. Free tier: 1,000 calls/month.

Pass operators in q

XFlux GET /api/v1/search takes the query in q. Agents should use the same string with the MCP tool xflux_search_tweets. Operators match common public search grammar. This is not the official X recent-search product.

Cheat sheet page: /twitter-search-operators. Longer operator notes: /docs/guides/search and /blog/twitter-api-search-operators.

curl -G "https://www.xfluxapi.com/api/v1/search" \
  --data-urlencode 'q=from:elonmusk lang:en' \
  -H "Authorization: Bearer xflux_YOUR_KEY"

Operators worth using

from:elonmusk — only that account. No @ in the operator.

lang:en — language filter.

"fed rate" — exact phrase. Combine with OR: "fed rate" OR "rate cut".

-is:reply — drop replies when the parameter is supported by the query parser you are using. If a result set is still noisy, tighten from: and a short phrase instead of a bare keyword.

A bare keyword like CPI burns quota on memes. Prefer from: plus a phrase.

Tell an agent to call search

After the MCP server is installed (/mcp), a prompt that works: Search recent English posts from @elonmusk about rates using xflux_search_tweets. Do not scrape.

Search is on demand. To get a Slack or Discord message every time an account posts, use a monitor (/monitor-twitter-account) instead of polling search in a loop.

FAQ

Do these operators work in Claude or Cursor?
Yes, through xflux_search_tweets on @xflux/xflux-mcp-server. Put the operator string in q.
Are since: and until: supported?
See /docs/guides/search and /blog/twitter-api-search-operators for the operator list and date bounds.
Search or a monitor?
Search answers a question now. A monitor watches one @handle continuously.

Build with XFlux

Free tier for reads and one monitor. Starter from $19/mo for signed webhooks and faster polling.

More from the blog

Twitter Search Operators for Agents (from:, lang:, quotes) | XFlux