x-twitter-scraper 0.16.0 → 0.18.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 (198) hide show
  1. package/CHANGELOG.md +44 -5
  2. package/README.md +1 -0
  3. package/client.d.mts +8 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +8 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/detect-platform.d.mts +3 -1
  10. package/internal/detect-platform.d.mts.map +1 -1
  11. package/internal/detect-platform.d.ts +3 -1
  12. package/internal/detect-platform.d.ts.map +1 -1
  13. package/internal/detect-platform.js +1 -1
  14. package/internal/detect-platform.js.map +1 -1
  15. package/internal/detect-platform.mjs +1 -1
  16. package/internal/detect-platform.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/events.d.mts +50 -11
  19. package/resources/events.d.mts.map +1 -1
  20. package/resources/events.d.ts +50 -11
  21. package/resources/events.d.ts.map +1 -1
  22. package/resources/events.js.map +1 -1
  23. package/resources/events.mjs.map +1 -1
  24. package/resources/index.d.mts +1 -1
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +1 -1
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js.map +1 -1
  29. package/resources/index.mjs.map +1 -1
  30. package/resources/monitors/index.d.mts +2 -1
  31. package/resources/monitors/index.d.mts.map +1 -1
  32. package/resources/monitors/index.d.ts +2 -1
  33. package/resources/monitors/index.d.ts.map +1 -1
  34. package/resources/monitors/index.js +3 -1
  35. package/resources/monitors/index.js.map +1 -1
  36. package/resources/monitors/index.mjs +1 -0
  37. package/resources/monitors/index.mjs.map +1 -1
  38. package/resources/monitors/keywords.d.mts +10 -96
  39. package/resources/monitors/keywords.d.mts.map +1 -1
  40. package/resources/monitors/keywords.d.ts +10 -96
  41. package/resources/monitors/keywords.d.ts.map +1 -1
  42. package/resources/monitors/monitors.d.mts +6 -2
  43. package/resources/monitors/monitors.d.mts.map +1 -1
  44. package/resources/monitors/monitors.d.ts +6 -2
  45. package/resources/monitors/monitors.d.ts.map +1 -1
  46. package/resources/monitors/monitors.js +4 -0
  47. package/resources/monitors/monitors.js.map +1 -1
  48. package/resources/monitors/monitors.mjs +4 -0
  49. package/resources/monitors/monitors.mjs.map +1 -1
  50. package/resources/monitors/posts.d.mts +344 -0
  51. package/resources/monitors/posts.d.mts.map +1 -0
  52. package/resources/monitors/posts.d.ts +344 -0
  53. package/resources/monitors/posts.d.ts.map +1 -0
  54. package/resources/monitors/posts.js +94 -0
  55. package/resources/monitors/posts.js.map +1 -0
  56. package/resources/monitors/posts.mjs +90 -0
  57. package/resources/monitors/posts.mjs.map +1 -0
  58. package/resources/shared.d.mts +577 -2
  59. package/resources/shared.d.mts.map +1 -1
  60. package/resources/shared.d.ts +577 -2
  61. package/resources/shared.d.ts.map +1 -1
  62. package/resources/support/index.d.mts +1 -1
  63. package/resources/support/index.d.mts.map +1 -1
  64. package/resources/support/index.d.ts +1 -1
  65. package/resources/support/index.d.ts.map +1 -1
  66. package/resources/support/index.js.map +1 -1
  67. package/resources/support/index.mjs.map +1 -1
  68. package/resources/support/support.d.mts +2 -2
  69. package/resources/support/support.d.mts.map +1 -1
  70. package/resources/support/support.d.ts +2 -2
  71. package/resources/support/support.d.ts.map +1 -1
  72. package/resources/support/support.js.map +1 -1
  73. package/resources/support/support.mjs.map +1 -1
  74. package/resources/support/tickets.d.mts +12 -20
  75. package/resources/support/tickets.d.mts.map +1 -1
  76. package/resources/support/tickets.d.ts +12 -20
  77. package/resources/support/tickets.d.ts.map +1 -1
  78. package/resources/webhooks.d.mts +5 -4
  79. package/resources/webhooks.d.mts.map +1 -1
  80. package/resources/webhooks.d.ts +5 -4
  81. package/resources/webhooks.d.ts.map +1 -1
  82. package/resources/webhooks.js.map +1 -1
  83. package/resources/webhooks.mjs.map +1 -1
  84. package/resources/x/accounts.d.mts +14 -4
  85. package/resources/x/accounts.d.mts.map +1 -1
  86. package/resources/x/accounts.d.ts +14 -4
  87. package/resources/x/accounts.d.ts.map +1 -1
  88. package/resources/x/accounts.js +6 -4
  89. package/resources/x/accounts.js.map +1 -1
  90. package/resources/x/accounts.mjs +6 -4
  91. package/resources/x/accounts.mjs.map +1 -1
  92. package/resources/x/broadcasts.d.mts +3 -131
  93. package/resources/x/broadcasts.d.mts.map +1 -1
  94. package/resources/x/broadcasts.d.ts +3 -131
  95. package/resources/x/broadcasts.d.ts.map +1 -1
  96. package/resources/x/communities/communities.d.mts +92 -1
  97. package/resources/x/communities/communities.d.mts.map +1 -1
  98. package/resources/x/communities/communities.d.ts +92 -1
  99. package/resources/x/communities/communities.d.ts.map +1 -1
  100. package/resources/x/communities/communities.js +14 -0
  101. package/resources/x/communities/communities.js.map +1 -1
  102. package/resources/x/communities/communities.mjs +14 -0
  103. package/resources/x/communities/communities.mjs.map +1 -1
  104. package/resources/x/communities/index.d.mts +1 -1
  105. package/resources/x/communities/index.d.mts.map +1 -1
  106. package/resources/x/communities/index.d.ts +1 -1
  107. package/resources/x/communities/index.d.ts.map +1 -1
  108. package/resources/x/communities/index.js.map +1 -1
  109. package/resources/x/communities/index.mjs.map +1 -1
  110. package/resources/x/community-notes.d.mts +122 -510
  111. package/resources/x/community-notes.d.mts.map +1 -1
  112. package/resources/x/community-notes.d.ts +122 -510
  113. package/resources/x/community-notes.d.ts.map +1 -1
  114. package/resources/x/community-notes.js.map +1 -1
  115. package/resources/x/community-notes.mjs.map +1 -1
  116. package/resources/x/index.d.mts +7 -6
  117. package/resources/x/index.d.mts.map +1 -1
  118. package/resources/x/index.d.ts +7 -6
  119. package/resources/x/index.d.ts.map +1 -1
  120. package/resources/x/index.js +3 -1
  121. package/resources/x/index.js.map +1 -1
  122. package/resources/x/index.mjs +1 -0
  123. package/resources/x/index.mjs.map +1 -1
  124. package/resources/x/jobs.d.mts +144 -291
  125. package/resources/x/jobs.d.mts.map +1 -1
  126. package/resources/x/jobs.d.ts +144 -291
  127. package/resources/x/jobs.d.ts.map +1 -1
  128. package/resources/x/jobs.js.map +1 -1
  129. package/resources/x/jobs.mjs.map +1 -1
  130. package/resources/x/lists.d.mts +21 -419
  131. package/resources/x/lists.d.mts.map +1 -1
  132. package/resources/x/lists.d.ts +21 -419
  133. package/resources/x/lists.d.ts.map +1 -1
  134. package/resources/x/spaces.d.mts +213 -693
  135. package/resources/x/spaces.d.mts.map +1 -1
  136. package/resources/x/spaces.d.ts +213 -693
  137. package/resources/x/spaces.d.ts.map +1 -1
  138. package/resources/x/spaces.js.map +1 -1
  139. package/resources/x/spaces.mjs.map +1 -1
  140. package/resources/x/sports.d.mts +1512 -0
  141. package/resources/x/sports.d.mts.map +1 -0
  142. package/resources/x/sports.d.ts +1512 -0
  143. package/resources/x/sports.d.ts.map +1 -0
  144. package/resources/x/sports.js +91 -0
  145. package/resources/x/sports.js.map +1 -0
  146. package/resources/x/sports.mjs +87 -0
  147. package/resources/x/sports.mjs.map +1 -0
  148. package/resources/x/tweets/tweets.d.mts +11 -13
  149. package/resources/x/tweets/tweets.d.mts.map +1 -1
  150. package/resources/x/tweets/tweets.d.ts +11 -13
  151. package/resources/x/tweets/tweets.d.ts.map +1 -1
  152. package/resources/x/users/users.d.mts +29 -585
  153. package/resources/x/users/users.d.mts.map +1 -1
  154. package/resources/x/users/users.d.ts +29 -585
  155. package/resources/x/users/users.d.ts.map +1 -1
  156. package/resources/x/users/users.js.map +1 -1
  157. package/resources/x/users/users.mjs.map +1 -1
  158. package/resources/x/x.d.mts +55 -118
  159. package/resources/x/x.d.mts.map +1 -1
  160. package/resources/x/x.d.ts +55 -118
  161. package/resources/x/x.d.ts.map +1 -1
  162. package/resources/x/x.js +4 -0
  163. package/resources/x/x.js.map +1 -1
  164. package/resources/x/x.mjs +4 -0
  165. package/resources/x/x.mjs.map +1 -1
  166. package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +1 -0
  167. package/src/client.ts +8 -0
  168. package/src/internal/detect-platform.ts +2 -2
  169. package/src/resources/events.ts +72 -10
  170. package/src/resources/index.ts +1 -0
  171. package/src/resources/monitors/index.ts +21 -0
  172. package/src/resources/monitors/keywords.ts +10 -118
  173. package/src/resources/monitors/monitors.ts +46 -0
  174. package/src/resources/monitors/posts.ts +463 -0
  175. package/src/resources/shared.ts +773 -200
  176. package/src/resources/support/index.ts +1 -0
  177. package/src/resources/support/support.ts +2 -0
  178. package/src/resources/support/tickets.ts +14 -21
  179. package/src/resources/webhooks.ts +5 -4
  180. package/src/resources/x/accounts.ts +19 -4
  181. package/src/resources/x/broadcasts.ts +3 -159
  182. package/src/resources/x/communities/communities.ts +113 -0
  183. package/src/resources/x/communities/index.ts +3 -0
  184. package/src/resources/x/community-notes.ts +137 -582
  185. package/src/resources/x/index.ts +70 -0
  186. package/src/resources/x/jobs.ts +160 -334
  187. package/src/resources/x/lists.ts +21 -493
  188. package/src/resources/x/spaces.ts +227 -817
  189. package/src/resources/x/sports.ts +1877 -0
  190. package/src/resources/x/tweets/tweets.ts +15 -15
  191. package/src/resources/x/users/users.ts +29 -693
  192. package/src/resources/x/x.ts +191 -128
  193. package/src/version.ts +1 -1
  194. package/version.d.mts +1 -1
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
  197. package/version.mjs +1 -1
  198. package/src/lib/.keep +0 -2
