x-twitter-scraper 0.11.0 → 0.12.1

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 (45) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.js +1 -1
  3. package/client.js.map +1 -1
  4. package/client.mjs +1 -1
  5. package/client.mjs.map +1 -1
  6. package/internal/detect-platform.d.mts.map +1 -1
  7. package/internal/detect-platform.d.ts.map +1 -1
  8. package/internal/detect-platform.js +1 -1
  9. package/internal/detect-platform.js.map +1 -1
  10. package/internal/detect-platform.mjs +1 -1
  11. package/internal/detect-platform.mjs.map +1 -1
  12. package/internal/to-file.d.mts.map +1 -1
  13. package/internal/to-file.d.ts.map +1 -1
  14. package/internal/to-file.js.map +1 -1
  15. package/internal/to-file.mjs.map +1 -1
  16. package/package.json +1 -2
  17. package/resources/shared.d.mts +2 -2
  18. package/resources/shared.d.mts.map +1 -1
  19. package/resources/shared.d.ts +2 -2
  20. package/resources/shared.d.ts.map +1 -1
  21. package/resources/x/tweets/tweets.d.mts +135 -4
  22. package/resources/x/tweets/tweets.d.mts.map +1 -1
  23. package/resources/x/tweets/tweets.d.ts +135 -4
  24. package/resources/x/tweets/tweets.d.ts.map +1 -1
  25. package/resources/x/tweets/tweets.js +3 -1
  26. package/resources/x/tweets/tweets.js.map +1 -1
  27. package/resources/x/tweets/tweets.mjs +3 -1
  28. package/resources/x/tweets/tweets.mjs.map +1 -1
  29. package/resources/x/users/users.d.mts +5 -5
  30. package/resources/x/users/users.d.mts.map +1 -1
  31. package/resources/x/users/users.d.ts +5 -5
  32. package/resources/x/users/users.d.ts.map +1 -1
  33. package/resources/x/users/users.js.map +1 -1
  34. package/resources/x/users/users.mjs.map +1 -1
  35. package/src/client.ts +1 -1
  36. package/src/internal/detect-platform.ts +2 -10
  37. package/src/internal/to-file.ts +1 -4
  38. package/src/resources/shared.ts +12 -0
  39. package/src/resources/x/tweets/tweets.ts +172 -13
  40. package/src/resources/x/users/users.ts +23 -38
  41. package/src/version.ts +1 -1
  42. package/version.d.mts +1 -1
  43. package/version.d.ts +1 -1
  44. package/version.js +1 -1
  45. package/version.mjs +1 -1
