x-twitter-scraper 0.7.2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +3 -3
  4. data/lib/x_twitter_scraper/models/credit_topup_balance_response.rb +5 -5
  5. data/lib/x_twitter_scraper/models/draw_export_params.rb +8 -3
  6. data/lib/x_twitter_scraper/models/draw_list_params.rb +2 -2
  7. data/lib/x_twitter_scraper/models/error.rb +8 -0
  8. data/lib/x_twitter_scraper/models/event_list_params.rb +13 -5
  9. data/lib/x_twitter_scraper/models/extraction_estimate_cost_params.rb +731 -82
  10. data/lib/x_twitter_scraper/models/extraction_estimate_cost_response.rb +1 -0
  11. data/lib/x_twitter_scraper/models/extraction_export_results_params.rb +145 -1
  12. data/lib/x_twitter_scraper/models/extraction_list_params.rb +2 -2
  13. data/lib/x_twitter_scraper/models/extraction_retrieve_params.rb +70 -3
  14. data/lib/x_twitter_scraper/models/extraction_run_params.rb +662 -1
  15. data/lib/x_twitter_scraper/models/extraction_run_response.rb +27 -48
  16. data/lib/x_twitter_scraper/models/guest_wallet_create_response.rb +8 -8
  17. data/lib/x_twitter_scraper/models/guest_wallet_topup_response.rb +9 -9
  18. data/lib/x_twitter_scraper/models/monitor.rb +29 -1
  19. data/lib/x_twitter_scraper/models/paginated_tweets.rb +4 -4
  20. data/lib/x_twitter_scraper/models/paginated_users.rb +5 -5
  21. data/lib/x_twitter_scraper/models/support/attachment_download_params.rb +28 -0
  22. data/lib/x_twitter_scraper/models/x/community_retrieve_members_params.rb +113 -1
  23. data/lib/x_twitter_scraper/models/x/community_retrieve_moderators_params.rb +117 -1
  24. data/lib/x_twitter_scraper/models/x/list_retrieve_followers_params.rb +117 -6
  25. data/lib/x_twitter_scraper/models/x/list_retrieve_members_params.rb +116 -1
  26. data/lib/x_twitter_scraper/models/x/tweet_get_favoriters_params.rb +117 -6
  27. data/lib/x_twitter_scraper/models/x/tweet_get_quotes_params.rb +153 -1
  28. data/lib/x_twitter_scraper/models/x/tweet_get_replies_params.rb +246 -16
  29. data/lib/x_twitter_scraper/models/x/tweet_get_replies_response.rb +3 -2
  30. data/lib/x_twitter_scraper/models/x/tweet_get_retweeters_params.rb +117 -6
  31. data/lib/x_twitter_scraper/models/x/tweet_search_params.rb +187 -14
  32. data/lib/x_twitter_scraper/models/x/tweet_search_response.rb +299 -0
  33. data/lib/x_twitter_scraper/models/x/user_retrieve_followers_params.rb +143 -10
  34. data/lib/x_twitter_scraper/models/x/user_retrieve_followers_response.rb +241 -0
  35. data/lib/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rb +117 -6
  36. data/lib/x_twitter_scraper/models/x/user_retrieve_following_params.rb +143 -10
  37. data/lib/x_twitter_scraper/models/x/user_retrieve_following_response.rb +241 -0
  38. data/lib/x_twitter_scraper/models/x/user_retrieve_likes_params.rb +153 -1
  39. data/lib/x_twitter_scraper/models/x/user_retrieve_media_params.rb +153 -1
  40. data/lib/x_twitter_scraper/models/x/user_retrieve_mentions_params.rb +153 -1
  41. data/lib/x_twitter_scraper/models/x/user_retrieve_replies_params.rb +159 -7
  42. data/lib/x_twitter_scraper/models/x/user_retrieve_search_params.rb +116 -1
  43. data/lib/x_twitter_scraper/models/x/user_retrieve_tweets_params.rb +159 -7
  44. data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rb +157 -8
  45. data/lib/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rb +245 -0
  46. data/lib/x_twitter_scraper/models/x/x_account.rb +7 -11
  47. data/lib/x_twitter_scraper/resources/credits.rb +2 -2
  48. data/lib/x_twitter_scraper/resources/draws.rb +5 -2
  49. data/lib/x_twitter_scraper/resources/events.rb +10 -4
  50. data/lib/x_twitter_scraper/resources/extractions.rb +383 -84
  51. data/lib/x_twitter_scraper/resources/guest_wallets.rb +9 -13
  52. data/lib/x_twitter_scraper/resources/support/attachments.rb +42 -0
  53. data/lib/x_twitter_scraper/resources/support.rb +5 -0
  54. data/lib/x_twitter_scraper/resources/x/communities.rb +95 -4
  55. data/lib/x_twitter_scraper/resources/x/lists.rb +96 -5
  56. data/lib/x_twitter_scraper/resources/x/tweets.rb +286 -28
  57. data/lib/x_twitter_scraper/resources/x/users.rb +531 -41
  58. data/lib/x_twitter_scraper/version.rb +1 -1
  59. data/lib/x_twitter_scraper.rb +7 -1
  60. data/rbi/x_twitter_scraper/models/credit_topup_balance_response.rbi +6 -6
  61. data/rbi/x_twitter_scraper/models/draw_export_params.rbi +6 -3
  62. data/rbi/x_twitter_scraper/models/draw_list_params.rbi +2 -2
  63. data/rbi/x_twitter_scraper/models/error.rbi +40 -0
  64. data/rbi/x_twitter_scraper/models/event_list_params.rbi +15 -4
  65. data/rbi/x_twitter_scraper/models/extraction_estimate_cost_params.rbi +1338 -86
  66. data/rbi/x_twitter_scraper/models/extraction_estimate_cost_response.rbi +5 -0
  67. data/rbi/x_twitter_scraper/models/extraction_export_results_params.rbi +198 -0
  68. data/rbi/x_twitter_scraper/models/extraction_list_params.rbi +2 -2
  69. data/rbi/x_twitter_scraper/models/extraction_retrieve_params.rbi +194 -2
  70. data/rbi/x_twitter_scraper/models/extraction_run_params.rbi +1221 -0
  71. data/rbi/x_twitter_scraper/models/extraction_run_response.rbi +35 -162
  72. data/rbi/x_twitter_scraper/models/guest_wallet_create_response.rbi +8 -6
  73. data/rbi/x_twitter_scraper/models/guest_wallet_topup_response.rbi +9 -7
  74. data/rbi/x_twitter_scraper/models/monitor.rbi +54 -3
  75. data/rbi/x_twitter_scraper/models/paginated_tweets.rbi +4 -4
  76. data/rbi/x_twitter_scraper/models/paginated_users.rbi +5 -5
  77. data/rbi/x_twitter_scraper/models/support/attachment_download_params.rbi +51 -0
  78. data/rbi/x_twitter_scraper/models/x/community_retrieve_members_params.rbi +154 -0
  79. data/rbi/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbi +154 -0
  80. data/rbi/x_twitter_scraper/models/x/list_retrieve_followers_params.rbi +160 -8
  81. data/rbi/x_twitter_scraper/models/x/list_retrieve_members_params.rbi +154 -0
  82. data/rbi/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbi +160 -8
  83. data/rbi/x_twitter_scraper/models/x/tweet_get_quotes_params.rbi +209 -0
  84. data/rbi/x_twitter_scraper/models/x/tweet_get_replies_params.rbi +403 -20
  85. data/rbi/x_twitter_scraper/models/x/tweet_get_replies_response.rbi +3 -2
  86. data/rbi/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbi +160 -8
  87. data/rbi/x_twitter_scraper/models/x/tweet_search_params.rbi +279 -16
  88. data/rbi/x_twitter_scraper/models/x/tweet_search_response.rbi +543 -0
  89. data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_params.rbi +228 -12
  90. data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_response.rbi +440 -0
  91. data/rbi/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbi +160 -8
  92. data/rbi/x_twitter_scraper/models/x/user_retrieve_following_params.rbi +228 -12
  93. data/rbi/x_twitter_scraper/models/x/user_retrieve_following_response.rbi +440 -0
  94. data/rbi/x_twitter_scraper/models/x/user_retrieve_likes_params.rbi +209 -0
  95. data/rbi/x_twitter_scraper/models/x/user_retrieve_media_params.rbi +209 -0
  96. data/rbi/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbi +209 -0
  97. data/rbi/x_twitter_scraper/models/x/user_retrieve_replies_params.rbi +217 -8
  98. data/rbi/x_twitter_scraper/models/x/user_retrieve_search_params.rbi +154 -0
  99. data/rbi/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbi +217 -8
  100. data/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbi +248 -10
  101. data/rbi/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbi +440 -0
  102. data/rbi/x_twitter_scraper/models/x/x_account.rbi +9 -15
  103. data/rbi/x_twitter_scraper/resources/credits.rbi +2 -2
  104. data/rbi/x_twitter_scraper/resources/draws.rbi +3 -2
  105. data/rbi/x_twitter_scraper/resources/events.rbi +5 -2
  106. data/rbi/x_twitter_scraper/resources/extractions.rbi +525 -83
  107. data/rbi/x_twitter_scraper/resources/guest_wallets.rbi +9 -13
  108. data/rbi/x_twitter_scraper/resources/support/attachments.rbi +35 -0
  109. data/rbi/x_twitter_scraper/resources/support.rbi +4 -0
  110. data/rbi/x_twitter_scraper/resources/x/communities.rbi +84 -0
  111. data/rbi/x_twitter_scraper/resources/x/lists.rbi +87 -4
  112. data/rbi/x_twitter_scraper/resources/x/tweets.rbi +307 -31
  113. data/rbi/x_twitter_scraper/resources/x/users.rbi +558 -34
  114. data/sig/x_twitter_scraper/models/error.rbs +16 -0
  115. data/sig/x_twitter_scraper/models/event_list_params.rbs +7 -0
  116. data/sig/x_twitter_scraper/models/extraction_estimate_cost_params.rbs +605 -1
  117. data/sig/x_twitter_scraper/models/extraction_estimate_cost_response.rbs +2 -0
  118. data/sig/x_twitter_scraper/models/extraction_export_results_params.rbs +127 -1
  119. data/sig/x_twitter_scraper/models/extraction_retrieve_params.rbs +74 -1
  120. data/sig/x_twitter_scraper/models/extraction_run_params.rbs +611 -1
  121. data/sig/x_twitter_scraper/models/extraction_run_response.rbs +29 -67
  122. data/sig/x_twitter_scraper/models/guest_wallet_create_response.rbs +4 -4
  123. data/sig/x_twitter_scraper/models/guest_wallet_topup_response.rbs +4 -4
  124. data/sig/x_twitter_scraper/models/monitor.rbs +29 -3
  125. data/sig/x_twitter_scraper/models/support/attachment_download_params.rbs +32 -0
  126. data/sig/x_twitter_scraper/models/x/community_retrieve_members_params.rbs +103 -1
  127. data/sig/x_twitter_scraper/models/x/community_retrieve_moderators_params.rbs +102 -1
  128. data/sig/x_twitter_scraper/models/x/list_retrieve_followers_params.rbs +103 -1
  129. data/sig/x_twitter_scraper/models/x/list_retrieve_members_params.rbs +103 -1
  130. data/sig/x_twitter_scraper/models/x/tweet_get_favoriters_params.rbs +103 -1
  131. data/sig/x_twitter_scraper/models/x/tweet_get_quotes_params.rbs +134 -1
  132. data/sig/x_twitter_scraper/models/x/tweet_get_replies_params.rbs +207 -2
  133. data/sig/x_twitter_scraper/models/x/tweet_get_retweeters_params.rbs +103 -1
  134. data/sig/x_twitter_scraper/models/x/tweet_search_params.rbs +154 -1
  135. data/sig/x_twitter_scraper/models/x/tweet_search_response.rbs +258 -0
  136. data/sig/x_twitter_scraper/models/x/user_retrieve_followers_params.rbs +119 -1
  137. data/sig/x_twitter_scraper/models/x/user_retrieve_followers_response.rbs +216 -0
  138. data/sig/x_twitter_scraper/models/x/user_retrieve_followers_you_know_params.rbs +103 -1
  139. data/sig/x_twitter_scraper/models/x/user_retrieve_following_params.rbs +119 -1
  140. data/sig/x_twitter_scraper/models/x/user_retrieve_following_response.rbs +216 -0
  141. data/sig/x_twitter_scraper/models/x/user_retrieve_likes_params.rbs +134 -1
  142. data/sig/x_twitter_scraper/models/x/user_retrieve_media_params.rbs +134 -1
  143. data/sig/x_twitter_scraper/models/x/user_retrieve_mentions_params.rbs +134 -1
  144. data/sig/x_twitter_scraper/models/x/user_retrieve_replies_params.rbs +134 -1
  145. data/sig/x_twitter_scraper/models/x/user_retrieve_search_params.rbs +102 -1
  146. data/sig/x_twitter_scraper/models/x/user_retrieve_tweets_params.rbs +134 -1
  147. data/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_params.rbs +137 -1
  148. data/sig/x_twitter_scraper/models/x/user_retrieve_verified_followers_response.rbs +216 -0
  149. data/sig/x_twitter_scraper/resources/events.rbs +1 -0
  150. data/sig/x_twitter_scraper/resources/extractions.rbs +137 -0
  151. data/sig/x_twitter_scraper/resources/support/attachments.rbs +15 -0
  152. data/sig/x_twitter_scraper/resources/support.rbs +2 -0
  153. data/sig/x_twitter_scraper/resources/x/communities.rbs +28 -0
  154. data/sig/x_twitter_scraper/resources/x/lists.rbs +28 -0
  155. data/sig/x_twitter_scraper/resources/x/tweets.rbs +93 -1
  156. data/sig/x_twitter_scraper/resources/x/users.rbs +173 -3
  157. metadata +19 -1