@@ -1,4 +1,136 @@
1
1
  import * as Shared from "./shared.js";
2
+ /**
3
+ * X broadcast, a live video
4
+ */
5
+ export interface Broadcast {
6
+ /**
7
+ * Broadcast ID
8
+ */
9
+ id: string;
10
+ /**
11
+ * Camera rotation in degrees
12
+ */
13
+ cameraRotation?: number;
14
+ /**
15
+ * X's code for who may chat
16
+ */
17
+ chatOption?: number;
18
+ /**
19
+ * Public X profile.
20
+ */
21
+ creator?: UserProfile;
22
+ /**
23
+ * When the broadcast ended
24
+ */
25
+ endedAt?: string;
26
+ /**
27
+ * Video height in pixels
28
+ */
29
+ height?: number;
30
+ /**
31
+ * Whether X offers a recording of the broadcast
32
+ */
33
+ isAvailableForReplay?: boolean;
34
+ /**
35
+ * Whether the video stream runs in high-latency mode
36
+ */
37
+ isHighLatency?: boolean;
38
+ /**
39
+ * Whether X marks the chat private
40
+ */
41
+ isPrivateChat?: boolean;
42
+ /**
43
+ * Whether the broadcaster edited the title of the replay
44
+ */
45
+ isTitleEdited?: boolean;
46
+ /**
47
+ * When the video stream last reached X
48
+ */
49
+ lastPingAt?: string;
50
+ /**
51
+ * X's media key for the video
52
+ */
53
+ mediaKey?: string;
54
+ /**
55
+ * Broadcaster, as X's live video service names the account
56
+ */
57
+ periscopeUser?: Broadcast.PeriscopeUser;
58
+ /**
59
+ * Image X shows before the broadcast starts
60
+ */
61
+ preLiveSlateUrl?: string;
62
+ /**
63
+ * When the broadcast was set to start
64
+ */
65
+ scheduledStart?: string;
66
+ /**
67
+ * What produced the video stream, as X names it
68
+ */
69
+ source?: string;
70
+ /**
71
+ * When the broadcast went live
72
+ */
73
+ startedAt?: string;
74
+ /**
75
+ * Such as NotStarted, Running or Ended, as X names it
76
+ */
77
+ state?: string;
78
+ /**
79
+ * Broadcast title
80
+ */
81
+ title?: string;
82
+ /**
83
+ * Accounts that watched, live or after
84
+ */
85
+ totalWatched?: number;
86
+ /**
87
+ * Accounts watching, as X counts them
88
+ */
89
+ totalWatching?: number;
90
+ /**
91
+ * Search tweet with author. Zero metrics may mean X omitted counts.
92
+ */
93
+ tweet?: SearchTweet;
94
+ /**
95
+ * ID of the post that announces the broadcast
96
+ */
97
+ tweetId?: string;
98
+ /**
99
+ * X's revision number of the broadcast
100
+ */
101
+ version?: number;
102
+ /**
103
+ * Video width in pixels
104
+ */
105
+ width?: number;
106
+ }
107
+ export declare namespace Broadcast {
108
+ /**
109
+ * Broadcaster, as X's live video service names the account
110
+ */
111
+ interface PeriscopeUser {
112
+ /**
113
+ * Live video account ID
114
+ */
115
+ id?: string;
116
+ /**
117
+ * Live video display name
118
+ */
119
+ displayName?: string;
120
+ /**
121
+ * Live video avatar URL
122
+ */
123
+ profilePicture?: string;
124
+ /**
125
+ * The broadcaster's avatar at full size
126
+ */
127
+ profilePictureOriginal?: string;
128
+ /**
129
+ * Live video username
130
+ */
131
+ username?: string;
132
+ }
133
+ }
2
134
  /**
3
135
  * Public X Community, as every Community read returns it.
4
136
  */
