x-twitter-scraper 0.13.3 → 0.15.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 (205) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +54 -12
  3. package/client.d.mts +3 -15
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -15
  6. package/client.d.ts.map +1 -1
  7. package/client.js +7 -52
  8. package/client.js.map +1 -1
  9. package/client.mjs +7 -52
  10. package/client.mjs.map +1 -1
  11. package/core/api-promise.d.mts +0 -8
  12. package/core/api-promise.d.mts.map +1 -1
  13. package/core/api-promise.d.ts +0 -8
  14. package/core/api-promise.d.ts.map +1 -1
  15. package/core/api-promise.js +0 -11
  16. package/core/api-promise.js.map +1 -1
  17. package/core/api-promise.mjs +0 -11
  18. package/core/api-promise.mjs.map +1 -1
  19. package/core/error.d.mts.map +1 -1
  20. package/core/error.d.ts.map +1 -1
  21. package/core/error.js +0 -1
  22. package/core/error.js.map +1 -1
  23. package/core/error.mjs +0 -1
  24. package/core/error.mjs.map +1 -1
  25. package/core/streaming.d.mts.map +1 -1
  26. package/core/streaming.d.ts.map +1 -1
  27. package/core/streaming.js +0 -10
  28. package/core/streaming.js.map +1 -1
  29. package/core/streaming.mjs +0 -10
  30. package/core/streaming.mjs.map +1 -1
  31. package/internal/builtin-types.d.mts +0 -41
  32. package/internal/builtin-types.d.mts.map +1 -1
  33. package/internal/builtin-types.d.ts +0 -41
  34. package/internal/builtin-types.d.ts.map +1 -1
  35. package/internal/decoders/line.d.mts.map +1 -1
  36. package/internal/decoders/line.d.ts.map +1 -1
  37. package/internal/decoders/line.js +4 -21
  38. package/internal/decoders/line.js.map +1 -1
  39. package/internal/decoders/line.mjs +4 -21
  40. package/internal/decoders/line.mjs.map +1 -1
  41. package/internal/detect-platform.d.mts.map +1 -1
  42. package/internal/detect-platform.d.ts.map +1 -1
  43. package/internal/detect-platform.js +0 -20
  44. package/internal/detect-platform.js.map +1 -1
  45. package/internal/detect-platform.mjs +0 -20
  46. package/internal/detect-platform.mjs.map +1 -1
  47. package/internal/errors.d.mts.map +1 -1
  48. package/internal/errors.d.ts.map +1 -1
  49. package/internal/errors.js +0 -2
  50. package/internal/errors.js.map +1 -1
  51. package/internal/errors.mjs +0 -2
  52. package/internal/errors.mjs.map +1 -1
  53. package/internal/headers.d.mts +0 -8
  54. package/internal/headers.d.mts.map +1 -1
  55. package/internal/headers.d.ts +0 -8
  56. package/internal/headers.d.ts.map +1 -1
  57. package/internal/headers.js +0 -2
  58. package/internal/headers.js.map +1 -1
  59. package/internal/headers.mjs +0 -2
  60. package/internal/headers.mjs.map +1 -1
  61. package/internal/parse.d.mts.map +1 -1
  62. package/internal/parse.d.ts.map +1 -1
  63. package/internal/parse.js +0 -4
  64. package/internal/parse.js.map +1 -1
  65. package/internal/parse.mjs +0 -4
  66. package/internal/parse.mjs.map +1 -1
  67. package/internal/shim-types.d.mts +0 -6
  68. package/internal/shim-types.d.mts.map +1 -1
  69. package/internal/shim-types.d.ts +0 -6
  70. package/internal/shim-types.d.ts.map +1 -1
  71. package/internal/shims.d.mts +0 -9
  72. package/internal/shims.d.mts.map +1 -1
  73. package/internal/shims.d.ts +0 -9
  74. package/internal/shims.d.ts.map +1 -1
  75. package/internal/shims.js +2 -7
  76. package/internal/shims.js.map +1 -1
  77. package/internal/shims.mjs +2 -7
  78. package/internal/shims.mjs.map +1 -1
  79. package/internal/to-file.d.mts +0 -16
  80. package/internal/to-file.d.mts.map +1 -1
  81. package/internal/to-file.d.ts +0 -16
  82. package/internal/to-file.d.ts.map +1 -1
  83. package/internal/to-file.js +3 -14
  84. package/internal/to-file.js.map +1 -1
  85. package/internal/to-file.mjs +3 -14
  86. package/internal/to-file.mjs.map +1 -1
  87. package/internal/types.d.mts +1 -32
  88. package/internal/types.d.mts.map +1 -1
  89. package/internal/types.d.ts +1 -32
  90. package/internal/types.d.ts.map +1 -1
  91. package/internal/uploads.d.mts +0 -8
  92. package/internal/uploads.d.mts.map +1 -1
  93. package/internal/uploads.d.ts +0 -8
  94. package/internal/uploads.d.ts.map +1 -1
  95. package/internal/uploads.js +0 -18
  96. package/internal/uploads.js.map +1 -1
  97. package/internal/uploads.mjs +0 -18
  98. package/internal/uploads.mjs.map +1 -1
  99. package/internal/utils/env.d.mts +0 -7
  100. package/internal/utils/env.d.mts.map +1 -1
  101. package/internal/utils/env.d.ts +0 -7
  102. package/internal/utils/env.d.ts.map +1 -1
  103. package/internal/utils/env.js +0 -7
  104. package/internal/utils/env.js.map +1 -1
  105. package/internal/utils/env.mjs +0 -7
  106. package/internal/utils/env.mjs.map +1 -1
  107. package/internal/utils/log.d.mts.map +1 -1
  108. package/internal/utils/log.d.ts.map +1 -1
  109. package/internal/utils/log.js +1 -2
  110. package/internal/utils/log.js.map +1 -1
  111. package/internal/utils/log.mjs +1 -2
  112. package/internal/utils/log.mjs.map +1 -1
  113. package/internal/utils/path.d.mts +0 -3
  114. package/internal/utils/path.d.mts.map +1 -1
  115. package/internal/utils/path.d.ts +0 -3
  116. package/internal/utils/path.d.ts.map +1 -1
  117. package/internal/utils/path.js +0 -6
  118. package/internal/utils/path.js.map +1 -1
  119. package/internal/utils/path.mjs +0 -6
  120. package/internal/utils/path.mjs.map +1 -1
  121. package/internal/utils/query.d.mts +0 -3
  122. package/internal/utils/query.d.mts.map +1 -1
  123. package/internal/utils/query.d.ts +0 -3
  124. package/internal/utils/query.d.ts.map +1 -1
  125. package/internal/utils/query.js +0 -3
  126. package/internal/utils/query.js.map +1 -1
  127. package/internal/utils/query.mjs +0 -3
  128. package/internal/utils/query.mjs.map +1 -1
  129. package/internal/utils/values.d.mts +0 -1
  130. package/internal/utils/values.d.mts.map +1 -1
  131. package/internal/utils/values.d.ts +0 -1
  132. package/internal/utils/values.d.ts.map +1 -1
  133. package/internal/utils/values.js +0 -3
  134. package/internal/utils/values.js.map +1 -1
  135. package/internal/utils/values.mjs +0 -3
  136. package/internal/utils/values.mjs.map +1 -1
  137. package/package.json +3 -3
  138. package/resources/index.d.mts +1 -1
  139. package/resources/index.d.mts.map +1 -1
  140. package/resources/index.d.ts +1 -1
  141. package/resources/index.d.ts.map +1 -1
  142. package/resources/index.js.map +1 -1
  143. package/resources/index.mjs.map +1 -1
  144. package/resources/x/community-notes.d.mts +850 -0
  145. package/resources/x/community-notes.d.mts.map +1 -0
  146. package/resources/x/community-notes.d.ts +850 -0
  147. package/resources/x/community-notes.d.ts.map +1 -0
  148. package/resources/x/community-notes.js +62 -0
  149. package/resources/x/community-notes.js.map +1 -0
  150. package/resources/x/community-notes.mjs +58 -0
  151. package/resources/x/community-notes.mjs.map +1 -0
  152. package/resources/x/index.d.mts +2 -1
  153. package/resources/x/index.d.mts.map +1 -1
  154. package/resources/x/index.d.ts +2 -1
  155. package/resources/x/index.d.ts.map +1 -1
  156. package/resources/x/index.js +3 -1
  157. package/resources/x/index.js.map +1 -1
  158. package/resources/x/index.mjs +1 -0
  159. package/resources/x/index.mjs.map +1 -1
  160. package/resources/x/spaces.d.mts +16 -11
  161. package/resources/x/spaces.d.mts.map +1 -1
  162. package/resources/x/spaces.d.ts +16 -11
  163. package/resources/x/spaces.d.ts.map +1 -1
  164. package/resources/x/spaces.js +4 -3
  165. package/resources/x/spaces.js.map +1 -1
  166. package/resources/x/spaces.mjs +4 -3
  167. package/resources/x/spaces.mjs.map +1 -1
  168. package/resources/x/x.d.mts +279 -3
  169. package/resources/x/x.d.mts.map +1 -1
  170. package/resources/x/x.d.ts +279 -3
  171. package/resources/x/x.d.ts.map +1 -1
  172. package/resources/x/x.js +42 -2
  173. package/resources/x/x.js.map +1 -1
  174. package/resources/x/x.mjs +42 -2
  175. package/resources/x/x.mjs.map +1 -1
  176. package/src/client.ts +16 -54
  177. package/src/core/api-promise.ts +0 -11
  178. package/src/core/error.ts +0 -1
  179. package/src/core/streaming.ts +0 -10
  180. package/src/internal/builtin-types.ts +0 -41
  181. package/src/internal/decoders/line.ts +4 -21
  182. package/src/internal/detect-platform.ts +0 -21
  183. package/src/internal/errors.ts +0 -2
  184. package/src/internal/headers.ts +0 -10
  185. package/src/internal/parse.ts +0 -4
  186. package/src/internal/shim-types.ts +0 -7
  187. package/src/internal/shims.ts +2 -14
  188. package/src/internal/to-file.ts +3 -33
  189. package/src/internal/types.ts +0 -30
  190. package/src/internal/uploads.ts +0 -18
  191. package/src/internal/utils/env.ts +0 -7
  192. package/src/internal/utils/log.ts +1 -2
  193. package/src/internal/utils/path.ts +0 -6
  194. package/src/internal/utils/query.ts +0 -3
  195. package/src/internal/utils/values.ts +0 -3
  196. package/src/resources/index.ts +4 -0
  197. package/src/resources/x/community-notes.ts +1040 -0
  198. package/src/resources/x/index.ts +13 -0
  199. package/src/resources/x/spaces.ts +16 -11
  200. package/src/resources/x/x.ts +362 -2
  201. package/src/version.ts +1 -1
  202. package/version.d.mts +1 -1
  203. package/version.d.ts +1 -1
  204. package/version.js +1 -1
  205. package/version.mjs +1 -1