@@ -30,6 +30,20 @@ module XTwitterScraper
30
30
  sig { params(any_words: String).void }
31
31
  attr_writer :any_words
32
32
 
33
+ # Only return tweets from Blue-verified authors.
34
+ sig { returns(T.nilable(T::Boolean)) }
35
+ attr_reader :blue_verified_only
36
+
37
+ sig { params(blue_verified_only: T::Boolean).void }
38
+ attr_writer :blue_verified_only
39
+
40
+ # Match the Tweet card name.
41
+ sig { returns(T.nilable(String)) }
42
+ attr_reader :card_name
43
+
44
+ sig { params(card_name: String).void }
45
+ attr_writer :card_name
46
+
33
47
  # Cashtags separated by spaces, commas, or lines.
34
48
  sig { returns(T.nilable(String)) }
35
49
  attr_reader :cashtags
@@ -44,7 +58,8 @@ module XTwitterScraper
44
58
  sig { params(conversation_id: String).void }
45
59
  attr_writer :conversation_id
46
60
 
47
- # Pagination cursor for user replies
61
+ # Cursor from the previous response. Xquik cursors resume automatic coverage.
62
+ # Existing unprefixed cursors keep legacy standard behavior.
48
63
  sig { returns(T.nilable(String)) }
49
64
  attr_reader :cursor