@@ -291,10 +423,219 @@ export interface EmbeddedTweet {
291
423
  retweetCount: number;
292
424
  text: string;
293
425
  viewCount: number;
426
+ /**
427
+ * Describes an X Article preview and its lifecycle metadata.
428
+ */
429
+ article?: SearchTweet.Article;
294
430
  /**
295
431
  * Public X profile.
296
432
  */
297
433
  author?: UserProfile;
434
+ /**
435
+ * Why the tweet has no author. X serves a suspended or deleted account as an
436
+ * unavailable user with a reason such as Suspended or NotFound. Omitted when the
437
+ * author is available.
438
+ */
439
+ authorUnavailable?: SearchTweet.AuthorUnavailable;
440
+ /**
441
+ * Describes a public card and its referenced profiles.
442
+ */
443
+ card?: SearchTweet.Card;
444
+ /**
445
+ * Price charts the author attached under the post, 1 per cashtag. Absent when the
446
+ * post has none. X may send a cashtag without a chart window.
447
+ */
448
+ cashtagAttachments?: Array<SearchTweet.CashtagAttachment>;
449
+ /**
450
+ * Community ID.
451
+ */
452
+ communityId?: string;
453
+ /**
454
+ * Community name. Present when X sends it with the post.
455
+ */
456
+ communityName?: string;
457
+ /**
458
+ * Community Note presentation metadata returned by X.
459
+ */
460
+ communityNote?: SearchTweet.CommunityNote;
461
+ /**
462
+ * Content disclosure metadata shown by X when a tweet is labeled as paid
463
+ * partnership content or AI-generated media.
464
+ */
465
+ contentDisclosure?: ContentDisclosure;
466
+ /**
467
+ * Reply policy & conversation owner.
468
+ */
469
+ conversationControl?: SearchTweet.ConversationControl;
470
+ conversationId?: string;
471
+ /**
472
+ * Author-published point, with longitude before latitude.
473
+ */
474
+ coordinates?: SearchTweet.Coordinates;
475
+ createdAt?: string;
476
+ displayTextRange?: Array<number>;
477
+ /**
478
+ * Lists edit-chain identifiers and the remaining edit window.
479
+ */
480
+ edit?: SearchTweet.Edit;
481
+ /**
482
+ * Lists hashtags, symbols, links, and mentions from tweet text.
483
+ */
484
+ entities?: SearchTweet.Entities;
485
+ /**
486
+ * Marks a subscriber-only post with the creator whose subscription unlocks it.
487
+ * Non-subscribers get the preview text & the subscribe link. Omitted on public
488
+ * posts.
489
+ */
490
+ exclusiveContent?: SearchTweet.ExclusiveContent;
491
+ /**
492
+ * Author-published point, with latitude before longitude.
493
+ */
494
+ geo?: SearchTweet.Geo;
495
+ /**
496
+ * Public metadata whose fields are defined by X.
497
+ */
498
+ grokShareAttachment?: {
499
+ [key: string]: unknown;
500
+ };
501
+ /**
502
+ * Grok's translation of the post, as X shows it.
503
+ */
504
+ grokTranslatedPost?: {
505
+ [key: string]: unknown;
506
+ };
507
+ /**
508
+ * Whether X holds Community Notes on the post, shown or not.
509
+ */
510
+ hasCommunityNotes?: boolean;
511
+ inReplyToId?: string;
512
+ inReplyToUserId?: string;
513
+ inReplyToUsername?: string;
514
+ /**
515
+ * The notice x.com covers the post with until the reader views it, such as X's
516
+ * public interest notice on a post that broke its rules but stays up.
517
+ */
518
+ interstitial?: SearchTweet.Interstitial;
519
+ isLimitedReply?: boolean;
520
+ isNoteTweet?: boolean;
521
+ isPinned?: boolean;
522
+ isQuoteStatus?: boolean;
523
+ isReply?: boolean;
524
+ isRetweet?: boolean;
525
+ isTranslatable?: boolean;
526
+ /**
527
+ * Public metadata whose fields are defined by X.
528
+ */
529
+ jetfuelAttachment?: {
530
+ [key: string]: unknown;
531
+ };
532
+ lang?: string;
533
+ /**
534
+ * Public restrictions & prompts.
535
+ */
536
+ limitedActions?: Array<SearchTweet.LimitedAction>;
537
+ /**
538
+ * Media, omitted when unavailable.
539
+ */
540
+ media?: Array<TweetMedia>;
541
+ /**
542
+ * Complete Note Tweet content and rich-text metadata.
543
+ */
544
+ noteTweet?: SearchTweet.NoteTweet;
545
+ /**
546
+ * The post this one replies to, with the same fields.
547
+ */
548
+ parentTweet?: EmbeddedTweet;
549
+ /**
550
+ * Describes public place metadata on a geotagged tweet.
551
+ */
552
+ place?: SearchTweet.Place;
553
+ possiblySensitive?: boolean;
554
+ /**
555
+ * Public metadata whose fields are defined by X.
556
+ */
557
+ postCta?: {
558
+ [key: string]: unknown;
559
+ };
560
+ /**
561
+ * Engagement counts retained from a prior tweet edit.
562
+ */
563
+ previousCounts?: SearchTweet.PreviousCounts;
564
+ /**
565
+ * The post this one quotes, with the same fields.
566
+ */
567
+ quoted_tweet?: EmbeddedTweet;
568
+ quotedTweetId?: string;
569
+ /**
570
+ * The quoted post's link, kept when X withholds that post.
571
+ */
572
+ quotedTweetPermalink?: SearchTweet.QuotedTweetPermalink;
573
+ /**
574
+ * Why X shows no quoted post. Omitted when X names no reason, as its legacy
575
+ * answers never do.
576
+ */
577
+ quotedTweetUnavailable?: SearchTweet.QuotedTweetUnavailable;
578
+ /**
579
+ * Public post & user this reaction references.
580
+ */
581
+ reactionContext?: SearchTweet.ReactionContext;
582
+ /**
583
+ * The post this one reposts, with the same fields.
584
+ */
585
+ retweeted_tweet?: EmbeddedTweet;
586
+ /**
587
+ * Repost event time in UTC. Null when unavailable. Omitted for other posts.
588
+ */
589
+ retweetedAt?: string | null;
590
+ /**
591
+ * Public metadata whose fields are defined by X.
592
+ */
593
+ scopes?: {
594
+ [key: string]: unknown;
595
+ };
596
+ /**
597
+ * The label X shows under a post whose reach it limits. It links to the page that
598
+ * explains it.
599
+ */
600
+ softIntervention?: SoftIntervention;
601
+ /**
602
+ * The app the post was sent from, as X labels it. X sends it for some posts only.
603
+ */
604
+ source?: string;
605
+ /**
606
+ * Game metadata attached to this post.
607
+ */
608
+ sportsContext?: SearchTweet.SportsContext;
609
+ /**
610
+ * The Subscriber badge X shows on a reply. The reply's author subscribes to the
611
+ * creator who started the conversation. Omitted on a post without the badge.
612
+ */
613
+ subscriberBadge?: SearchTweet.SubscriberBadge;
614
+ /**
615
+ * Where `text` matches the search, on each row a search read. Offsets count code
616
+ * points of `text`, as `displayTextRange` does. Empty when X marks nothing in the
617
+ * post. X marks matches only in a post's first 280 characters.
618
+ */
619
+ textHighlights?: Array<SearchTweet.TextHighlight>;
620
+ /**
621
+ * Public visibility notice attached to an available tweet.
622
+ */
623
+ tombstone?: SearchTweet.Tombstone;
624
+ type?: string;
625
+ /**
626
+ * The author's ID when X withholds the author's profile.
627
+ */
628
+ unavailableAuthorId?: string;
629
+ /**
630
+ * X did not send these counts, so each 0 means unknown.
631
+ */
632
+ unknownCounts?: Array<'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'>;
633
+ /**
634
+ * User IDs that left this conversation.
635
+ */
636
+ unmentionedUserIds?: Array<string>;
637
+ url?: string;
638
+ viewState?: string;
298
639
  [k: string]: unknown;
299
640
  }