@@ -65,6 +65,15 @@ export {
65
65
  type CommunityRetrieveSearchParams,
66
66
  type CommunitySearchMembersParams,
67
67
  } from './communities/index';
68
+ export {
69
+ CommunityNotes,
70
+ type CommunityNoteListContributorDeletedNotesResponse,
71
+ type CommunityNoteListContributorNotesResponse,
72
+ type CommunityNoteRetrieveContributorResponse,
73
+ type CommunityNoteListContributorDeletedNotesParams,
74
+ type CommunityNoteListContributorNotesParams,
75
+ type CommunityNoteRetrieveContributorParams,
76
+ } from './community-notes';
68
77
  export {
69
78
  Dm,
70
79
  type DmDeleteMessageResponse,
@@ -206,16 +215,20 @@ export {
206
215
  type XAutocompleteSearchResponse,
207
216
  type XGetArticleResponse,
208
217
  type XGetHashflagsResponse,
218
+ type XGetNewsStoryVersionsResponse,
209
219
  type XGetNotificationsResponse,
210
220
  type XGetTrendLocationsResponse,
211
221
  type XGetTrendsResponse,
222
+ type XGetTrendsHistoryResponse,
212
223
  type XSearchPlacesResponse,
213
224
  type XAutocompleteSearchParams,
214
225
  type XGetArticleParams,
215
226
  type XGetHashflagsParams,
216
227
  type XGetHomeTimelineParams,
228
+ type XGetNewsStoryVersionsParams,
217
229
  type XGetNotificationsParams,
218
230
  type XGetTrendLocationsParams,
219
231
  type XGetTrendsParams,
232
+ type XGetTrendsHistoryParams,
220
233
  type XSearchPlacesParams,
221
234
  } from './x';
@@ -50,9 +50,10 @@ export class Spaces extends APIResource {
50
50
  }
51
51
 
52
52
  /**
53
- * Returns the public Spaces that posts matching the query share, live, scheduled
54
- * or ended. Each page reads up to pageSize posts, 20 by default, and returns each
55
- * Space once. Costs 1 credit per Space.
53
+ * Returns public Spaces each once, as GET /x/spaces/{id} serves them. Latest & Top
54
+ * find the Spaces that matching posts share, live, scheduled or ended. Live &
55
+ * Upcoming read X's own Spaces search, in X's order. It finds live or scheduled
56
+ * Spaces by the words in their titles. Costs 1 credit per Space.
56
57
  *
57
58
  * @example
58
59
  * ```ts
@@ -1021,8 +1022,9 @@ export interface SpaceRetrieveReplayParams {
1021
1022
 
1022
1023
  export interface SpaceSearchParams {
1023
1024
  /**
1024
- * Words, hashtags or X search operators, such as from:solana. The search adds
1025
- * filter:spaces. Alias query.
1025
+ * Words, hashtags or X search operators, such as from:solana. Latest & Top add
1026
+ * filter:spaces. Live & Upcoming match title words only, without operators. Alias
1027
+ * query.
1026
1028
  */
1027
1029
  q: string;
1028
1030
 
@@ -1049,17 +1051,20 @@ export interface SpaceSearchParams {
1049
1051
  omit?: string;
1050
1052
 
1051
1053
  /**
1052
- * Posts a page reads, 20 at a time (1-100, default 20). Posts often share the same
1053
- * Space, so a page returns fewer Spaces. Send 100 to read a search fastest.
1054
- * Aliases: limit, count, max_results, maxItems, max_items & per_page.
1054
+ * For Latest & Top, the posts a page reads, 20 at a time (1-100, default 20). Posts
1055
+ * often share the same Space, so a page returns fewer Spaces. Send 100 to read a
1056
+ * search fastest. For Live & Upcoming, the most Spaces a page returns. Its aliases
1057
+ * are limit, count, max_results, maxItems, max_items & per_page.
1055
1058
  */
1056
1059
  pageSize?: number;
1057
1060
 
1058
1061
  /**
1059
- * Latest sorts by post time. Top ranks by engagement. Any case works. Aliases
1060
- * result_type, sort_order, type, search_type, product, category & section.
1062
+ * Latest finds Spaces in the newest posts. Top finds them in the most engaging
1063
+ * posts. Live lists Spaces on air now. Upcoming lists scheduled ones, as X's Spaces
1064
+ * search does. Any case works. Aliases result_type, sort_order, type, search_type,
1065
+ * product, category & section.
1061
1066
  */
1062
- queryType?: 'Latest' | 'Top';
1067
+ queryType?: 'Latest' | 'Top' | 'Live' | 'Upcoming';
1063
1068
  }
1064
1069
 
1065
1070
  export declare namespace Spaces {
@@ -54,6 +54,16 @@ import {
54
54
  } from './bookmarks';
55
55
  import * as BroadcastsAPI from './broadcasts';
56
56
  import { BroadcastRetrieveParams, BroadcastRetrieveResponse, Broadcasts } from './broadcasts';
57
+ import * as CommunityNotesAPI from './community-notes';
58
+ import {
59
+ CommunityNoteListContributorDeletedNotesParams,
60
+ CommunityNoteListContributorDeletedNotesResponse,
61
+ CommunityNoteListContributorNotesParams,
62
+ CommunityNoteListContributorNotesResponse,
63
+ CommunityNoteRetrieveContributorParams,
64
+ CommunityNoteRetrieveContributorResponse,
65
+ CommunityNotes,
66
+ } from './community-notes';
57
67
  import * as DmAPI from './dm';
58
68
  import {
59
69
  Dm,
@@ -243,6 +253,7 @@ export class X extends APIResource {
243
253
  bookmarks: BookmarksAPI.Bookmarks = new BookmarksAPI.Bookmarks(this._client);
244
254
  lists: ListsAPI.Lists = new ListsAPI.Lists(this._client);
245
255
  broadcasts: BroadcastsAPI.Broadcasts = new BroadcastsAPI.Broadcasts(this._client);
256
+ communityNotes: CommunityNotesAPI.CommunityNotes = new CommunityNotesAPI.CommunityNotes(this._client);
246
257
  spaces: SpacesAPI.Spaces = new SpacesAPI.Spaces(this._client);
247
258
 
248
259
  /**
@@ -315,6 +326,25 @@ export class X extends APIResource {
315
326
  return this._client.get('/x/timeline', { query, ...options });
316
327
  }
317
328
 
329
+ /**
330
+ * Returns each version X wrote of 1 news story, the AI trends x.com shows under
331
+ * Explore & News. Each version has its time, headline & text, oldest first, so you
332
+ * can see how the story changed. X lists every version at once. Each request costs
333
+ * 1 credit.
334
+ *
335
+ * @example
336
+ * ```ts
337
+ * const response = await client.x.getNewsStoryVersions('id');
338
+ * ```
339
+ */
340
+ getNewsStoryVersions(
341
+ id: string,
342
+ query: XGetNewsStoryVersionsParams | null | undefined = {},
343
+ options?: RequestOptions,
344
+ ): APIPromise<XGetNewsStoryVersionsResponse> {
345
+ return this._client.get(path`/x/news/${id}/versions`, { query, ...options });
346
+ }
347
+
318
348
  /**
319
349
  * Returns your X account's notifications, else 424 `account_required`.
320
350
  *
@@ -348,8 +378,10 @@ export class X extends APIResource {
348
378
 
349
379
  /**
350
380
  * Returns X's current trends for a place you choose. Pick it by woeid, country or
351
- * location name. Without one, trends are worldwide. Each request costs 1 credit,
352
- * however many trends it returns.
381
+ * location name. Without one, trends are worldwide. Add at to read what was
382
+ * trending on Twitter at a past time, such as yesterday. Xquik keeps a Twitter
383
+ * trends archive from 2026-10-13 02:20 UTC on, with 1 list per place every 5
384
+ * minutes. Each request costs 1 credit, however many trends it returns.
353
385
  *
354
386
  * @example
355
387
  * ```ts
@@ -363,6 +395,30 @@ export class X extends APIResource {
363
395
  return this._client.get('/x/trends', { query, ...options });
364
396
  }
365
397
 
398
+ /**
399
+ * Returns the Twitter trends archive of a place, as the lists X showed there over a
400
+ * range of time. Use it for trending on Twitter yesterday, last week or any day
401
+ * since 2026-10-13 02:20 UTC. Xquik stores 1 list per place every 5 minutes and
402
+ * keeps it for 25 months. Pick the place by woeid, country or location name, the
403
+ * range with from & to, and the step with every. from & to take a time or a span
404
+ * back from now, such as 7d, so a schedule can read the last day on every run.
405
+ * Each step returns the first list stored in it, with its own time. Each returned
406
+ * list costs 1 credit, so 24 lists cost 24 credits. A step with no stored list
407
+ * returns none and costs nothing. 1 request returns 24 lists, or up to 100 with
408
+ * limit.
409
+ *
410
+ * @example
411
+ * ```ts
412
+ * const response = await client.x.getTrendsHistory();
413
+ * ```
414
+ */
415
+ getTrendsHistory(
416
+ query: XGetTrendsHistoryParams | null | undefined = {},
417
+ options?: RequestOptions,
418
+ ): APIPromise<XGetTrendsHistoryResponse> {
419
+ return this._client.get('/x/trends/history', { query, ...options });
420
+ }
421
+
366
422
  /**
367
423
  * Finds places on X by name. Pass a place's id as place to /x/tweets/search to
368
424
  * read posts tagged there. X ranks the places, so their order can differ between
@@ -939,6 +995,48 @@ export namespace XGetHashflagsResponse {
939
995
  }
940
996
  }
941
997
 
998
+ export interface XGetNewsStoryVersionsResponse {
999
+ /**
1000
+ * The story's ID, as the request named it.
1001
+ */
1002
+ id: string;
1003
+
1004
+ /**
1005
+ * Versions returned.
1006
+ */
1007
+ count: number;
1008
+
1009
+ versions: Array<XGetNewsStoryVersionsResponse.Version>;
1010
+ }
1011
+
1012
+ export namespace XGetNewsStoryVersionsResponse {
1013
+ /**
1014
+ * 1 version X wrote of a news story.
1015
+ */
1016
+ export interface Version {
1017
+ /**
1018
+ * The version's ID.
1019
+ */
1020
+ id: string;
1021
+
1022
+ /**
1023
+ * When X wrote the version, in UTC, from its ID.
1024
+ */
1025
+ createdAt: string;
1026
+
1027
+ /**
1028
+ * The story's headline in this version.
1029
+ */
1030
+ headline: string;
1031
+
1032
+ /**
1033
+ * The story's text in this version, without the time line X writes above it in
1034
+ * the reader's time zone.
1035
+ */
1036
+ text: string;
1037
+ }
1038
+ }
1039
+
942
1040
  export interface XGetNotificationsResponse {
943
1041
  has_next_page: boolean;
944
1042
 
@@ -1029,11 +1127,23 @@ export interface XGetTrendsResponse {
1029
1127
 
1030
1128
  woeid: number;
1031
1129
 
1130
+ /**
1131
+ * When Xquik read this list from X. It comes from the stored list and is never
1132
+ * estimated.
1133
+ */
1134
+ capturedAt?: string;
1135
+
1032
1136
  /**
1033
1137
  * The place country or location named. Absent when woeid picked the place or the
1034
1138
  * request named none.
1035
1139
  */
1036
1140
  location?: XGetTrendsResponse.Location;
1141
+
1142
+ /**
1143
+ * The time at asked for, as Xquik read it. A span such as 24h shows here as the
1144
+ * time it counted back to. Present only with at.
1145
+ */
1146
+ requestedAt?: string;
1037
1147
  }
1038
1148
 
1039
1149
  export namespace XGetTrendsResponse {
@@ -1106,6 +1216,137 @@ export namespace XGetTrendsResponse {
1106
1216
  }
1107
1217
  }
1108
1218
 
1219
+ export interface XGetTrendsHistoryResponse {
1220
+ /**
1221
+ * Lists returned & charged.
1222
+ */
1223
+ count: number;
1224
+
1225
+ /**
1226
+ * Start of the range as Xquik read it. A span such as 7d shows here as the time it
1227
+ * counted back to.
1228
+ */
1229
+ fromTime: string;
1230
+
1231
+ /**
1232
+ * Whether the range holds more lists.
1233
+ */
1234
+ has_next_page: boolean;
1235
+
1236
+ /**
1237
+ * Send it as cursor for the next lists. Empty on the last page.
1238
+ */
1239
+ next_cursor: string;
1240
+
1241
+ /**
1242
+ * 1 stored list per step, oldest first. A step with no stored list is left out.
1243
+ */
1244
+ snapshots: Array<XGetTrendsHistoryResponse.Snapshot>;
1245
+
1246
+ /**
1247
+ * End of the range as Xquik read it, which the range leaves out. Without to, it is
1248
+ * the time of the first request.
1249
+ */
1250
+ toTime: string;
1251
+
1252
+ woeid: number;
1253
+
1254
+ /**
1255
+ * The place the request named by country or location. Absent when it sent a woeid
1256
+ * or named no place.
1257
+ */
1258
+ location?: XGetTrendsHistoryResponse.Location;
1259
+ }
1260
+
1261
+ export namespace XGetTrendsHistoryResponse {
1262
+ export interface Snapshot {
1263
+ /**
1264
+ * When Xquik read this stored list from X. Xquik never estimates it.
1265
+ */
1266
+ capturedAt: string;
1267
+
1268
+ /**
1269
+ * Trends in this list.
1270
+ */
1271
+ count: number;
1272
+
1273
+ trends: Array<Snapshot.Trend>;
1274
+ }
1275
+
1276
+ export namespace Snapshot {
1277
+ export interface Trend {
1278
+ name: string;
1279
+
1280
+ description?: string;
1281
+
1282
+ /**
1283
+ * X's promotion ID of a promoted trend. Null for the others.
1284
+ */
1285
+ promotedContent?: string | null;
1286
+
1287
+ query?: string;
1288
+
1289
+ /**
1290
+ * The trend's place in X's list at that time.
1291
+ */
1292
+ rank?: number;
1293
+
1294
+ /**
1295
+ * X's post count for the trend at that time, when X showed one.
1296
+ */
1297
+ tweetVolume?: number | null;
1298
+
1299
+ /**
1300
+ * The trend's search link on X.
1301
+ */
1302
+ url?: string;
1303
+ }
1304
+ }
1305
+
1306
+ /**
1307
+ * The place the request named by country or location. Absent when it sent a woeid
1308
+ * or named no place.
1309
+ */
1310
+ export interface Location {
1311
+ /**
1312
+ * Country name. Null for Worldwide.
1313
+ */
1314
+ country: string | null;
1315
+
1316
+ /**
1317
+ * 2-letter country code. Null for Worldwide.
1318
+ */
1319
+ countryCode: string | null;
1320
+
1321
+ name: string;
1322
+
1323
+ /**
1324
+ * WOEID of the country or region above it. Null for Worldwide.
1325
+ */
1326
+ parentWoeid: number | null;
1327
+
1328
+ /**
1329
+ * X's kind of place. Town, Country, Supername for Worldwide, or Unknown.
1330
+ */
1331
+ placeType: string | null;
1332
+
1333
+ /**
1334
+ * X's numeric code for the kind of place.
1335
+ */
1336
+ placeTypeCode: number | null;
1337
+
1338
+ /**
1339
+ * X's legacy Yahoo GeoPlanet reference. It may not resolve.
1340
+ */
1341
+ url: string | null;
1342
+
1343
+ /**
1344
+ * Location ID. Pass it as woeid to /x/trends.
1345
+ */
1346
+ woeid: number;
1347
+ }
1348
+ }
1349
+
1109
1350
  export interface XSearchPlacesResponse {
1110
1351
  /**
1111
1352
  * Places returned & charged.
@@ -1380,6 +1621,24 @@ export interface XGetHomeTimelineParams {
1380
1621
  seenTweetIds?: string;
1381
1622
  }
1382
1623
 
1624
+ export interface XGetNewsStoryVersionsParams {
1625
+ /**
1626
+ * Fields to keep in each row, comma-separated. Use dots for nested fields, such as
1627
+ * author.username. A list keeps the field in each item. Case & underscores do not
1628
+ * matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
1629
+ * always stay. An unknown name answers 400 unknown_field with the valid names,
1630
+ * before any read. The price stays the same. SDK row types then hold only the
1631
+ * named fields.
1632
+ */
1633
+ fields?: string;
1634
+
1635
+ /**
1636
+ * Fields to drop from each row, comma-separated. It takes the same names as
1637
+ * fields. With fields, it drops from the kept fields.
1638
+ */
1639
+ omit?: string;
1640
+ }
1641
+
1383
1642
  export interface XGetNotificationsParams {
1384
1643
  /**
1385
1644
  * Pagination cursor for collection results. Also read as next_cursor, next_token,
@@ -1434,6 +1693,17 @@ export interface XGetTrendLocationsParams {
1434
1693
  }
1435
1694
 
1436
1695
  export interface XGetTrendsParams {
1696
+ /**
1697
+ * A past time, to read what was trending on Twitter then. Takes an ISO 8601 time,
1698
+ * a date such as 2026-10-13, or Unix seconds. A time without a zone reads as UTC.
1699
+ * It also takes a span back from now, as a number & s, m, h or d. So at=24h reads
1700
+ * what was trending on Twitter yesterday at this hour, on every run of a schedule.
1701
+ * The answer is the stored list nearest that time, with its own time in
1702
+ * capturedAt. History starts 2026-10-13 02:20 UTC. A time over 24 hours from every
1703
+ * stored list answers 400 at no charge.
1704
+ */
1705
+ at?: string;
1706
+
1437
1707
  /**
1438
1708
  * Number of trending topics to return (1-50, default 30)
1439
1709
  */
@@ -1474,6 +1744,81 @@ export interface XGetTrendsParams {
1474
1744
  woeid?: number;
1475
1745
  }
1476
1746
 
1747
+ export interface XGetTrendsHistoryParams {
1748
+ /**
1749
+ * Trends to return in each list, from 1 to 50.
1750
+ */
1751
+ count?: number;
1752
+
1753
+ /**
1754
+ * Country to read trends history for, by name or 2-letter code, such as Turkey or
1755
+ * TR. Case insensitive.
1756
+ */
1757
+ country?: string;
1758
+
1759
+ /**
1760
+ * The next_cursor of the page before, for the next lists. It keeps the time of the
1761
+ * first request, so a range of spans stays the same on every page.
1762
+ */
1763
+ cursor?: string;
1764
+
1765
+ /**
1766
+ * Step between 2 returned lists, as a number & m, h or d, such as 15m, 1h or 1d. A
1767
+ * step under 5m returns every stored list.
1768
+ */
1769
+ every?: string;
1770
+
1771
+ /**
1772
+ * Fields to keep in each row, comma-separated. Use dots for nested fields, such as
1773
+ * author.username. A list keeps the field in each item. Case & underscores do not
1774
+ * matter. A row that lacks a field leaves it out. Cursors, counts & diagnostics
1775
+ * always stay. An unknown name answers 400 unknown_field with the valid names,
1776
+ * before any read. The price stays the same. SDK row types then hold only the
1777
+ * named fields.
1778
+ */
1779
+ fields?: string;
1780
+
1781
+ /**
1782
+ * Start of the range. Takes an ISO 8601 time, a date such as 2026-10-13, or Unix
1783
+ * seconds. A time without a zone reads as UTC. It also takes a span back from now,
1784
+ * as a number & s, m, h or d, so from=7d reads the last 7 days. Defaults to 24
1785
+ * hours before to. History starts 2026-10-13 02:20 UTC, and a range that begins
1786
+ * earlier returns the stored part. Alias sinceTime.
1787
+ */
1788
+ from?: string;
1789
+
1790
+ /**
1791
+ * Maximum lists 1 request returns & charges. A wider range gives a next_cursor for
1792
+ * the next lists. A low credit balance can return fewer.
1793
+ */
1794
+ limit?: number;
1795
+
1796
+ /**
1797
+ * Town or country to read trends history for, by name, such as Istanbul. Case
1798
+ * insensitive. Add country when 2 towns share a name. /x/trends/locations lists
1799
+ * every name.
1800
+ */
1801
+ location?: string;
1802
+
1803
+ /**
1804
+ * Fields to drop from each row, comma-separated. It takes the same names as
1805
+ * fields. With fields, it drops from the kept fields.
1806
+ */
1807
+ omit?: string;
1808
+
1809
+ /**
1810
+ * End of the range, which it leaves out. Takes the forms of from, so from=2d with
1811
+ * to=1d reads the day before the last 24 hours. Defaults to now. Alias untilTime.
1812
+ */
1813
+ to?: string;
1814
+
1815
+ /**
1816
+ * WOEID of the place, such as 1 for Worldwide or 23424969 for Turkey. It wins over
1817
+ * country & location. /x/trends/locations lists every WOEID.
1818
+ */
1819
+ woeid?: number;
1820
+ }
1821
+
1477
1822
  export interface XSearchPlacesParams {
1478
1823
  /**
1479
1824
  * Place name to search for, such as istanbul. Alias query.
@@ -1519,6 +1864,7 @@ X.AccountConnectionAttempts = AccountConnectionAttempts;
1519
1864
  X.Bookmarks = Bookmarks;
1520
1865
  X.Lists = Lists;
1521
1866
  X.Broadcasts = Broadcasts;
1867
+ X.CommunityNotes = CommunityNotes;
1522
1868
  X.Spaces = Spaces;
1523
1869
 
1524
1870
  export declare namespace X {
@@ -1526,17 +1872,21 @@ export declare namespace X {
1526
1872
  type XAutocompleteSearchResponse as XAutocompleteSearchResponse,
1527
1873
  type XGetArticleResponse as XGetArticleResponse,
1528
1874
  type XGetHashflagsResponse as XGetHashflagsResponse,
1875
+ type XGetNewsStoryVersionsResponse as XGetNewsStoryVersionsResponse,
1529
1876
  type XGetNotificationsResponse as XGetNotificationsResponse,
1530
1877
  type XGetTrendLocationsResponse as XGetTrendLocationsResponse,
1531
1878
  type XGetTrendsResponse as XGetTrendsResponse,
1879
+ type XGetTrendsHistoryResponse as XGetTrendsHistoryResponse,
1532
1880
  type XSearchPlacesResponse as XSearchPlacesResponse,
1533
1881
  type XAutocompleteSearchParams as XAutocompleteSearchParams,
1534
1882
  type XGetArticleParams as XGetArticleParams,
1535
1883
  type XGetHashflagsParams as XGetHashflagsParams,
1536
1884
  type XGetHomeTimelineParams as XGetHomeTimelineParams,
1885
+ type XGetNewsStoryVersionsParams as XGetNewsStoryVersionsParams,
1537
1886
  type XGetNotificationsParams as XGetNotificationsParams,
1538
1887
  type XGetTrendLocationsParams as XGetTrendLocationsParams,
1539
1888
  type XGetTrendsParams as XGetTrendsParams,
1889
+ type XGetTrendsHistoryParams as XGetTrendsHistoryParams,
1540
1890
  type XSearchPlacesParams as XSearchPlacesParams,
1541
1891
  };
1542
1892
 
@@ -1754,6 +2104,16 @@ export declare namespace X {
1754
2104
  type BroadcastRetrieveParams as BroadcastRetrieveParams,
1755
2105
  };
1756
2106
 
2107
+ export {
2108
+ CommunityNotes as CommunityNotes,
2109
+ type CommunityNoteListContributorDeletedNotesResponse as CommunityNoteListContributorDeletedNotesResponse,
2110
+ type CommunityNoteListContributorNotesResponse as CommunityNoteListContributorNotesResponse,
2111
+ type CommunityNoteRetrieveContributorResponse as CommunityNoteRetrieveContributorResponse,
2112
+ type CommunityNoteListContributorDeletedNotesParams as CommunityNoteListContributorDeletedNotesParams,
2113
+ type CommunityNoteListContributorNotesParams as CommunityNoteListContributorNotesParams,
2114
+ type CommunityNoteRetrieveContributorParams as CommunityNoteRetrieveContributorParams,
2115
+ };
2116
+
1757
2117
  export {
1758
2118
  Spaces as Spaces,
1759
2119
  type SpaceRetrieveResponse as SpaceRetrieveResponse,
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.13.3';
5
+ export const VERSION = '0.15.0';
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.13.3";
1
+ export declare const VERSION = "0.15.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.13.3";
1
+ export declare const VERSION = "0.15.0";
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.13.3';
7
+ exports.VERSION = '0.15.0';
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.13.3';
4
+ export const VERSION = '0.15.0';
5
5
  //# sourceMappingURL=version.mjs.map