@@ -336,12 +336,17 @@ export interface Error {
336
336
  | 'idempotency_conflict'
337
337
  | 'idempotency_key_conflict'
338
338
  | 'invalid_community_id'
339
+ | 'invalid_complete_replies_request'
339
340
  | 'invalid_coverage_cursor'
341
+ | 'invalid_coverage_request'
340
342
  | 'invalid_idempotency_key'
341
343
  | 'invalid_list_id'
344
+ | 'invalid_output_options'
342
345
  | 'invalid_payment_amount'
343
346
  | 'invalid_range'
347
+ | 'invalid_reply_options'
344
348
  | 'login_rate_limited'
349
+ | 'login_service_unavailable'
345
350
  | 'missing_idempotency_key'
346
351
  | 'missing_ids'
347
352
  | 'no_cached_style'
@@ -352,6 +357,7 @@ export interface Error {
352
357
  | 'support_media_rate_limit'
353
358
  | 'support_request_rate_limit'
354
359
  | 'too_many_ids'
360
+ | 'too_many_tweets'
355
361
  | 'unknown_field'
356
362
  | 'unsupported_media_type'
357
363
  | 'webhook_inactive'
@@ -465,12 +471,17 @@ export namespace Error {
465
471
  | 'idempotency_conflict'
466
472
  | 'idempotency_key_conflict'
467
473
  | 'invalid_community_id'
474
+ | 'invalid_complete_replies_request'
468
475
  | 'invalid_coverage_cursor'
476
+ | 'invalid_coverage_request'
469
477
  | 'invalid_idempotency_key'
470
478
  | 'invalid_list_id'
479
+ | 'invalid_output_options'
471
480
  | 'invalid_payment_amount'
472
481
  | 'invalid_range'
482
+ | 'invalid_reply_options'
473
483
  | 'login_rate_limited'
484
+ | 'login_service_unavailable'
474
485
  | 'missing_idempotency_key'
475
486
  | 'missing_ids'
476
487
  | 'no_cached_style'
@@ -481,6 +492,7 @@ export namespace Error {
481
492
  | 'support_media_rate_limit'
482
493
  | 'support_request_rate_limit'
483
494
  | 'too_many_ids'
495
+ | 'too_many_tweets'
484
496
  | 'unknown_field'
485
497
  | 'unsupported_media_type'
486
498
  | 'webhook_inactive'
@@ -185,7 +185,9 @@ export class Tweets extends APIResource {
185
185
  }
186
186
 
187
187
  /**
188
- * No-mode search maximizes coverage.
188
+ * No-mode search maximizes coverage. New cursorless `Latest` sessions return rows
189
+ * newest-first across cursor pages. Existing cursors preserve their established
190
+ * ordering.
189
191
  *
190
192
  * @example
191
193
  * ```ts
@@ -1210,8 +1212,10 @@ export namespace TweetSearchResponse {
1210
1212
  * cursors remain legacy. Follow next_cursor while has_next_page is true. An empty
1211
1213
  * filtered page can still have has_next_page true.
1212
1214
  */
1213
- export interface TweetSearchCoverageResponse
1214
- extends Omit<Shared.PaginatedTweets, 'has_next_page' | 'next_cursor'> {
1215
+ export interface TweetSearchCoverageResponse extends Omit<
1216
+ Shared.PaginatedTweets,
1217
+ 'has_next_page' | 'next_cursor'
1218
+ > {
1215
1219
  /**
1216
1220
  * Coverage evidence across parallel search strategies.
1217
1221
  */
@@ -1276,13 +1280,7 @@ export namespace TweetSearchResponse {
1276
1280
  queryType: 'Latest' | 'Top';
1277
1281
 
1278
1282
  stopReason:
1279
- | 'cursor_failure'
1280
- | 'deadline'
1281
- | 'exhausted'
1282
- | 'failed'
1283
- | 'page_limit'
1284
- | 'result_limit'
1285
- | 'stalled';
1283
+ 'cursor_failure' | 'deadline' | 'exhausted' | 'failed' | 'page_limit' | 'result_limit' | 'stalled';
1286
1284
 
1287
1285
  strategy: number;
1288
1286
 
@@ -1574,7 +1572,7 @@ export interface TweetGetQuotesParams {
1574
1572
  minBookmarks?: number;
1575
1573
 
1576
1574
  /**
1577
- * Minimum likes threshold.
1575
+ * Minimum likes threshold. minLikes is also accepted.
1578
1576
  */
1579
1577
  minFaves?: number;
1580
1578
 
@@ -1847,7 +1845,7 @@ export interface TweetGetRepliesParams {
1847
1845
  minBookmarks?: number;
1848
1846
 
1849
1847
  /**
1850
- * Minimum likes threshold.
1848
+ * Minimum likes threshold. minLikes is also accepted.
1851
1849
  */
1852
1850
  minFaves?: number;
1853
1851
 
@@ -2081,17 +2079,178 @@ export interface TweetGetRetweetersParams {
2081
2079
  }
2082
2080
 
2083
2081
  export interface TweetGetThreadParams {
2082
+ /**
2083
+ * Words or quoted phrases where any one can match. Separate with spaces, commas,
2084
+ * or lines.
2085
+ */
2086
+ anyWords?: string;
2087
+
2088
+ /**
2089
+ * Only return tweets from Blue-verified authors.
2090
+ */
2091
+ blueVerifiedOnly?: boolean;
2092
+
2093
+ /**
2094
+ * Cashtags separated by spaces, commas, or lines.
2095
+ */
2096
+ cashtags?: string;
2097
+
2098
+ /**
2099
+ * Conversation ID filter.
2100
+ */
2101
+ conversationId?: string;
2102
+
2084
2103
  /**
2085
2104
  * Pagination cursor for thread tweets
2086
2105
  */
2087
2106
  cursor?: string;
2088
2107
 
2108
+ /**
2109
+ * Exact phrase to match.
2110
+ */
2111
+ exactPhrase?: string;
2112
+
2113
+ /**
2114
+ * Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
2115
+ */
2116
+ excludeWords?: string;
2117
+
2118
+ /**
2119
+ * Filter by author username.
2120
+ */
2121
+ fromUser?: string;
2122
+
2123
+ /**
2124
+ * Hashtags separated by spaces, commas, or lines.
2125
+ */
2126
+ hashtags?: string;
2127
+
2128
+ /**
2129
+ * Only replies to this tweet ID.
2130
+ */
2131
+ inReplyToTweetId?: string;
2132
+
2133
+ /**
2134
+ * Language code filter, e.g. en or tr.
2135
+ */
2136
+ language?: string;
2137
+
2138
+ /**
2139
+ * Maximum likes threshold. maxLikes is also accepted.
2140
+ */
2141
+ maxFaves?: number;
2142
+
2143
+ /**
2144
+ * Maximum quotes threshold.
2145
+ */
2146
+ maxQuotes?: number;
2147
+
2148
+ /**
2149
+ * Maximum replies threshold.
2150
+ */
2151
+ maxReplies?: number;
2152
+
2153
+ /**
2154
+ * Maximum retweets threshold.
2155
+ */
2156
+ maxRetweets?: number;
2157
+
2158
+ /**
2159
+ * Filter by media type.
2160
+ */
2161
+ mediaType?: 'images' | 'videos' | 'gifs' | 'media' | 'links' | 'none';
2162
+
2163
+ /**
2164
+ * Filter tweets mentioning a username.
2165
+ */
2166
+ mentioning?: string;
2167
+
2168
+ /**
2169
+ * Minimum bookmark count threshold.
2170
+ */
2171
+ minBookmarks?: number;
2172
+
2173
+ /**
2174
+ * Minimum likes threshold. minLikes is also accepted.
2175
+ */
2176
+ minFaves?: number;
2177
+
2178
+ /**
2179
+ * Minimum quote count threshold.
2180
+ */
2181
+ minQuotes?: number;
2182
+
2183
+ /**
2184
+ * Minimum replies threshold.
2185
+ */
2186
+ minReplies?: number;
2187
+
2188
+ /**
2189
+ * Minimum retweets threshold.
2190
+ */
2191
+ minRetweets?: number;
2192
+
2193
+ /**
2194
+ * Minimum view count threshold.
2195
+ */
2196
+ minViews?: number;
2197
+
2089
2198
  /**
2090
2199
  * Maximum page items (1-100, default 20). Source, filters, or credits can reduce
2091
2200
  * results. Continue while has_next_page is true. Deprecated limit and count
2092
2201
  * aliases remain accepted.
2093
2202
  */
2094
2203
  pageSize?: number;
2204
+
2205
+ /**
2206
+ * Quote mode.
2207
+ */
2208
+ quotes?: 'include' | 'exclude' | 'only';
2209
+
2210
+ /**
2211
+ * Only quotes of this tweet ID.
2212
+ */
2213
+ quotesOfTweetId?: string;
2214
+
2215
+ /**
2216
+ * Reply mode.
2217
+ */
2218
+ replies?: 'include' | 'exclude' | 'only';
2219
+
2220
+ /**
2221
+ * Retweet mode.
2222
+ */
2223
+ retweets?: 'include' | 'exclude' | 'only';
2224
+
2225
+ /**
2226
+ * Only retweets of this tweet ID.
2227
+ */
2228
+ retweetsOfTweetId?: string;
2229
+
2230
+ /**
2231
+ * Start date in YYYY-MM-DD format.
2232
+ */
2233
+ sinceDate?: string;
2234
+
2235
+ /**
2236
+ * Filter replies sent to a username.
2237
+ */
2238
+ toUser?: string;
2239
+
2240
+ /**
2241
+ * End date in YYYY-MM-DD format.
2242
+ */
2243
+ untilDate?: string;
2244
+
2245
+ /**
2246
+ * URL substring or domain filter.
2247
+ */
2248
+ url?: string;
2249
+
2250
+ /**
2251
+ * Only return tweets from verified authors.
2252
+ */
2253
+ verifiedOnly?: boolean;
2095
2254
  }
2096
2255
 
2097
2256
  export interface TweetSearchParams {
@@ -2235,7 +2394,7 @@ export interface TweetSearchParams {
2235
2394
  minBookmarks?: number;
2236
2395
 
2237
2396
  /**
2238
- * Minimum likes threshold.
2397
+ * Minimum likes threshold. minLikes is also accepted.
2239
2398
  */
2240
2399
  minFaves?: number;
2241
2400
 
@@ -551,8 +551,7 @@ export interface UserRetrieveBatchResponse {
551
551
  * has_next_page is true.
552
552
  */
553
553
  export type UserRetrieveFollowersResponse =
554
- | Shared.PaginatedUsers
555
- | UserRetrieveFollowersResponse.UserListCoverageResponse;
554
+ Shared.PaginatedUsers | UserRetrieveFollowersResponse.UserListCoverageResponse;
556
555
 
557
556
  export namespace UserRetrieveFollowersResponse {
558
557
  /**
@@ -562,8 +561,10 @@ export namespace UserRetrieveFollowersResponse {
562
561
  * unprefixed cursors retain legacy behavior. Follow next_cursor while
563
562
  * has_next_page is true.
564
563
  */
565
- export interface UserListCoverageResponse
566
- extends Omit<Shared.PaginatedUsers, 'has_next_page' | 'next_cursor'> {
564
+ export interface UserListCoverageResponse extends Omit<
565
+ Shared.PaginatedUsers,
566
+ 'has_next_page' | 'next_cursor'
567
+ > {
567
568
  /**
568
569
  * Coverage evidence across parallel relationship strategies.
569
570
  */
@@ -621,13 +622,7 @@ export namespace UserRetrieveFollowersResponse {
621
622
  pagesFetched: number;
622
623
 
623
624
  stopReason:
624
- | 'cursor_failure'
625
- | 'deadline'
626
- | 'exhausted'
627
- | 'failed'
628
- | 'page_limit'
629
- | 'result_limit'
630
- | 'stalled';
625
+ 'cursor_failure' | 'deadline' | 'exhausted' | 'failed' | 'page_limit' | 'result_limit' | 'stalled';
631
626
 
632
627
  strategy: number;
633
628
 
@@ -645,8 +640,7 @@ export namespace UserRetrieveFollowersResponse {
645
640
  * has_next_page is true.
646
641
  */
647
642
  export type UserRetrieveFollowingResponse =
648
- | Shared.PaginatedUsers
649
- | UserRetrieveFollowingResponse.UserListCoverageResponse;
643
+ Shared.PaginatedUsers | UserRetrieveFollowingResponse.UserListCoverageResponse;
650
644
 
651
645
  export namespace UserRetrieveFollowingResponse {
652
646
  /**
@@ -656,8 +650,10 @@ export namespace UserRetrieveFollowingResponse {
656
650
  * unprefixed cursors retain legacy behavior. Follow next_cursor while
657
651
  * has_next_page is true.
658
652
  */
659
- export interface UserListCoverageResponse
660
- extends Omit<Shared.PaginatedUsers, 'has_next_page' | 'next_cursor'> {
653
+ export interface UserListCoverageResponse extends Omit<
654
+ Shared.PaginatedUsers,
655
+ 'has_next_page' | 'next_cursor'
656
+ > {
661
657
  /**
662
658
  * Coverage evidence across parallel relationship strategies.
663
659
  */
@@ -715,13 +711,7 @@ export namespace UserRetrieveFollowingResponse {
715
711
  pagesFetched: number;
716
712
 
717
713
  stopReason:
718
- | 'cursor_failure'
719
- | 'deadline'
720
- | 'exhausted'
721
- | 'failed'
722
- | 'page_limit'
723
- | 'result_limit'
724
- | 'stalled';
714
+ 'cursor_failure' | 'deadline' | 'exhausted' | 'failed' | 'page_limit' | 'result_limit' | 'stalled';
725
715
 
726
716
  strategy: number;
727
717
 
@@ -739,8 +729,7 @@ export namespace UserRetrieveFollowingResponse {
739
729
  * has_next_page is true.
740
730
  */
741
731
  export type UserRetrieveVerifiedFollowersResponse =
742
- | Shared.PaginatedUsers
743
- | UserRetrieveVerifiedFollowersResponse.UserListCoverageResponse;
732
+ Shared.PaginatedUsers | UserRetrieveVerifiedFollowersResponse.UserListCoverageResponse;
744
733
 
745
734
  export namespace UserRetrieveVerifiedFollowersResponse {
746
735
  /**
@@ -750,8 +739,10 @@ export namespace UserRetrieveVerifiedFollowersResponse {
750
739
  * unprefixed cursors retain legacy behavior. Follow next_cursor while
751
740
  * has_next_page is true.
752
741
  */
753
- export interface UserListCoverageResponse
754
- extends Omit<Shared.PaginatedUsers, 'has_next_page' | 'next_cursor'> {
742
+ export interface UserListCoverageResponse extends Omit<
743
+ Shared.PaginatedUsers,
744
+ 'has_next_page' | 'next_cursor'
745
+ > {
755
746
  /**
756
747
  * Coverage evidence across parallel relationship strategies.
757
748
  */
@@ -809,13 +800,7 @@ export namespace UserRetrieveVerifiedFollowersResponse {
809
800
  pagesFetched: number;
810
801
 
811
802
  stopReason:
812
- | 'cursor_failure'
813
- | 'deadline'
814
- | 'exhausted'
815
- | 'failed'
816
- | 'page_limit'
817
- | 'result_limit'
818
- | 'stalled';
803
+ 'cursor_failure' | 'deadline' | 'exhausted' | 'failed' | 'page_limit' | 'result_limit' | 'stalled';
819
804
 
820
805
  strategy: number;
821
806
 
@@ -1247,7 +1232,7 @@ export interface UserRetrieveLikesParams {
1247
1232
  minBookmarks?: number;
1248
1233
 
1249
1234
  /**
1250
- * Minimum likes threshold.
1235
+ * Minimum likes threshold. minLikes is also accepted.
1251
1236
  */
1252
1237
  minFaves?: number;
1253
1238
 
@@ -1482,7 +1467,7 @@ export interface UserRetrieveMediaParams {
1482
1467
  minBookmarks?: number;
1483
1468
 
1484
1469
  /**
1485
- * Minimum likes threshold.
1470
+ * Minimum likes threshold. minLikes is also accepted.
1486
1471
  */
1487
1472
  minFaves?: number;
1488
1473
 
@@ -1717,7 +1702,7 @@ export interface UserRetrieveMentionsParams {
1717
1702
  minBookmarks?: number;
1718
1703
 
1719
1704
  /**
1720
- * Minimum likes threshold.
1705
+ * Minimum likes threshold. minLikes is also accepted.
1721
1706
  */
1722
1707
  minFaves?: number;
1723
1708
 
@@ -1968,7 +1953,7 @@ export interface UserRetrieveRepliesParams {
1968
1953
  minBookmarks?: number;
1969
1954
 
1970
1955
  /**
1971
- * Minimum likes threshold.
1956
+ * Minimum likes threshold. minLikes is also accepted.
1972
1957
  */
1973
1958
  minFaves?: number;
1974
1959
 
@@ -2295,7 +2280,7 @@ export interface UserRetrieveTweetsParams {
2295
2280
  minBookmarks?: number;
2296
2281
 
2297
2282
  /**
2298
- * Minimum likes threshold.
2283
+ * Minimum likes threshold. minLikes is also accepted.
2299
2284
  */
2300
2285
  minFaves?: number;
2301
2286
 
package/src/version.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
 
5
- export const VERSION = '0.11.0'; // x-release-please-version
5
+ export const VERSION = '0.12.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.0";
1
+ export declare const VERSION = "0.12.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.11.0";
1
+ export declare const VERSION = "0.12.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -4,5 +4,5 @@
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.VERSION = void 0;
7
- exports.VERSION = '0.11.0'; // x-release-please-version
7
+ exports.VERSION = '0.12.1'; // x-release-please-version
8
8
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-FileCopyrightText: 2026 Xquik contributors
2
2
  //
3
3
  // SPDX-License-Identifier: Apache-2.0
4
- export const VERSION = '0.11.0'; // x-release-please-version
4
+ export const VERSION = '0.12.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.mjs.map