300
641
  /**
@@ -302,7 +643,7 @@ export interface EmbeddedTweet {
302
643
  * `xquik-api-contract: 2026-04-29` for the structured best-practice error object.
303
644
  */
304
645
  export interface Error {
305
- error: 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'closed' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_media_url' | 'invalid_message_id' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'job_not_found' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'media_too_large' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'bookmark_folders_unavailable' | 'broadcast_not_found' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'cursor_account_unavailable' | 'draft_not_found' | 'draw_too_large' | 'expired' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_in_progress' | 'idempotency_key_conflict' | 'invalid_broadcast_id' | 'invalid_community_id' | 'invalid_community_topic' | 'invalid_complete_replies_request' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_cursor' | 'invalid_idempotency_key' | 'invalid_job_filter' | 'invalid_job_id' | 'invalid_list_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'invalid_space_id' | 'likes_unavailable' | 'list_not_found' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'missing_url' | 'no_cached_style' | 'pagination_stalled' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replay_unavailable' | 'replies_incomplete' | 'retweeters_incomplete' | 'search_unavailable' | 'space_canceled' | 'space_not_ended' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'telegram_unavailable' | 'too_many_ids' | 'too_many_streams' | 'too_many_tweets' | 'unknown_field' | 'unsupported_media_combination' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_automation_refused' | 'x_community_not_joined' | 'x_community_not_selectable' | 'x_community_post_public' | 'x_community_post_removed' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_dm_not_deleted' | 'x_dm_not_sent' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_image_invalid' | 'x_media_rejected' | 'x_post_not_sent' | 'x_rate_limited' | 'x_rejected' | 'x_reply_not_allowed' | 'x_reply_target_unavailable' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_write_ambiguous' | 'x_write_failed' | Error.StructuredError;
646
+ error: Error.Code | Error.StructuredError;
306
647
  /**
307
648
  * With unknown_field: the valid names where the first unknown name in fields or
308
649
  * omit stopped.
@@ -334,8 +675,9 @@ export interface Error {
334
675
  retryAfterMs?: number;
335
676
  }
336
677
  export declare namespace Error {
678
+ type Code = 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'closed' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_media_url' | 'invalid_message_id' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'job_not_found' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'media_too_large' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'session_required' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'bookmark_folders_unavailable' | 'broadcast_not_found' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'contributor_not_found' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'cursor_account_unavailable' | 'draft_not_found' | 'draw_too_large' | 'expired' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_in_progress' | 'idempotency_key_conflict' | 'invalid_broadcast_id' | 'invalid_community_id' | 'invalid_community_topic' | 'invalid_complete_replies_request' | 'invalid_contributor_alias' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_cursor' | 'invalid_idempotency_key' | 'invalid_job_filter' | 'invalid_job_id' | 'invalid_list_id' | 'invalid_news_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'invalid_space_id' | 'likes_unavailable' | 'list_not_found' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'missing_url' | 'news_not_found' | 'no_cached_style' | 'pagination_stalled' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replay_unavailable' | 'replies_incomplete' | 'retweeters_incomplete' | 'search_unavailable' | 'space_canceled' | 'space_not_ended' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'telegram_unavailable' | 'too_many_ids' | 'too_many_streams' | 'too_many_tweets' | 'topup_in_progress' | 'unknown_field' | 'unsupported_media_combination' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_automation_refused' | 'x_community_not_joined' | 'x_community_not_selectable' | 'x_community_post_public' | 'x_community_post_removed' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_dm_not_deleted' | 'x_dm_not_sent' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_image_invalid' | 'x_media_rejected' | 'x_post_not_sent' | 'x_rate_limited' | 'x_rejected' | 'x_reply_not_allowed' | 'x_reply_target_unavailable' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_video_too_large' | 'x_write_ambiguous' | 'x_write_failed';
337
679
  interface StructuredError {
338
- code: 'internal_error' | 'account_already_connected' | 'account_needs_reauth' | 'account_not_found' | 'account_required' | 'account_restricted' | 'api_key_limit_reached' | 'article_not_found' | 'closed' | 'dm_not_permitted' | 'invalid_format' | 'invalid_id' | 'invalid_input' | 'invalid_media_url' | 'invalid_message_id' | 'invalid_params' | 'invalid_tool_type' | 'invalid_tweet_id' | 'invalid_tweet_url' | 'invalid_user_id' | 'invalid_user_ids' | 'invalid_username' | 'invalid_json' | 'insufficient_credits' | 'job_not_found' | 'login_cooldown' | 'login_failed' | 'media_download_failed' | 'media_too_large' | 'missing_params' | 'missing_query' | 'monitor_already_exists' | 'monitor_profile_unavailable' | 'no_media' | 'no_credits' | 'no_subscription' | 'not_found' | 'payment_failed' | 'rate_limit_exceeded' | 'service_unavailable' | 'style_not_found' | 'subscription_inactive' | 'tweet_not_found' | 'unauthenticated' | 'unsupported_field' | 'user_not_found' | 'body_too_large' | 'bookmark_folders_unavailable' | 'broadcast_not_found' | 'checkout_unavailable' | 'connection_challenge_expired' | 'connection_challenge_inactive' | 'coverage_cursor_gone' | 'coverage_cursor_unavailable' | 'cursor_account_unavailable' | 'draft_not_found' | 'draw_too_large' | 'expired' | 'favoriters_unavailable' | 'forbidden' | 'guest_wallet_unavailable' | 'guest_wallets_disabled' | 'guest_wallets_unavailable' | 'idempotency_conflict' | 'idempotency_in_progress' | 'idempotency_key_conflict' | 'invalid_broadcast_id' | 'invalid_community_id' | 'invalid_community_topic' | 'invalid_complete_replies_request' | 'invalid_coverage_cursor' | 'invalid_coverage_request' | 'invalid_cursor' | 'invalid_idempotency_key' | 'invalid_job_filter' | 'invalid_job_id' | 'invalid_list_id' | 'invalid_output_options' | 'invalid_payment_amount' | 'invalid_range' | 'invalid_reply_options' | 'invalid_space_id' | 'likes_unavailable' | 'list_not_found' | 'login_rate_limited' | 'login_service_unavailable' | 'missing_idempotency_key' | 'missing_ids' | 'missing_url' | 'no_cached_style' | 'pagination_stalled' | 'passkey_required' | 'rate_limited' | 'read_request_timeout' | 'replay_unavailable' | 'replies_incomplete' | 'retweeters_incomplete' | 'search_unavailable' | 'space_canceled' | 'space_not_ended' | 'support_media_rate_limit' | 'support_request_rate_limit' | 'telegram_unavailable' | 'too_many_ids' | 'too_many_streams' | 'too_many_tweets' | 'unknown_field' | 'unsupported_media_combination' | 'unsupported_media_type' | 'webhook_inactive' | 'write_tracking_unavailable' | 'x_write_unconfirmed' | 'x_account_feature_required' | 'x_account_protected' | 'x_account_suspended' | 'x_api_rate_limited' | 'x_api_unavailable' | 'x_api_unauthorized' | 'x_auth_failure' | 'x_automation_refused' | 'x_community_not_joined' | 'x_community_not_selectable' | 'x_community_post_public' | 'x_community_post_removed' | 'x_content_too_long' | 'x_daily_limit' | 'x_dm_not_allowed' | 'x_dm_not_deleted' | 'x_dm_not_sent' | 'x_duplicate_action' | 'x_login_auth_failed' | 'x_login_challenge' | 'x_login_denied' | 'x_login_failed' | 'x_login_rate_limited' | 'x_login_service_unavailable' | 'x_login_suspended' | 'x_image_invalid' | 'x_media_rejected' | 'x_post_not_sent' | 'x_rate_limited' | 'x_rejected' | 'x_reply_not_allowed' | 'x_reply_target_unavailable' | 'x_target_not_found' | 'x_transient_error' | 'x_user_lookup_failed' | 'x_write_ambiguous' | 'x_write_failed';
680
+ code: Code;
339
681
  message: string;
340
682
  type: 'api_error' | 'authentication_error' | 'billing_error' | 'dependency_error' | 'invalid_request_error' | 'permission_error' | 'rate_limit_error';
341
683
  }
@@ -405,6 +747,15 @@ export interface MonitorFollow {
405
747
  reason?: 'unavailable' | 'unfollowed';
406
748
  [k: string]: unknown;
407
749
  }
750
+ /**
751
+ * 1 page of public X Lists. Follow next_cursor while the response reports more
752
+ * pages. Each returned List costs 1 credit.
753
+ */
754
+ export interface PaginatedLists {
755
+ has_next_page: boolean;
756
+ lists: Array<XList>;
757
+ next_cursor: string;
758
+ }
408
759
  /**
409
760
  * Follow next_cursor while the response reports more pages. A page can hold fewer
410
761
  * rows than its limit & still report more. That report decides, not the row count.
@@ -470,6 +821,18 @@ export declare namespace PaginatedTweets {
470
821
  }
471
822
  }
472
823
  }
824
+ /**
825
+ * A page of user IDs without profiles. Follow next_cursor while the response
826
+ * reports more pages.
827
+ */
828
+ export interface PaginatedUserIds {
829
+ has_next_page: boolean;
830
+ /**
831
+ * X user IDs, newest relationship first.
832
+ */
833
+ ids: Array<string>;
834
+ next_cursor: string;
835
+ }
473
836
  /**
474
837
  * Profile coverage preserves shape, billing, aliases, and filters. Follow
475
838
  * next_cursor while the response reports more pages. Unprefixed cursors remain
@@ -669,6 +1032,11 @@ export interface SearchTweet {
669
1032
  scopes?: {
670
1033
  [key: string]: unknown;
671
1034
  };
1035
+ /**
1036
+ * The label X shows under a post whose reach it limits. It links to the page that
1037
+ * explains it.
1038
+ */
1039
+ softIntervention?: SoftIntervention;
672
1040
  /**
673
1041
  * The app the post was sent from, as X labels it. X sends it for some posts only.
674
1042
  */
@@ -697,6 +1065,10 @@ export interface SearchTweet {
697
1065
  * The author's ID when X withholds the author's profile.
698
1066
  */
699
1067
  unavailableAuthorId?: string;
1068
+ /**
1069
+ * X did not send these counts, so each 0 means unknown.
1070
+ */
1071
+ unknownCounts?: Array<'retweetCount' | 'replyCount' | 'likeCount' | 'quoteCount' | 'viewCount' | 'bookmarkCount'>;
700
1072
  /**
701
1073
  * User IDs that left this conversation.
702
1074
  */
@@ -1599,6 +1971,70 @@ export declare namespace SearchTweet {
1599
1971
  }
1600
1972
  }
1601
1973
  }