50
65
 
@@ -58,6 +73,13 @@ module XTwitterScraper
58
73
  sig { params(exact_phrase: String).void }
59
74
  attr_writer :exact_phrase
60
75
 
76
+ # Exclude a source application.
77
+ sig { returns(T.nilable(String)) }
78
+ attr_reader :exclude_source
79
+
80
+ sig { params(exclude_source: String).void }
81
+ attr_writer :exclude_source
82
+
61
83
  # Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
62
84
  sig { returns(T.nilable(String)) }
63
85
  attr_reader :exclude_words
@@ -72,6 +94,13 @@ module XTwitterScraper
72
94
  sig { params(from_user: String).void }
73
95
  attr_writer :from_user
74
96
 
97
+ # Match latitude, longitude, and radius.
98
+ sig { returns(T.nilable(String)) }
99
+ attr_reader :geocode
100
+
101
+ sig { params(geocode: String).void }
102
+ attr_writer :geocode
103
+
75
104
  # Hashtags separated by spaces, commas, or lines.
76
105
  sig { returns(T.nilable(String)) }
77
106
  attr_reader :hashtags
@@ -100,6 +129,41 @@ module XTwitterScraper
100
129
  sig { params(language: String).void }
101
130
  attr_writer :language
102
131
 
132
+ # Maximum likes threshold. maxLikes is also accepted.
133
+ sig { returns(T.nilable(Integer)) }
134
+ attr_reader :max_faves
135
+
136
+ sig { params(max_faves: Integer).void }
137
+ attr_writer :max_faves
138
+
139
+ # Return Tweets older than this Tweet ID.
140
+ sig { returns(T.nilable(String)) }
141
+ attr_reader :max_id
142
+
143
+ sig { params(max_id: String).void }
144
+ attr_writer :max_id
145
+
146
+ # Maximum quotes threshold.
147
+ sig { returns(T.nilable(Integer)) }
148
+ attr_reader :max_quotes
149
+
150
+ sig { params(max_quotes: Integer).void }
151
+ attr_writer :max_quotes
152
+
153
+ # Maximum replies threshold.
154
+ sig { returns(T.nilable(Integer)) }
155
+ attr_reader :max_replies
156
+
157
+ sig { params(max_replies: Integer).void }
158
+ attr_writer :max_replies
159
+
160
+ # Maximum retweets threshold.
161
+ sig { returns(T.nilable(Integer)) }
162
+ attr_reader :max_retweets
163
+
164
+ sig { params(max_retweets: Integer).void }
165
+ attr_writer :max_retweets
166
+
103
167
  # Filter by media type.
