An open API service indexing awesome lists of open source software.

https://github.com/bimross/twitter-client

twitter client to interface with twitter indexer
https://github.com/bimross/twitter-client

api client go indexer kubernetes twitter

Last synced: 3 months ago
JSON representation

twitter client to interface with twitter indexer

Awesome Lists containing this project

README

          

# twitter-client

[![GitHub stars](https://img.shields.io/github/stars/BimRoss/twitter-client?style=social)](https://github.com/BimRoss/twitter-client/stargazers)

Query composition toolkit for production Twitter/X search workflows.

`twitter-client` helps builders move from noisy keyword searches to deterministic, repeatable query pipelines.

## Why This Exists

Most teams do not lose because they lack data.
They lose because their queries are noisy.

## Advanced Search Operator Cheat Sheet

Use these building blocks to compose complex searches.

### Core text operators

- `bitcoin` - term match
- `"exact phrase"` - exact phrase match
- `(foo OR bar)` - any of the terms
- `foo bar` - both terms (AND)
- `-foo` - exclude a term
- `#bitcoin` - hashtag match
- `$TAO` - cashtag match

### Account and relationship operators

- `from:account` - posts authored by account
- `to:account` - replies directed to account
- `@account` - mentions account anywhere

### Content-type operators

- `has:links` - includes links
- `-has:links` - excludes links
- `has:images` - includes images
- `has:videos` - includes videos
- `has:media` - includes any media
- `is:reply` - replies only
- `-is:reply` - exclude replies
- `is:retweet` - retweets only
- `-is:retweet` - exclude retweets
- `is:quote` - quote posts only

### Engagement operators

- `min_faves:50` - at least 50 likes
- `min_retweets:10` - at least 10 reposts
- `min_replies:5` - at least 5 replies

### Time and ID boundary operators

- `since:2026-01-01` - from date forward
- `until:2026-01-31` - up to (not including) date
- `since_time:1710000000` - from unix timestamp
- `until_time:1710086400` - until unix timestamp
- `since_id:1891234567890123456` - newer than tweet ID
- `max_id:1892234567890123456` - older than/equal tweet ID

### Language and geo operators

- `lang:en` - English
- `lang:es` - Spanish
- `place_country:US` - country code
- `geocode:37.7749,-122.4194,25km` - radius search

## Notes On Compatibility

- Operator support can vary by backend implementation and API mode.
- This client passes query text through; it does not validate operators.
- If your backend ignores an operator, simplify to core operators first and add filters incrementally.

## Query Composition Patterns

- **Start broad, then narrow**: begin with topic terms, then add `from:`, date bounds, and engagement thresholds.
- **Prefer parentheses for OR logic**: `(ai OR "machine learning")`.
- **De-noise early**: add `-is:retweet -is:reply -has:links` when you want cleaner primary posts.
- **Use ID boundaries for pagination**: carry forward the oldest tweet ID as `max_id` in subsequent pulls.
- **Stabilize recurring jobs**: pin date or ID windows so repeated crawls are deterministic.

## Large Query Example Library

Copy/paste these directly and adapt account names, dates, and thresholds.

### 1) Account-focused examples

1. `from:jack`
2. `from:opentensor_`
3. `from:opentensor_ -is:retweet`
4. `from:opentensor_ -is:retweet -is:reply`
5. `from:opentensor_ has:links`
6. `from:opentensor_ has:media`
7. `from:opentensor_ has:videos`
8. `from:opentensor_ min_faves:100`
9. `from:opentensor_ min_retweets:25`
10. `from:opentensor_ min_replies:10`
11. `from:opentensor_ (bittensor OR subnet OR tao)`
12. `from:opentensor_ ("subnet 42" OR "subnet 19")`
13. `from:opentensor_ lang:en`
14. `from:opentensor_ since:2026-01-01`
15. `from:opentensor_ since:2026-01-01 until:2026-02-01`
16. `from:opentensor_ since_id:1891234567890123456`
17. `from:opentensor_ max_id:1892234567890123456`
18. `from:opentensor_ since_id:1891234567890123456 max_id:1892234567890123456`
19. `from:opentensor_ -has:links -has:media`
20. `from:opentensor_ ("release" OR "announcement") -is:retweet`

### 2) Mention and reply tracking

21. `to:opentensor_`
22. `to:opentensor_ -is:retweet`
23. `to:opentensor_ min_replies:2`
24. `@opentensor_`
25. `@opentensor_ -is:retweet`
26. `@opentensor_ ("bug" OR "issue" OR "help")`
27. `@opentensor_ ("thank you" OR "great work")`
28. `(@opentensor_ OR to:opentensor_) -is:retweet`
29. `(@opentensor_ OR to:opentensor_) since:2026-02-01`
30. `(@opentensor_ OR to:opentensor_) since_id:1893234567890123456`

### 3) Topic discovery

31. `bittensor`
32. `"bittensor subnet"`
33. `(bittensor OR tao OR "subnet 42")`
34. `(bittensor OR tao) -airdrop -giveaway`
35. `#bittensor`
36. `#bittensor #ai`
37. `($TAO OR #TAO) lang:en`
38. `("open source ai" OR "decentralized ai")`
39. `("subnet 42" OR "SN42")`
40. `("model serving" OR "inference") bittensor`

### 4) Engagement harvesting

41. `bittensor min_faves:100`
42. `bittensor min_retweets:20`
43. `bittensor min_replies:10`
44. `bittensor min_faves:100 min_retweets:20`
45. `("subnet 42" OR bittensor) min_faves:50 -is:retweet`
46. `from:opentensor_ min_faves:200 -is:reply`
47. `from:opentensor_ min_retweets:50 has:media`
48. `lang:en ai min_faves:500 -is:retweet`
49. `("launch" OR "released") min_faves:100 has:links`
50. `("thread" OR "guide") min_retweets:30 -has:videos`

### 5) Media and link intelligence

51. `bittensor has:links`
52. `bittensor -has:links`
53. `bittensor has:images`
54. `bittensor has:videos`
55. `bittensor has:media -is:retweet`
56. `from:opentensor_ has:media since:2026-01-01`
57. `("tutorial" OR "how to") has:videos`
58. `("dashboard" OR "metrics") has:images`
59. `("research paper" OR "preprint") has:links`
60. `("demo" OR "walkthrough") has:media min_faves:25`

### 6) Time-window filters

61. `bittensor since:2026-01-01`
62. `bittensor until:2026-01-15`
63. `bittensor since:2026-01-01 until:2026-01-31`
64. `from:opentensor_ since:2026-02-01 until:2026-02-08`
65. `("network update" OR "incident") since:2026-03-01`
66. `("validator" OR "miner") since:2026-03-01 until:2026-03-07`
67. `ai since_time:1710000000 until_time:1710086400`
68. `from:opentensor_ since_time:1710000000`
69. `@opentensor_ until_time:1710086400`
70. `("weekly recap" OR "week in review") since:2026-03-20 until:2026-03-27`

### 7) ID-based pagination and continuity

71. `bittensor since_id:1891234567890123456`
72. `bittensor max_id:1892234567890123456`
73. `bittensor since_id:1891234567890123456 max_id:1892234567890123456`
74. `from:opentensor_ since_id:1891234567890123456`
75. `from:opentensor_ max_id:1892234567890123456`
76. `from:opentensor_ since_id:1891234567890123456 max_id:1892234567890123456`
77. `(@opentensor_ OR to:opentensor_) since_id:1891234567890123456`
78. `("subnet 42" OR SN42) max_id:1892234567890123456`
79. `("tao" OR "$TAO") since_id:1891234567890123456 -is:retweet`
80. `("release" OR "announcement") from:opentensor_ since_id:1891234567890123456`

### 8) Reply, retweet, and quote controls

81. `bittensor is:reply`
82. `bittensor -is:reply`
83. `bittensor is:retweet`
84. `bittensor -is:retweet`
85. `bittensor is:quote`
86. `bittensor -is:quote`
87. `from:opentensor_ -is:retweet -is:reply`
88. `from:opentensor_ is:quote`
89. `@opentensor_ is:reply min_replies:1`
90. `("hot take" OR opinion) -is:retweet -is:reply`

### 9) Language and region examples

91. `bittensor lang:en`
92. `bittensor lang:es`
93. `bittensor lang:ja`
94. `("subnet" OR "validator") lang:fr`
95. `("ai agents" OR "autonomous agents") lang:de`
96. `bittensor place_country:US`
97. `bittensor place_country:GB`
98. `ai geocode:37.7749,-122.4194,25km`
99. `ai geocode:40.7128,-74.0060,50km`
100. `from:opentensor_ lang:en place_country:US`

### 10) Noise reduction patterns

101. `bittensor -airdrop -giveaway -promo`
102. `bittensor -is:retweet -is:reply`
103. `bittensor -has:links -is:retweet`
104. `("subnet 42" OR SN42) -airdrop -giveaway -is:retweet`
105. `("price prediction" OR "$TAO") -giveaway -contest`
106. `@opentensor_ -("gm" OR "gn") -is:retweet`
107. `("validator rewards" OR emissions) -meme -joke`
108. `("incident" OR outage) -filter:replies`
109. `("research update" OR benchmark) -is:retweet -has:links`
110. `("launch" OR release) -giveaway min_faves:10`

### 11) Research and monitoring templates

111. `("bittensor" AND "emissions") since:2026-01-01`
112. `("subnet 42" OR SN42) ("latency" OR "throughput")`
113. `("validator" OR "miner") ("guide" OR "tutorial") has:links`
114. `("security" OR exploit OR attack) bittensor -is:retweet`
115. `("downtime" OR outage OR degraded) from:opentensor_ OR @opentensor_`
116. `("roadmap" OR "release notes") from:opentensor_ has:links`
117. `("benchmark" OR "results") ("subnet 42" OR bittensor) has:images`
118. `("hiring" OR "we're hiring") (bittensor OR ai) has:links`
119. `("partnership" OR collaboration) (bittensor OR subnet) -is:retweet`
120. `("breaking" OR "just in") (bittensor OR "$TAO") min_retweets:5`

### 12) Ready-made production queries

121. `from:opentensor_ ("release" OR "announcement" OR "update") -is:retweet`
122. `(@opentensor_ OR to:opentensor_) ("bug" OR "issue" OR "help") -is:retweet`
123. `("subnet 42" OR SN42) min_faves:10 -is:retweet lang:en`
124. `bittensor has:links -is:retweet since:2026-03-01`
125. `("validator" OR "miner") bittensor min_replies:2 since:2026-03-01`
126. `("security" OR exploit OR "incident") (bittensor OR subnet) -is:retweet`
127. `from:opentensor_ since_id:1891234567890123456 -is:reply`
128. `("emissions" OR rewards) ("subnet 42" OR bittensor) has:images`
129. `("guide" OR tutorial OR walkthrough) bittensor has:videos`
130. `("partnership" OR integration) (bittensor OR ai) since:2026-01-01`

## Practical Workflow

1. Start with one of the production queries above.
2. Tune one dimension at a time (`from:`, then date/ID, then engagement).
3. Save known-good queries in code constants for repeatability.
4. For paginated crawls, use `since_id` and `max_id` windows.
5. Keep a "strict" and "broad" variant for each monitoring use case.

## Troubleshooting

- **Too few results**: remove one restrictive filter at a time (`min_*`, `-is:*`, date bounds).
- **Too noisy**: add `-is:retweet -is:reply`, plus anti-spam exclusions (`-airdrop -giveaway`).
- **Inconsistent windows**: prefer ID boundaries (`since_id`/`max_id`) over free-form date windows when possible.
- **Backend mismatch**: fallback to core operators (`from:`, phrase, exclusions, date range) and reintroduce advanced operators incrementally.

## Related BimRoss Projects

- [twitter-scraper](https://github.com/BimRoss/twitter-scraper)
- [twitter-worker](https://github.com/BimRoss/twitter-worker)
- [twitter-indexer](https://github.com/BimRoss/twitter-indexer)
- [subnet-signal](https://github.com/BimRoss/subnet-signal)

## Keywords

Twitter search operators, X query syntax, social media monitoring queries, keyword intelligence, production search filtering.

## Support

If this query system improves your signal quality, star the repo.