1974
+ /**
1975
+ * The label X shows under a post whose reach it limits. It links to the page that
1976
+ * explains it.
1977
+ */
1978
+ export interface SoftIntervention {
1979
+ /**
1980
+ * The label's kind. `Fosnr` marks a post X keeps up but shows to fewer people.
1981
+ */
1982
+ displayType?: string;
1983
+ /**
1984
+ * Whether X prompts readers before they engage with the post.
1985
+ */
1986
+ engagementNudge?: boolean;
1987
+ text?: SoftIntervention.Text;
1988
+ /**
1989
+ * The page that explains the label.
1990
+ */
1991
+ url?: SoftIntervention.URL;
1992
+ }
1993
+ export declare namespace SoftIntervention {
1994
+ interface Text {
1995
+ /**
1996
+ * Links inside the label, by character range.
1997
+ */
1998
+ entities?: Array<Text.Entity>;
1999
+ /**
2000
+ * Whether the label reads right to left.
2001
+ */
2002
+ rtl?: boolean;
2003
+ /**
2004
+ * The label's text.
2005
+ */
2006
+ text?: string;
2007
+ }
2008
+ namespace Text {
2009
+ interface Entity {
2010
+ /**
2011
+ * Position in the label's text where the entity starts, counted from 0.
2012
+ */
2013
+ fromIndex?: number;
2014
+ ref?: Entity.Ref;
2015
+ /**
2016
+ * Position in the label's text where the entity ends, counted from 0.
2017
+ */
2018
+ toIndex?: number;
2019
+ }
2020
+ namespace Entity {
2021
+ interface Ref {
2022
+ screenName?: string;
2023
+ text?: string;
2024
+ type?: string;
2025
+ url?: string;
2026
+ urlType?: string;
2027
+ }
2028
+ }
2029
+ }
2030
+ /**
2031
+ * The page that explains the label.
2032
+ */
2033
+ interface URL {
2034
+ url?: string;
2035
+ urlType?: string;
2036
+ }
2037
+ }
1602
2038
  /**
1603
2039
  * Tweet media.
1604
2040
  */