104
168
  sig do
105
169
  returns(
@@ -125,6 +189,13 @@ module XTwitterScraper
125
189
  sig { params(mentioning: String).void }
126
190
  attr_writer :mentioning
127
191
 
192
+ # Minimum bookmark count threshold.
193
+ sig { returns(T.nilable(Integer)) }
194
+ attr_reader :min_bookmarks
195
+
196
+ sig { params(min_bookmarks: Integer).void }
197
+ attr_writer :min_bookmarks
198
+
128
199
  # Minimum likes threshold.
129
200
  sig { returns(T.nilable(Integer)) }
130
201
  attr_reader :min_faves
@@ -153,9 +224,36 @@ module XTwitterScraper
153
224
  sig { params(min_retweets: Integer).void }
154
225
  attr_writer :min_retweets
155
226
 
156
- # Maximum page items (1-100, default 20). Source, filters, or credits can reduce
157
- # results. Continue while has_next_page is true. Deprecated limit and count
158
- # aliases remain accepted.
227
+ # Minimum view count threshold.
228
+ sig { returns(T.nilable(Integer)) }
229
+ attr_reader :min_views
230
+
231
+ sig { params(min_views: Integer).void }
232
+ attr_writer :min_views
233
+
234
+ # Only return native reposts.
235
+ sig { returns(T.nilable(T::Boolean)) }
236
+ attr_reader :native_retweets
237
+
238
+ sig { params(native_retweets: T::Boolean).void }
239
+ attr_writer :native_retweets
240
+
241
+ # Match a place name.
242
+ sig { returns(T.nilable(String)) }
243
+ attr_reader :near
244
+
245
+ sig { params(near: String).void }
246
+ attr_writer :near
247
+
248
+ # Only return news results.
249
+ sig { returns(T.nilable(T::Boolean)) }
250
+ attr_reader :news
251
+
252
+ sig { params(news: T::Boolean).void }
253
+ attr_writer :news
254
+
255
+ # Automatic pages accept 1-300 Tweets. Standard pages keep 1-100. Default 20.
256
+ # Continue while has_next_page is true. Deprecated aliases remain accepted.
159
257
  sig { returns(T.nilable(Integer)) }
160
258
  attr_reader :page_size
161
259
 
@@ -230,6 +328,13 @@ module XTwitterScraper
230
328
  sig { params(retweets_of_tweet_id: String).void }
231
329
  attr_writer :retweets_of_tweet_id
232
330
 
331
+ # Enable the safe-search filter.
332
+ sig { returns(T.nilable(T::Boolean)) }
333
+ attr_reader :safe
334
+
335
+ sig { params(safe: T::Boolean).void }
336
+ attr_writer :safe
337
+
233
338
  # Start date in YYYY-MM-DD format.
234
339
  sig { returns(T.nilable(Date)) }
235
340
  attr_reader :since_date
@@ -237,6 +342,20 @@ module XTwitterScraper
237
342
  sig { params(since_date: Date).void }
238
343
  attr_writer :since_date
239
344
 
345
+ # Return Tweets newer than this Tweet ID.
346
+ sig { returns(T.nilable(String)) }
347
+ attr_reader :since_id
348
+
349
+ sig { params(since_id: String).void }
350
+ attr_writer :since_id
351
+
352
+ # Match the source application.
353
+ sig { returns(T.nilable(String)) }
354
+ attr_reader :source
355
+
356
+ sig { params(source: String).void }
357
+ attr_writer :source
358
+
240
359
  # Filter replies sent to a username.
241
360
  sig { returns(T.nilable(String)) }
242
361
  attr_reader :to_user
@@ -265,27 +384,55 @@ module XTwitterScraper
265
384
  sig { params(verified_only: T::Boolean).void }
266
385
  attr_writer :verified_only
267
386
 
387
+ # Set the radius for the near filter.
388
+ sig { returns(T.nilable(String)) }
389
+ attr_reader :within
390
+
391
+ sig { params(within: String).void }
392
+ attr_writer :within
393
+
394
+ # Match Tweets inside a recent time window.
395
+ sig { returns(T.nilable(String)) }
396
+ attr_reader :within_time
397
+
398
+ sig { params(within_time: String).void }
399
+ attr_writer :within_time
400
+
268
401
  sig do
269
402
  params(
270
403
  id: String,
271
404
  any_words: String,
405
+ blue_verified_only: T::Boolean,
406
+ card_name: String,
272
407
  cashtags: String,
273
408
  conversation_id: String,
274
409
  cursor: String,
275
410
  exact_phrase: String,
411
+ exclude_source: String,
276
412
  exclude_words: String,
277
413
  from_user: String,
414
+ geocode: String,
278
415
  hashtags: String,
279
416
  include_parent_tweet: T::Boolean,
280
417
  in_reply_to_tweet_id: String,
281
418
  language: String,
419
+ max_faves: Integer,
420
+ max_id: String,
421
+ max_quotes: Integer,
422
+ max_replies: Integer,
423
+ max_retweets: Integer,
282
424
  media_type:
283
425
  XTwitterScraper::X::UserRetrieveRepliesParams::MediaType::OrSymbol,
284
426
  mentioning: String,
427
+ min_bookmarks: Integer,
285
428
  min_faves: Integer,
286
429
  min_quotes: Integer,
287
430
  min_replies: Integer,
288
431
  min_retweets: Integer,
432
+ min_views: Integer,
433
+ native_retweets: T::Boolean,
434
+ near: String,
435
+ news: T::Boolean,
289
436
  page_size: Integer,
290
437
  quotes:
291
438
  XTwitterScraper::X::UserRetrieveRepliesParams::Quotes::OrSymbol,
@@ -295,11 +442,16 @@ module XTwitterScraper
295
442
  retweets:
296
443
  XTwitterScraper::X::UserRetrieveRepliesParams::Retweets::OrSymbol,
297
444
  retweets_of_tweet_id: String,
445
+ safe: T::Boolean,
298
446
  since_date: Date,
447
+ since_id: String,
448
+ source: String,
299
449
  to_user: String,
300
450
  until_date: Date,
301
451
  url: String,
302
452
  verified_only: T::Boolean,
453
+ within: String,
454
+ within_time: String,
303
455
  request_options: XTwitterScraper::RequestOptions::OrHash
304
456
  ).returns(T.attached_class)
305
457
  end
@@ -308,18 +460,27 @@ module XTwitterScraper
308
460
  # Words or quoted phrases where any one can match. Separate with spaces, commas,
309
461
  # or lines.
310
462
  any_words: nil,
463
+ # Only return tweets from Blue-verified authors.
464
+ blue_verified_only: nil,
465
+ # Match the Tweet card name.
466
+ card_name: nil,
311
467
  # Cashtags separated by spaces, commas, or lines.
312
468
  cashtags: nil,
313
469
  # Conversation ID filter.
314
470
  conversation_id: nil,
315
- # Pagination cursor for user replies
471
+ # Cursor from the previous response. Xquik cursors resume automatic coverage.
472
+ # Existing unprefixed cursors keep legacy standard behavior.
316
473
  cursor: nil,
317
474
  # Exact phrase to match.
318
475
  exact_phrase: nil,
476
+ # Exclude a source application.
477
+ exclude_source: nil,
319
478
  # Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
320
479
  exclude_words: nil,
321
480
  # Filter by author username.
322
481
  from_user: nil,
482
+ # Match latitude, longitude, and radius.
483
+ geocode: nil,
323
484
  # Hashtags separated by spaces, commas, or lines.
324
485
  hashtags: nil,
325
486
  # Include each reply's parent tweet.
@@ -328,10 +489,22 @@ module XTwitterScraper
328
489
  in_reply_to_tweet_id: nil,
329
490
  # Language code filter, e.g. en or tr.
330
491
  language: nil,
492
+ # Maximum likes threshold. maxLikes is also accepted.
493
+ max_faves: nil,
494
+ # Return Tweets older than this Tweet ID.
495
+ max_id: nil,
496
+ # Maximum quotes threshold.
497
+ max_quotes: nil,
498
+ # Maximum replies threshold.
499
+ max_replies: nil,
500
+ # Maximum retweets threshold.
501
+ max_retweets: nil,
331
502
  # Filter by media type.
332
503
  media_type: nil,
333
504
  # Filter tweets mentioning a username.
334
505
  mentioning: nil,
506
+ # Minimum bookmark count threshold.
507
+ min_bookmarks: nil,
335
508
  # Minimum likes threshold.
336
509
  min_faves: nil,
337
510
  # Minimum quote count threshold.
@@ -340,9 +513,16 @@ module XTwitterScraper
340
513
  min_replies: nil,
341
514
  # Minimum retweets threshold.
342
515
  min_retweets: nil,
343
- # Maximum page items (1-100, default 20). Source, filters, or credits can reduce
344
- # results. Continue while has_next_page is true. Deprecated limit and count
345
- # aliases remain accepted.
516
+ # Minimum view count threshold.
517
+ min_views: nil,
518
+ # Only return native reposts.
519
+ native_retweets: nil,
520
+ # Match a place name.
521
+ near: nil,
522
+ # Only return news results.
523
+ news: nil,
524
+ # Automatic pages accept 1-300 Tweets. Standard pages keep 1-100. Default 20.
525
+ # Continue while has_next_page is true. Deprecated aliases remain accepted.
346
526
  page_size: nil,
347
527
  # Quote mode.
348
528
  quotes: nil,
@@ -354,8 +534,14 @@ module XTwitterScraper
354
534
  retweets: nil,
355
535
  # Only retweets of this tweet ID.
356
536
  retweets_of_tweet_id: nil,
537
+ # Enable the safe-search filter.
538
+ safe: nil,
357
539
  # Start date in YYYY-MM-DD format.
358
540
  since_date: nil,
541
+ # Return Tweets newer than this Tweet ID.
542
+ since_id: nil,
543
+ # Match the source application.
544
+ source: nil,
359
545
  # Filter replies sent to a username.
360
546
  to_user: nil,
361
547
  # End date in YYYY-MM-DD format.
@@ -364,6 +550,10 @@ module XTwitterScraper
364
550
  url: nil,
365
551
  # Only return tweets from verified authors.
366
552
  verified_only: nil,
553
+ # Set the radius for the near filter.
554
+ within: nil,
555
+ # Match Tweets inside a recent time window.
556
+ within_time: nil,
367
557
  request_options: {}
368
558
  )
369
559
  end
@@ -373,23 +563,37 @@ module XTwitterScraper
373
563
  {
374
564
  id: String,
375
565
  any_words: String,
566
+ blue_verified_only: T::Boolean,
567
+ card_name: String,
376
568
  cashtags: String,
377
569
  conversation_id: String,
378
570
  cursor: String,
379
571
  exact_phrase: String,
572
+ exclude_source: String,
380
573
  exclude_words: String,
381
574
  from_user: String,
575
+ geocode: String,
382
576
  hashtags: String,
383
577
  include_parent_tweet: T::Boolean,
384
578
  in_reply_to_tweet_id: String,
385
579
  language: String,
580
+ max_faves: Integer,
581
+ max_id: String,
582
+ max_quotes: Integer,
583
+ max_replies: Integer,
584
+ max_retweets: Integer,
386
585
  media_type:
387
586
  XTwitterScraper::X::UserRetrieveRepliesParams::MediaType::OrSymbol,
388
587
  mentioning: String,
588
+ min_bookmarks: Integer,
389
589
  min_faves: Integer,
390
590
  min_quotes: Integer,
391
591
  min_replies: Integer,
392
592
  min_retweets: Integer,
593
+ min_views: Integer,
594
+ native_retweets: T::Boolean,
595
+ near: String,
596
+ news: T::Boolean,
393
597
  page_size: Integer,
394
598
  quotes:
395
599
  XTwitterScraper::X::UserRetrieveRepliesParams::Quotes::OrSymbol,
@@ -399,11 +603,16 @@ module XTwitterScraper
399
603
  retweets:
400
604
  XTwitterScraper::X::UserRetrieveRepliesParams::Retweets::OrSymbol,
401
605
  retweets_of_tweet_id: String,
606
+ safe: T::Boolean,
402
607
  since_date: Date,
608
+ since_id: String,
609
+ source: String,
403
610
  to_user: String,
404
611
  until_date: Date,
405
612
  url: String,
406
613
  verified_only: T::Boolean,
614
+ within: String,
615
+ within_time: String,
407
616
  request_options: XTwitterScraper::RequestOptions
408
617
  }