@@ -2207,6 +2643,10 @@ export declare namespace UserProfile {
2207
2643
  * Whether the owner verified their ID with X.
2208
2644
  */
2209
2645
  isIdentityVerified?: boolean;
2646
+ /**
2647
+ * The year X shows as the start of verification, in place of verifiedSinceMsec.
2648
+ */
2649
+ overrideVerifiedYear?: number;
2210
2650
  /**
2211
2651
  * When X verified the account, in milliseconds since 1970, as text.
2212
2652
  */
@@ -2264,4 +2704,139 @@ export declare namespace UserProfile {
2264
2704
  }
2265
2705
  }
2266
2706
  }
2707
+ /**
2708
+ * Public X List with its owner's public profile. Leaves out what X tells the
2709
+ * reading account, such as whether it follows the List.
2710
+ */
2711
+ export interface XList {
2712
+ /**
2713
+ * Numeric ID of the List.
2714
+ */
2715
+ id: string;
2716
+ /**
2717
+ * Name the owner gave the List.
2718
+ */
2719
+ name: string;
2720
+ /**
2721
+ * URL of the banner the owner uploaded. Absent when the owner uploaded none.
2722
+ */
2723
+ bannerUrl?: string;
2724
+ /**
2725
+ * When the owner made the List.
2726
+ */
2727
+ createdAt?: string;
2728
+ /**
2729
+ * Banner the owner uploaded.
2730
+ */
2731
+ customBanner?: XListBanner;
2732
+ /**
2733
+ * Banner X shows when the owner uploaded none. X picks it per reading account, so
2734
+ * 2 calls can return different ones.
2735
+ */
2736
+ defaultBanner?: XListBanner;
2737
+ /**
2738
+ * About text of the List. Empty when the owner wrote none.
2739
+ */
2740
+ description?: string;
2741
+ /**
2742
+ * Avatar URLs of a few List members, which X may pick per request.
2743
+ */
2744
+ facepileUrls?: Array<string>;
2745
+ /**
2746
+ * Accounts on the List.
2747
+ */
2748
+ memberCount?: number;
2749
+ /**
2750
+ * Member count as X words it, such as 35 members.
2751
+ */
2752
+ membersContext?: string;
2753
+ /**
2754
+ * Public profile of the account that owns the List.
2755
+ */
2756
+ owner?: UserProfile;
2757
+ /**
2758
+ * Accounts that follow the List, which X calls followers.
2759
+ */
2760
+ subscriberCount?: number;
2761
+ /**
2762
+ * List page on x.com.
2763
+ */
2764
+ url?: string;
2765
+ }
2766
+ /**
2767
+ * Banner image of an X List.
2768
+ */
2769
+ export interface XListBanner {
2770
+ /**
2771
+ * Banner image URL.
2772
+ */
2773
+ url: string;
2774
+ /**
2775
+ * Banner height in pixels.
2776
+ */
2777
+ height?: number;
2778
+ /**
2779
+ * Media ID of an uploaded banner.
2780
+ */
2781
+ mediaId?: string;
2782
+ /**
2783
+ * Stable media key of an uploaded banner.
2784
+ */
2785
+ mediaKey?: string;
2786
+ /**
2787
+ * Dominant colors of an uploaded banner and their shares.
2788
+ */
2789
+ palette?: Array<XListBanner.Palette>;
2790
+ /**
2791
+ * Area X marks as the subject of the banner, in pixels.
2792
+ */
2793
+ salientRect?: XListBanner.SalientRect;
2794
+ /**
2795
+ * Banner width in pixels.
2796
+ */
2797
+ width?: number;
2798
+ }
2799
+ export declare namespace XListBanner {
2800
+ interface Palette {
2801
+ /**
2802
+ * Share of the banner, from 0 to 100.
2803
+ */
2804
+ percentage?: number;
2805
+ /**
2806
+ * The color's red, green and blue values.
2807
+ */
2808
+ rgb?: Palette.Rgb;
2809
+ }
2810
+ namespace Palette {
2811
+ /**
2812
+ * The color's red, green and blue values.
2813
+ */
2814
+ interface Rgb {
2815
+ blue?: number;
2816
+ green?: number;
2817
+ red?: number;
2818
+ }
2819
+ }
2820
+ /**
2821
+ * Area X marks as the subject of the banner, in pixels.
2822
+ */
2823
+ interface SalientRect {
2824
+ /**
2825
+ * Height of the marked area.
2826
+ */
2827
+ height?: number;
2828
+ /**
2829
+ * Pixels from the banner's left.
2830
+ */
2831
+ left?: number;
2832
+ /**
2833
+ * Pixels from the banner's top.
2834
+ */
2835
+ top?: number;
2836
+ /**
2837
+ * Width of the marked area.
2838
+ */
2839
+ width?: number;
2840
+ }
2841
+ }
2267
2842
  //# sourceMappingURL=shared.d.ts.map