409
618
  )
@@ -23,6 +23,13 @@ module XTwitterScraper
23
23
  sig { returns(String) }
24
24
  attr_accessor :q
25
25
 
26
+ # Match any comma-separated or line-separated bio term, ignoring case.
27
+ sig { returns(T.nilable(String)) }
28
+ attr_reader :bio_contains
29
+
30
+ sig { params(bio_contains: String).void }
31
+ attr_writer :bio_contains
32
+
26
33
  # Pagination cursor for user search
27
34
  sig { returns(T.nilable(String)) }
28
35
  attr_reader :cursor
@@ -30,18 +37,151 @@ module XTwitterScraper
30
37
  sig { params(cursor: String).void }
31
38
  attr_writer :cursor
32
39
 
40
+ # Only return profiles with a location.
41
+ sig { returns(T.nilable(T::Boolean)) }
42
+ attr_reader :has_location
43
+
44
+ sig { params(has_location: T::Boolean).void }
45
+ attr_writer :has_location
46
+
47
+ # Only return profiles with a website.
48
+ sig { returns(T.nilable(T::Boolean)) }
49
+ attr_reader :has_website
50
+
51
+ sig { params(has_website: T::Boolean).void }
52
+ attr_writer :has_website
53
+
54
+ # Match a location substring, ignoring case.
55
+ sig { returns(T.nilable(String)) }
56
+ attr_reader :location_contains
57
+
58
+ sig { params(location_contains: String).void }
59
+ attr_writer :location_contains
60
+
61
+ # Maximum follower count. Missing counts pass this maximum.
62
+ sig { returns(T.nilable(Integer)) }
63
+ attr_reader :max_followers
64
+
65
+ sig { params(max_followers: Integer).void }
66
+ attr_writer :max_followers
67
+
68
+ # Maximum following count.
69
+ sig { returns(T.nilable(Integer)) }
70
+ attr_reader :max_following
71
+
72
+ sig { params(max_following: Integer).void }
73
+ attr_writer :max_following
74
+
75
+ # Maximum post count. maxPosts is also accepted.
76
+ sig { returns(T.nilable(Integer)) }
77
+ attr_reader :max_statuses
78
+
79
+ sig { params(max_statuses: Integer).void }
80
+ attr_writer :max_statuses
81
+
82
+ # Minimum account age in whole days.
83
+ sig { returns(T.nilable(Integer)) }
84
+ attr_reader :min_account_age_days
85
+
86
+ sig { params(min_account_age_days: Integer).void }
87
+ attr_writer :min_account_age_days
88
+
89
+ # Minimum follower count. Filtering happens before billing.
90
+ sig { returns(T.nilable(Integer)) }
91
+ attr_reader :min_followers
92
+
93
+ sig { params(min_followers: Integer).void }
94
+ attr_writer :min_followers
95
+
96
+ # Minimum following count.
97
+ sig { returns(T.nilable(Integer)) }
98
+ attr_reader :min_following
99
+
100
+ sig { params(min_following: Integer).void }
101
+ attr_writer :min_following
102
+
103
+ # Minimum post count. minPosts is also accepted.
104
+ sig { returns(T.nilable(Integer)) }
105
+ attr_reader :min_statuses
106
+
107
+ sig { params(min_statuses: Integer).void }
108
+ attr_writer :min_statuses
109
+
110
+ # Match a username substring, ignoring case.
111
+ sig { returns(T.nilable(String)) }
112
+ attr_reader :username_contains
113
+
114
+ sig { params(username_contains: String).void }
115
+ attr_writer :username_contains
116
+
117
+ # Only return verified profiles.
118
+ sig { returns(T.nilable(T::Boolean)) }
119
+ attr_reader :verified_only
120
+
121
+ sig { params(verified_only: T::Boolean).void }
122
+ attr_writer :verified_only
123
+
124
+ # Match the verification type exactly, ignoring case.
125
+ sig { returns(T.nilable(String)) }
126
+ attr_reader :verified_type
127
+
128
+ sig { params(verified_type: String).void }
129
+ attr_writer :verified_type
130
+
33
131
  sig do
34
132
  params(
35
133
  q: String,
134
+ bio_contains: String,
36
135
  cursor: String,
136
+ has_location: T::Boolean,
137
+ has_website: T::Boolean,
138
+ location_contains: String,
139
+ max_followers: Integer,
140
+ max_following: Integer,
141
+ max_statuses: Integer,
142
+ min_account_age_days: Integer,
143
+ min_followers: Integer,
144
+ min_following: Integer,
145
+ min_statuses: Integer,
146
+ username_contains: String,
147
+ verified_only: T::Boolean,
148
+ verified_type: String,
37
149
  request_options: XTwitterScraper::RequestOptions::OrHash
38
150
  ).returns(T.attached_class)
39
151
  end
40
152
  def self.new(
41
153
  # User search query
42
154
  q:,
155
+ # Match any comma-separated or line-separated bio term, ignoring case.
156
+ bio_contains: nil,
43
157
  # Pagination cursor for user search
44
158
  cursor: nil,
159
+ # Only return profiles with a location.
160
+ has_location: nil,
161
+ # Only return profiles with a website.
162
+ has_website: nil,
163
+ # Match a location substring, ignoring case.
164
+ location_contains: nil,
165
+ # Maximum follower count. Missing counts pass this maximum.
166
+ max_followers: nil,
167
+ # Maximum following count.
168
+ max_following: nil,
169
+ # Maximum post count. maxPosts is also accepted.
170
+ max_statuses: nil,
171
+ # Minimum account age in whole days.
172
+ min_account_age_days: nil,
173
+ # Minimum follower count. Filtering happens before billing.
174
+ min_followers: nil,
175
+ # Minimum following count.
176
+ min_following: nil,
177
+ # Minimum post count. minPosts is also accepted.
178
+ min_statuses: nil,
179
+ # Match a username substring, ignoring case.
180
+ username_contains: nil,
181
+ # Only return verified profiles.
182
+ verified_only: nil,
183
+ # Match the verification type exactly, ignoring case.
184
+ verified_type: nil,
45
185
  request_options: {}
46
186
  )
47
187
  end
@@ -50,7 +190,21 @@ module XTwitterScraper
50
190
  override.returns(
51
191
  {
52
192
  q: String,
193
+ bio_contains: String,
53
194
  cursor: String,
195
+ has_location: T::Boolean,
196
+ has_website: T::Boolean,
197
+ location_contains: String,
198
+ max_followers: Integer,
199
+ max_following: Integer,
200
+ max_statuses: Integer,
201
+ min_account_age_days: Integer,
202
+ min_followers: Integer,
203
+ min_following: Integer,
204
+ min_statuses: Integer,
205
+ username_contains: String,
206
+ verified_only: T::Boolean,
207
+ verified_type: String,
54
208
  request_options: XTwitterScraper::RequestOptions
55
209
  }
56
210
  )