x-twitter-scraper 0.8.4 → 0.10.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 (147) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -3
  3. package/package.json +1 -1
  4. package/resources/credits.d.mts +5 -5
  5. package/resources/credits.d.ts +5 -5
  6. package/resources/credits.js +2 -2
  7. package/resources/credits.mjs +2 -2
  8. package/resources/draws.d.mts +3 -2
  9. package/resources/draws.d.mts.map +1 -1
  10. package/resources/draws.d.ts +3 -2
  11. package/resources/draws.d.ts.map +1 -1
  12. package/resources/events.d.mts +6 -2
  13. package/resources/events.d.mts.map +1 -1
  14. package/resources/events.d.ts +6 -2
  15. package/resources/events.d.ts.map +1 -1
  16. package/resources/extractions.d.mts +672 -91
  17. package/resources/extractions.d.mts.map +1 -1
  18. package/resources/extractions.d.ts +672 -91
  19. package/resources/extractions.d.ts.map +1 -1
  20. package/resources/extractions.js +3 -2
  21. package/resources/extractions.js.map +1 -1
  22. package/resources/extractions.mjs +3 -2
  23. package/resources/extractions.mjs.map +1 -1
  24. package/resources/guest-wallets.d.mts +20 -18
  25. package/resources/guest-wallets.d.mts.map +1 -1
  26. package/resources/guest-wallets.d.ts +20 -18
  27. package/resources/guest-wallets.d.ts.map +1 -1
  28. package/resources/guest-wallets.js +9 -13
  29. package/resources/guest-wallets.js.map +1 -1
  30. package/resources/guest-wallets.mjs +9 -13
  31. package/resources/guest-wallets.mjs.map +1 -1
  32. package/resources/monitors/monitors.d.mts +8 -0
  33. package/resources/monitors/monitors.d.mts.map +1 -1
  34. package/resources/monitors/monitors.d.ts +8 -0
  35. package/resources/monitors/monitors.d.ts.map +1 -1
  36. package/resources/monitors/monitors.js.map +1 -1
  37. package/resources/monitors/monitors.mjs.map +1 -1
  38. package/resources/shared.d.mts +11 -11
  39. package/resources/shared.d.mts.map +1 -1
  40. package/resources/shared.d.ts +11 -11
  41. package/resources/shared.d.ts.map +1 -1
  42. package/resources/support/attachments.d.mts +33 -0
  43. package/resources/support/attachments.d.mts.map +1 -0
  44. package/resources/support/attachments.d.ts +33 -0
  45. package/resources/support/attachments.d.ts.map +1 -0
  46. package/resources/support/attachments.js +42 -0
  47. package/resources/support/attachments.js.map +1 -0
  48. package/resources/support/attachments.mjs +38 -0
  49. package/resources/support/attachments.mjs.map +1 -0
  50. package/resources/support/index.d.mts +1 -0
  51. package/resources/support/index.d.mts.map +1 -1
  52. package/resources/support/index.d.ts +1 -0
  53. package/resources/support/index.d.ts.map +1 -1
  54. package/resources/support/index.js +3 -1
  55. package/resources/support/index.js.map +1 -1
  56. package/resources/support/index.mjs +1 -0
  57. package/resources/support/index.mjs.map +1 -1
  58. package/resources/support/support.d.mts +4 -0
  59. package/resources/support/support.d.mts.map +1 -1
  60. package/resources/support/support.d.ts +4 -0
  61. package/resources/support/support.d.ts.map +1 -1
  62. package/resources/support/support.js +4 -0
  63. package/resources/support/support.js.map +1 -1
  64. package/resources/support/support.mjs +4 -0
  65. package/resources/support/support.mjs.map +1 -1
  66. package/resources/x/accounts.d.mts +3 -5
  67. package/resources/x/accounts.d.mts.map +1 -1
  68. package/resources/x/accounts.d.ts +3 -5
  69. package/resources/x/accounts.d.ts.map +1 -1
  70. package/resources/x/communities/communities.d.mts +112 -0
  71. package/resources/x/communities/communities.d.mts.map +1 -1
  72. package/resources/x/communities/communities.d.ts +112 -0
  73. package/resources/x/communities/communities.d.ts.map +1 -1
  74. package/resources/x/communities/communities.js.map +1 -1
  75. package/resources/x/communities/communities.mjs.map +1 -1
  76. package/resources/x/index.d.mts +2 -2
  77. package/resources/x/index.d.mts.map +1 -1
  78. package/resources/x/index.d.ts +2 -2
  79. package/resources/x/index.d.ts.map +1 -1
  80. package/resources/x/index.js.map +1 -1
  81. package/resources/x/index.mjs.map +1 -1
  82. package/resources/x/lists.d.mts +115 -4
  83. package/resources/x/lists.d.mts.map +1 -1
  84. package/resources/x/lists.d.ts +115 -4
  85. package/resources/x/lists.d.ts.map +1 -1
  86. package/resources/x/tweets/index.d.mts +1 -1
  87. package/resources/x/tweets/index.d.mts.map +1 -1
  88. package/resources/x/tweets/index.d.ts +1 -1
  89. package/resources/x/tweets/index.d.ts.map +1 -1
  90. package/resources/x/tweets/index.js.map +1 -1
  91. package/resources/x/tweets/index.mjs.map +1 -1
  92. package/resources/x/tweets/tweets.d.mts +482 -38
  93. package/resources/x/tweets/tweets.d.mts.map +1 -1
  94. package/resources/x/tweets/tweets.d.ts +482 -38
  95. package/resources/x/tweets/tweets.d.ts.map +1 -1
  96. package/resources/x/tweets/tweets.js +5 -8
  97. package/resources/x/tweets/tweets.js.map +1 -1
  98. package/resources/x/tweets/tweets.mjs +5 -8
  99. package/resources/x/tweets/tweets.mjs.map +1 -1
  100. package/resources/x/users/index.d.mts +1 -1
  101. package/resources/x/users/index.d.mts.map +1 -1
  102. package/resources/x/users/index.d.ts +1 -1
  103. package/resources/x/users/index.d.ts.map +1 -1
  104. package/resources/x/users/index.js.map +1 -1
  105. package/resources/x/users/index.mjs.map +1 -1
  106. package/resources/x/users/users.d.mts +910 -40
  107. package/resources/x/users/users.d.mts.map +1 -1
  108. package/resources/x/users/users.d.ts +910 -40
  109. package/resources/x/users/users.d.ts.map +1 -1
  110. package/resources/x/users/users.js +12 -7
  111. package/resources/x/users/users.js.map +1 -1
  112. package/resources/x/users/users.mjs +12 -7
  113. package/resources/x/users/users.mjs.map +1 -1
  114. package/resources/x/x.d.mts +4 -4
  115. package/resources/x/x.d.mts.map +1 -1
  116. package/resources/x/x.d.ts +4 -4
  117. package/resources/x/x.d.ts.map +1 -1
  118. package/resources/x/x.js.map +1 -1
  119. package/resources/x/x.mjs.map +1 -1
  120. package/src/resources/credits.ts +5 -5
  121. package/src/resources/draws.ts +3 -2
  122. package/src/resources/events.ts +7 -2
  123. package/src/resources/extractions.ts +929 -185
  124. package/src/resources/guest-wallets.ts +20 -18
  125. package/src/resources/monitors/monitors.ts +10 -0
  126. package/src/resources/shared.ts +17 -9
  127. package/src/resources/support/attachments.ts +57 -0
  128. package/src/resources/support/index.ts +1 -0
  129. package/src/resources/support/support.ts +6 -0
  130. package/src/resources/x/accounts.ts +3 -5
  131. package/src/resources/x/communities/communities.ts +140 -0
  132. package/src/resources/x/index.ts +4 -0
  133. package/src/resources/x/lists.ts +143 -4
  134. package/src/resources/x/tweets/index.ts +1 -0
  135. package/src/resources/x/tweets/tweets.ts +610 -37
  136. package/src/resources/x/users/index.ts +3 -0
  137. package/src/resources/x/users/users.ts +1363 -221
  138. package/src/resources/x/x.ts +8 -0
  139. package/src/version.ts +1 -1
  140. package/version.d.mts +1 -1
  141. package/version.d.mts.map +1 -1
  142. package/version.d.ts +1 -1
  143. package/version.d.ts.map +1 -1
  144. package/version.js +1 -1
  145. package/version.js.map +1 -1
  146. package/version.mjs +1 -1
  147. package/version.mjs.map +1 -1
@@ -61,7 +61,7 @@ export declare class Extractions extends APIResource {
61
61
  * });
62
62
  * ```
63
63
  */
64
- run(body: ExtractionRunParams, options?: RequestOptions): APIPromise<ExtractionRunResponse>;
64
+ run(params: ExtractionRunParams, options?: RequestOptions): APIPromise<ExtractionRunResponse>;
65
65
  }
66
66
  /**
67
67
  * Extraction job tracking status, tool type, and result count.
@@ -100,30 +100,46 @@ export interface ExtractionEstimateCostResponse {
100
100
  creditsAvailable: string;
101
101
  creditsRequired: string;
102
102
  estimatedResults: number;
103
- source: 'followers' | 'following' | 'paginationCap' | 'posts' | 'quoteCount' | 'replyCount' | 'resultsLimit' | 'retweetCount' | 'unknown';
103
+ source: 'followers' | 'following' | 'collection' | 'paginationCap' | 'posts' | 'quoteCount' | 'replyCount' | 'resultsLimit' | 'retweetCount' | 'unknown';
104
104
  resolvedXUserId?: string;
105
105
  }
106
106
  export interface ExtractionRunResponse {
107
- id: string;
108
- status: 'running';
109
- /**
110
- * Identifier for the extraction tool used to run a job.
111
- */
112
- toolType: 'article_extractor' | 'community_extractor' | 'community_moderator_explorer' | 'community_post_extractor' | 'community_search' | 'favoriters' | 'follower_explorer' | 'following_explorer' | 'list_follower_explorer' | 'list_member_extractor' | 'list_post_extractor' | 'mention_extractor' | 'people_search' | 'post_extractor' | 'quote_extractor' | 'reply_extractor' | 'repost_extractor' | 'space_explorer' | 'thread_extractor' | 'tweet_search_extractor' | 'user_likes' | 'user_media' | 'verified_follower_explorer';
107
+ allowed: boolean;
108
+ creditsAvailable: string;
109
+ creditsRequired: string;
110
+ estimatedResults: number;
111
+ source: string;
112
+ resolvedXUserId?: string;
113
113
  }
114
114
  export interface ExtractionRetrieveParams {
115
115
  /**
116
- * Cursor for keyset pagination from prior response next_cursor
116
+ * Previous nextCursor.
117
117
  */
118
118
  cursor?: string;
119
+ /**
120
+ * Preserve source keys or convert result field names.
121
+ */
122
+ fieldStyle?: 'source' | 'camelCase' | 'snake_case';
123
+ /**
124
+ * Use outputMode=raw instead.
125
+ */
126
+ includeRaw?: boolean;
119
127
  /**
120
128
  * Maximum number of results to return (1-1000, default 100)
121
129
  */
122
130
  limit?: number;
131
+ /**
132
+ * Select compact, full, or raw-compatible result fields.
133
+ */
134
+ outputMode?: 'compact' | 'full' | 'raw';
135
+ /**
136
+ * Keep enrichment nested or merge it into each result.
137
+ */
138
+ outputPreset?: 'nested' | 'flat';
123
139
  }
124
140
  export interface ExtractionListParams {
125
141
  /**
126
- * Cursor for keyset pagination from prior response next_cursor
142
+ * Previous nextCursor.
127
143
  */
128
144
  cursor?: string;
129
145
  /**
@@ -148,319 +164,884 @@ export interface ExtractionEstimateCostParams {
148
164
  */
149
165
  toolType: 'article_extractor' | 'community_extractor' | 'community_moderator_explorer' | 'community_post_extractor' | 'community_search' | 'favoriters' | 'follower_explorer' | 'following_explorer' | 'list_follower_explorer' | 'list_member_extractor' | 'list_post_extractor' | 'mention_extractor' | 'people_search' | 'post_extractor' | 'quote_extractor' | 'reply_extractor' | 'repost_extractor' | 'space_explorer' | 'thread_extractor' | 'tweet_search_extractor' | 'user_likes' | 'user_media' | 'verified_follower_explorer';
150
166
  /**
151
- * Raw advanced query string appended to the estimate (tweet_search_extractor)
167
+ * Raw advanced search query appended as-is (tweet_search_extractor)
152
168
  */
153
169
  advancedQuery?: string;
154
170
  /**
155
- * Alternative words or quoted phrases for estimated results. Separate with spaces,
156
- * commas, or lines.
171
+ * Words or quoted phrases where any one can match. Separate with spaces, commas,
172
+ * or lines. (tweet_search_extractor)
157
173
  */
158
174
  anyWords?: string;
159
175
  /**
160
- * Geo bounding box used for estimation, e.g. -74.1 40.6 -73.9 40.8
161
- * (tweet_search_extractor)
176
+ * Bio terms separated by commas or lines.
177
+ */
178
+ bioContains?: string;
179
+ /**
180
+ * Return only Blue-verified Tweet authors.
181
+ */
182
+ blueVerifiedOnly?: boolean;
183
+ /**
184
+ * Geo bounding box, e.g. -74.1 40.6 -73.9 40.8 (tweet_search_extractor)
162
185
  */
163
186
  boundingBox?: string;
164
187
  /**
165
- * Cashtags applied to the estimate, separated by spaces, commas, or lines.
188
+ * Match the Tweet card name.
189
+ */
190
+ cardName?: string;
191
+ /**
192
+ * Cashtags separated by spaces, commas, or lines. (tweet_search_extractor)
166
193
  */
167
194
  cashtags?: string;
168
195
  /**
169
- * Conversation ID filter used for estimation (tweet_search_extractor)
196
+ * Reply collection strategy.
197
+ */
198
+ collectionStrategy?: 'auto' | 'complete' | 'direct' | 'search' | 'thread';
199
+ /**
200
+ * Conversation ID filter (tweet_search_extractor)
170
201
  */
171
202
  conversationId?: string;
172
203
  /**
173
- * Exact phrase filter for search estimation
204
+ * Merge duplicate results across collection targets.
205
+ */
206
+ dedupeAcrossTargets?: boolean;
207
+ /**
208
+ * Keep target duplicates, first rows, or merged overlap.
209
+ */
210
+ dedupeMode?: 'none' | 'first' | 'merge';
211
+ /**
212
+ * Exact phrase to match (tweet_search_extractor)
174
213
  */
175
214
  exactPhrase?: string;
176
215
  /**
177
- * Words or quoted phrases excluded from estimated results. Separate with spaces,
178
- * commas, or lines.
216
+ * Exclude replies from the source author.
217
+ */
218
+ excludeOriginalAuthor?: boolean;
219
+ /**
220
+ * Exclude a source application.
221
+ */
222
+ excludeSource?: string;
223
+ /**
224
+ * Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
225
+ * (tweet_search_extractor)
179
226
  */
180
227
  excludeWords?: string;
181
228
  /**
182
- * Estimate only tweets from this author username (tweet_search_extractor)
229
+ * Filter by author username (tweet_search_extractor)
183
230
  */
184
231
  fromUser?: string;
185
232
  /**
186
- * Hashtags applied to the estimate, separated by spaces, commas, or lines.
233
+ * Match latitude, longitude, and radius.
234
+ */
235
+ geocode?: string;
236
+ /**
237
+ * Hashtags separated by spaces, commas, or lines. (tweet_search_extractor)
187
238
  */
188
239
  hashtags?: string;
189
240
  /**
190
- * Estimate only replies to this tweet ID (tweet_search_extractor)
241
+ * Require a profile location.
242
+ */
243
+ hasLocation?: boolean;
244
+ /**
245
+ * Return only replies with media.
246
+ */
247
+ hasMediaOnly?: boolean;
248
+ /**
249
+ * Require a profile website.
250
+ */
251
+ hasWebsite?: boolean;
252
+ /**
253
+ * Include the source post in reply results.
254
+ */
255
+ includeOriginalPost?: boolean;
256
+ /**
257
+ * Add matching search terms to collection metadata.
258
+ */
259
+ includeSearchTerms?: boolean;
260
+ /**
261
+ * Add source target metadata to each result.
262
+ */
263
+ includeTargetMetadata?: boolean;
264
+ /**
265
+ * Only replies to this tweet ID (tweet_search_extractor)
191
266
  */
192
267
  inReplyToTweetId?: string;
193
268
  /**
194
- * Language code used for estimate filtering (tweet_search_extractor)
269
+ * Language code filter (tweet_search_extractor)
195
270
  */
196
271
  language?: string;
197
272
  /**
198
- * Estimate search results within this list ID (tweet_search_extractor)
273
+ * Search within a list ID (tweet_search_extractor)
199
274
  */
200
275
  listId?: string;
201
276
  /**
202
- * Media type used for estimate filtering (tweet_search_extractor)
277
+ * Required profile location text.
278
+ */
279
+ locationContains?: string;
280
+ /**
281
+ * Maximum nested reply depth.
282
+ */
283
+ maxDepth?: number;
284
+ /**
285
+ * Maximum follower count for profile results.
286
+ */
287
+ maxFollowers?: number;
288
+ /**
289
+ * Maximum following count for profile results.
290
+ */
291
+ maxFollowing?: number;
292
+ /**
293
+ * Return Tweets older than this Tweet ID.
294
+ */
295
+ maxId?: string;
296
+ /**
297
+ * Maximum results collected for each target.
298
+ */
299
+ maxItemsPerTarget?: number;
300
+ /**
301
+ * Maximum Tweet like count.
302
+ */
303
+ maxLikes?: number;
304
+ /**
305
+ * Reply pages collected for each target.
306
+ */
307
+ maxPagesPerTarget?: number;
308
+ /**
309
+ * Maximum post count for profile results.
310
+ */
311
+ maxPosts?: number;
312
+ /**
313
+ * Maximum Tweet quote count.
314
+ */
315
+ maxQuotes?: number;
316
+ /**
317
+ * Maximum Tweet reply count.
318
+ */
319
+ maxReplies?: number;
320
+ /**
321
+ * Maximum Tweet repost count.
322
+ */
323
+ maxRetweets?: number;
324
+ /**
325
+ * Media type filter (tweet_search_extractor)
203
326
  */
204
327
  mediaType?: 'images' | 'videos' | 'gifs' | 'media' | 'links' | 'none';
205
328
  /**
206
- * Estimate tweets mentioning this username (tweet_search_extractor)
329
+ * Filter tweets mentioning a username (tweet_search_extractor)
207
330
  */
208
331
  mentioning?: string;
209
332
  /**
210
- * Minimum likes threshold for estimated results (tweet_search_extractor)
333
+ * Minimum profile age in days.
334
+ */
335
+ minAccountAgeDays?: number;
336
+ /**
337
+ * Minimum Tweet bookmark count.
338
+ */
339
+ minBookmarks?: number;
340
+ /**
341
+ * Minimum likes threshold (tweet_search_extractor)
211
342
  */
212
343
  minFaves?: number;
213
344
  /**
214
- * Minimum quote count threshold for estimated results (tweet_search_extractor)
345
+ * Minimum follower count for profile results.
346
+ */
347
+ minFollowers?: number;
348
+ /**
349
+ * Minimum following count for profile results.
350
+ */
351
+ minFollowing?: number;
352
+ /**
353
+ * Minimum post count for profile results.
354
+ */
355
+ minPosts?: number;
356
+ /**
357
+ * Minimum quote count threshold (tweet_search_extractor)
215
358
  */
216
359
  minQuotes?: number;
217
360
  /**
218
- * Minimum replies threshold for estimated results (tweet_search_extractor)
361
+ * Minimum replies threshold (tweet_search_extractor)
219
362
  */
220
363
  minReplies?: number;
221
364
  /**
222
- * Minimum retweets threshold for estimated results (tweet_search_extractor)
365
+ * Minimum retweets threshold (tweet_search_extractor)
223
366
  */
224
367
  minRetweets?: number;
225
368
  /**
226
- * Estimate search results within this place ID (tweet_search_extractor)
369
+ * Minimum Tweet view count.
370
+ */
371
+ minViews?: number;
372
+ /**
373
+ * Only return native reposts.
374
+ */
375
+ nativeRetweets?: boolean;
376
+ /**
377
+ * Match a place name.
378
+ */
379
+ near?: string;
380
+ /**
381
+ * Only return news results.
382
+ */
383
+ news?: boolean;
384
+ /**
385
+ * Shortcut for dedupeMode=merge.
386
+ */
387
+ overlapMode?: boolean;
388
+ /**
389
+ * Search within a place ID (tweet_search_extractor)
227
390
  */
228
391
  place?: string;
229
392
  /**
230
- * Estimate search results within this country code (tweet_search_extractor)
393
+ * Search within a country code (tweet_search_extractor)
231
394
  */
232
395
  placeCountry?: string;
233
396
  /**
234
- * Geo point radius used for estimation, e.g. -73.99 40.73 25mi
235
- * (tweet_search_extractor)
397
+ * Geo point radius, e.g. -73.99 40.73 25mi (tweet_search_extractor)
236
398
  */
237
399
  pointRadius?: string;
238
400
  /**
239
- * Quote mode used for estimation (tweet_search_extractor)
401
+ * Search ranking applied to every query.
402
+ */
403
+ queryType?: 'Latest' | 'Top' | 'Both';
404
+ /**
405
+ * Quote mode (tweet_search_extractor)
240
406
  */
241
407
  quotes?: 'include' | 'exclude' | 'only';
242
408
  /**
243
- * Estimate only quotes of this tweet ID (tweet_search_extractor)
409
+ * Only quotes of this tweet ID (tweet_search_extractor)
244
410
  */
245
411
  quotesOfTweetId?: string;
246
412
  /**
247
- * Reply mode used for estimation (tweet_search_extractor)
413
+ * Profile relations processed within one job.
414
+ */
415
+ relationTargets?: Array<ExtractionEstimateCostParams.RelationTarget>;
416
+ /**
417
+ * Reply mode (tweet_search_extractor)
248
418
  */
249
419
  replies?: 'include' | 'exclude' | 'only';
250
420
  /**
251
- * Maximum number of results to estimate. When set, the estimate caps projected
252
- * results to this value.
421
+ * Maximum number of results to extract. When set, the extraction stops after
422
+ * reaching this limit.
253
423
  */
254
424
  resultsLimit?: number;
255
425
  /**
256
- * Retweet mode used for estimation (tweet_search_extractor)
426
+ * Retweet mode (tweet_search_extractor)
257
427
  */
258
428
  retweets?: 'include' | 'exclude' | 'only';
259
429
  /**
260
- * Estimate only retweets of this tweet ID (tweet_search_extractor)
430
+ * Only retweets of this tweet ID (tweet_search_extractor)
261
431
  */
262
432
  retweetsOfTweetId?: string;
263
433
  /**
264
- * Query used to price tweet_search_extractor or community_search.
434
+ * Enable the safe-search filter.
435
+ */
436
+ safe?: boolean;
437
+ /**
438
+ * Reply depth scope.
439
+ */
440
+ scope?: 'all' | 'direct' | 'nested';
441
+ /**
442
+ * Search queries processed as one collection job.
443
+ */
444
+ searchQueries?: Array<string>;
445
+ /**
446
+ * Required for tweet_search_extractor & community_search.
265
447
  */
266
448
  searchQuery?: string;
267
449
  /**
268
- * Estimate start date in YYYY-MM-DD format (tweet_search_extractor)
450
+ * Start date YYYY-MM-DD (tweet_search_extractor)
269
451
  */
270
452
  sinceDate?: string;
271
453
  /**
272
- * Community ID used to price community_post_extractor or community_search.
454
+ * Return Tweets newer than this Tweet ID.
455
+ */
456
+ sinceId?: string;
457
+ /**
458
+ * Reply start time as ISO 8601 or Unix seconds.
459
+ */
460
+ sinceTime?: string | number;
461
+ /**
462
+ * Reply result order.
463
+ */
464
+ sort?: 'relevance' | 'latest' | 'oldest' | 'likes';
465
+ /**
466
+ * Match the source application.
467
+ */
468
+ source?: string;
469
+ /**
470
+ * Resume one reply target from this cursor.
471
+ */
472
+ startCursor?: string;
473
+ /**
474
+ * Required for community_post_extractor & community_search.
273
475
  */
274
476
  targetCommunityId?: string;
275
477
  /**
276
- * List ID used to price list_follower_explorer, list_member_extractor, or
478
+ * Community IDs processed as one collection job.
479
+ */
480
+ targetCommunityIds?: Array<string>;
481
+ /**
482
+ * Required for list_follower_explorer, list_member_extractor &
277
483
  * list_post_extractor.
278
484
  */
279
485
  targetListId?: string;
280
486
  /**
281
- * Space ID used to price space_explorer.
487
+ * List IDs processed as one collection job.
488
+ */
489
+ targetListIds?: Array<string>;
490
+ /**
491
+ * Mixed targets auto-routed within one job.
492
+ */
493
+ targets?: Array<string | ExtractionEstimateCostParams.UnionMember1>;
494
+ /**
495
+ * Required for space_explorer.
282
496
  */
283
497
  targetSpaceId?: string;
284
498
  targetTweetId?: string;
499
+ /**
500
+ * Tweet IDs processed as one collection job.
501
+ */
502
+ targetTweetIds?: Array<string>;
285
503
  targetUsername?: string;
286
504
  /**
287
- * Estimate replies sent to this username (tweet_search_extractor)
505
+ * Usernames processed as one collection job.
506
+ */
507
+ targetUsernames?: Array<string>;
508
+ /**
509
+ * Filter replies sent to a username (tweet_search_extractor)
288
510
  */
289
511
  toUser?: string;
290
512
  /**
291
- * Estimate end date in YYYY-MM-DD format (tweet_search_extractor)
513
+ * End date YYYY-MM-DD (tweet_search_extractor)
292
514
  */
293
515
  untilDate?: string;
294
516
  /**
295
- * URL substring or domain filter used for estimation (tweet_search_extractor)
517
+ * Reply end time as ISO 8601 or Unix seconds.
518
+ */
519
+ untilTime?: string | number;
520
+ /**
521
+ * URL substring or domain filter (tweet_search_extractor)
296
522
  */
297
523
  url?: string;
298
524
  /**
299
- * Estimate only verified authors (tweet_search_extractor)
525
+ * Required username text.
526
+ */
527
+ usernameContains?: string;
528
+ /**
529
+ * Only verified authors (tweet_search_extractor)
300
530
  */
301
531
  verifiedOnly?: boolean;
532
+ /**
533
+ * Exact profile verification type.
534
+ */
535
+ verifiedType?: string;
536
+ /**
537
+ * Set the radius for the near filter.
538
+ */
539
+ within?: string;
540
+ /**
541
+ * Match Tweets inside a recent time window.
542
+ */
543
+ withinTime?: string;
544
+ }
545
+ export declare namespace ExtractionEstimateCostParams {
546
+ /**
547
+ * One target and relation in a mixed profile collection.
548
+ */
549
+ interface RelationTarget {
550
+ relation: 'community_members' | 'followers' | 'following' | 'list_followers' | 'list_members' | 'verified_followers';
551
+ value: string;
552
+ }
553
+ interface UnionMember1 {
554
+ kind: 'favoriters' | 'list' | 'profile' | 'profile_likes' | 'profile_media' | 'profile_replies' | 'quotes' | 'replies' | 'retweeters' | 'search' | 'thread' | 'tweet';
555
+ value: string;
556
+ }
302
557
  }
303
558
  export interface ExtractionExportResultsParams {
304
559
  /**
305
560
  * Export file format
306
561
  */
307
562
  format: 'csv' | 'json' | 'md' | 'md-document' | 'pdf' | 'txt' | 'xlsx';
563
+ /**
564
+ * Require a non-empty description.
565
+ */
566
+ hasDescription?: boolean;
567
+ /**
568
+ * Require a non-empty location.
569
+ */
570
+ hasLocation?: boolean;
571
+ /**
572
+ * Require media.
573
+ */
574
+ hasMedia?: boolean;
575
+ /**
576
+ * Filter by language code.
577
+ */
578
+ lang?: string;
579
+ /**
580
+ * Maximum follower count.
581
+ */
582
+ maxFollowers?: number;
583
+ /**
584
+ * Maximum following count.
585
+ */
586
+ maxFollowing?: number;
587
+ /**
588
+ * Maximum post count.
589
+ */
590
+ maxPosts?: number;
591
+ /**
592
+ * Minimum follower count.
593
+ */
594
+ minFollowers?: number;
595
+ /**
596
+ * Minimum following count.
597
+ */
598
+ minFollowing?: number;
599
+ /**
600
+ * Minimum like count.
601
+ */
602
+ minLikes?: number;
603
+ /**
604
+ * Minimum post count.
605
+ */
606
+ minPosts?: number;
607
+ /**
608
+ * Minimum reply count.
609
+ */
610
+ minReplies?: number;
611
+ /**
612
+ * Minimum repost count.
613
+ */
614
+ minRetweets?: number;
615
+ /**
616
+ * Minimum view count.
617
+ */
618
+ minViews?: number;
619
+ /**
620
+ * Search exported result text.
621
+ */
622
+ search?: string;
623
+ /**
624
+ * Include results on or after this date.
625
+ */
626
+ sinceDate?: string;
627
+ /**
628
+ * Include results on or before this date.
629
+ */
630
+ untilDate?: string;
631
+ /**
632
+ * Filter by verified status.
633
+ */
634
+ verified?: boolean;
308
635
  }
309
636
  export interface ExtractionRunParams {
310
637
  /**
311
- * Identifier for the extraction tool used to run a job.
638
+ * Body param: Identifier for the extraction tool used to run a job.
312
639
  */
313
640
  toolType: 'article_extractor' | 'community_extractor' | 'community_moderator_explorer' | 'community_post_extractor' | 'community_search' | 'favoriters' | 'follower_explorer' | 'following_explorer' | 'list_follower_explorer' | 'list_member_extractor' | 'list_post_extractor' | 'mention_extractor' | 'people_search' | 'post_extractor' | 'quote_extractor' | 'reply_extractor' | 'repost_extractor' | 'space_explorer' | 'thread_extractor' | 'tweet_search_extractor' | 'user_likes' | 'user_media' | 'verified_follower_explorer';
314
641
  /**
315
- * Raw advanced search query appended as-is (tweet_search_extractor)
642
+ * Query param: Estimate cost without creating an extraction.
643
+ */
644
+ dry_run?: boolean;
645
+ /**
646
+ * Body param: Raw advanced search query appended as-is (tweet_search_extractor)
316
647
  */
317
648
  advancedQuery?: string;
318
649
  /**
319
- * Words or quoted phrases where any one can match. Separate with spaces, commas,
320
- * or lines. (tweet_search_extractor)
650
+ * Body param: Words or quoted phrases where any one can match. Separate with
651
+ * spaces, commas, or lines. (tweet_search_extractor)
321
652
  */
322
653
  anyWords?: string;
323
654
  /**
324
- * Geo bounding box, e.g. -74.1 40.6 -73.9 40.8 (tweet_search_extractor)
655
+ * Body param: Bio terms separated by commas or lines.
656
+ */
657
+ bioContains?: string;
658
+ /**
659
+ * Body param: Return only Blue-verified Tweet authors.
660
+ */
661
+ blueVerifiedOnly?: boolean;
662
+ /**
663
+ * Body param: Geo bounding box, e.g. -74.1 40.6 -73.9 40.8
664
+ * (tweet_search_extractor)
325
665
  */
326
666
  boundingBox?: string;
327
667
  /**
328
- * Cashtags separated by spaces, commas, or lines. (tweet_search_extractor)
668
+ * Body param: Match the Tweet card name.
669
+ */
670
+ cardName?: string;
671
+ /**
672
+ * Body param: Cashtags separated by spaces, commas, or lines.
673
+ * (tweet_search_extractor)
329
674
  */
330
675
  cashtags?: string;
331
676
  /**
332
- * Conversation ID filter (tweet_search_extractor)
677
+ * Body param: Reply collection strategy.
678
+ */
679
+ collectionStrategy?: 'auto' | 'complete' | 'direct' | 'search' | 'thread';
680
+ /**
681
+ * Body param: Conversation ID filter (tweet_search_extractor)
333
682
  */
334
683
  conversationId?: string;
335
684
  /**
336
- * Exact phrase to match (tweet_search_extractor)
685
+ * Body param: Merge duplicate results across collection targets.
686
+ */
687
+ dedupeAcrossTargets?: boolean;
688
+ /**
689
+ * Body param: Keep target duplicates, first rows, or merged overlap.
690
+ */
691
+ dedupeMode?: 'none' | 'first' | 'merge';
692
+ /**
693
+ * Body param: Exact phrase to match (tweet_search_extractor)
337
694
  */
338
695
  exactPhrase?: string;
339
696
  /**
340
- * Words or quoted phrases to exclude. Separate with spaces, commas, or lines.
341
- * (tweet_search_extractor)
697
+ * Body param: Exclude replies from the source author.
698
+ */
699
+ excludeOriginalAuthor?: boolean;
700
+ /**
701
+ * Body param: Exclude a source application.
702
+ */
703
+ excludeSource?: string;
704
+ /**
705
+ * Body param: Words or quoted phrases to exclude. Separate with spaces, commas, or
706
+ * lines. (tweet_search_extractor)
342
707
  */
343
708
  excludeWords?: string;
344
709
  /**
345
- * Filter by author username (tweet_search_extractor)
710
+ * Body param: Filter by author username (tweet_search_extractor)
346
711
  */
347
712
  fromUser?: string;
348
713
  /**
349
- * Hashtags separated by spaces, commas, or lines. (tweet_search_extractor)
714
+ * Body param: Match latitude, longitude, and radius.
715
+ */
716
+ geocode?: string;
717
+ /**
718
+ * Body param: Hashtags separated by spaces, commas, or lines.
719
+ * (tweet_search_extractor)
350
720
  */
351
721
  hashtags?: string;
352
722
  /**
353
- * Only replies to this tweet ID (tweet_search_extractor)
723
+ * Body param: Require a profile location.
724
+ */
725
+ hasLocation?: boolean;
726
+ /**
727
+ * Body param: Return only replies with media.
728
+ */
729
+ hasMediaOnly?: boolean;
730
+ /**
731
+ * Body param: Require a profile website.
732
+ */
733
+ hasWebsite?: boolean;
734
+ /**
735
+ * Body param: Include the source post in reply results.
736
+ */
737
+ includeOriginalPost?: boolean;
738
+ /**
739
+ * Body param: Add matching search terms to collection metadata.
740
+ */
741
+ includeSearchTerms?: boolean;
742
+ /**
743
+ * Body param: Add source target metadata to each result.
744
+ */
745
+ includeTargetMetadata?: boolean;
746
+ /**
747
+ * Body param: Only replies to this tweet ID (tweet_search_extractor)
354
748
  */
355
749
  inReplyToTweetId?: string;
356
750
  /**
357
- * Language code filter (tweet_search_extractor)
751
+ * Body param: Language code filter (tweet_search_extractor)
358
752
  */
359
753
  language?: string;
360
754
  /**
361
- * Search within a list ID (tweet_search_extractor)
755
+ * Body param: Search within a list ID (tweet_search_extractor)
362
756
  */
363
757
  listId?: string;
364
758
  /**
365
- * Media type filter (tweet_search_extractor)
759
+ * Body param: Required profile location text.
760
+ */
761
+ locationContains?: string;
762
+ /**
763
+ * Body param: Maximum nested reply depth.
764
+ */
765
+ maxDepth?: number;
766
+ /**
767
+ * Body param: Maximum follower count for profile results.
768
+ */
769
+ maxFollowers?: number;
770
+ /**
771
+ * Body param: Maximum following count for profile results.
772
+ */
773
+ maxFollowing?: number;
774
+ /**
775
+ * Body param: Return Tweets older than this Tweet ID.
776
+ */
777
+ maxId?: string;
778
+ /**
779
+ * Body param: Maximum results collected for each target.
780
+ */
781
+ maxItemsPerTarget?: number;
782
+ /**
783
+ * Body param: Maximum Tweet like count.
784
+ */
785
+ maxLikes?: number;
786
+ /**
787
+ * Body param: Reply pages collected for each target.
788
+ */
789
+ maxPagesPerTarget?: number;
790
+ /**
791
+ * Body param: Maximum post count for profile results.
792
+ */
793
+ maxPosts?: number;
794
+ /**
795
+ * Body param: Maximum Tweet quote count.
796
+ */
797
+ maxQuotes?: number;
798
+ /**
799
+ * Body param: Maximum Tweet reply count.
800
+ */
801
+ maxReplies?: number;
802
+ /**
803
+ * Body param: Maximum Tweet repost count.
804
+ */
805
+ maxRetweets?: number;
806
+ /**
807
+ * Body param: Media type filter (tweet_search_extractor)
366
808
  */
367
809
  mediaType?: 'images' | 'videos' | 'gifs' | 'media' | 'links' | 'none';
368
810
  /**
369
- * Filter tweets mentioning a username (tweet_search_extractor)
811
+ * Body param: Filter tweets mentioning a username (tweet_search_extractor)
370
812
  */
371
813
  mentioning?: string;
372
814
  /**
373
- * Minimum likes threshold (tweet_search_extractor)
815
+ * Body param: Minimum profile age in days.
816
+ */
817
+ minAccountAgeDays?: number;
818
+ /**
819
+ * Body param: Minimum Tweet bookmark count.
820
+ */
821
+ minBookmarks?: number;
822
+ /**
823
+ * Body param: Minimum likes threshold (tweet_search_extractor)
374
824
  */
375
825
  minFaves?: number;
376
826
  /**
377
- * Minimum quote count threshold (tweet_search_extractor)
827
+ * Body param: Minimum follower count for profile results.
828
+ */
829
+ minFollowers?: number;
830
+ /**
831
+ * Body param: Minimum following count for profile results.
832
+ */
833
+ minFollowing?: number;
834
+ /**
835
+ * Body param: Minimum post count for profile results.
836
+ */
837
+ minPosts?: number;
838
+ /**
839
+ * Body param: Minimum quote count threshold (tweet_search_extractor)
378
840
  */
379
841
  minQuotes?: number;
380
842
  /**
381
- * Minimum replies threshold (tweet_search_extractor)
843
+ * Body param: Minimum replies threshold (tweet_search_extractor)
382
844
  */
383
845
  minReplies?: number;
384
846
  /**
385
- * Minimum retweets threshold (tweet_search_extractor)
847
+ * Body param: Minimum retweets threshold (tweet_search_extractor)
386
848
  */
387
849
  minRetweets?: number;
388
850
  /**
389
- * Search within a place ID (tweet_search_extractor)
851
+ * Body param: Minimum Tweet view count.
852
+ */
853
+ minViews?: number;
854
+ /**
855
+ * Body param: Only return native reposts.
856
+ */
857
+ nativeRetweets?: boolean;
858
+ /**
859
+ * Body param: Match a place name.
860
+ */
861
+ near?: string;
862
+ /**
863
+ * Body param: Only return news results.
864
+ */
865
+ news?: boolean;
866
+ /**
867
+ * Body param: Shortcut for dedupeMode=merge.
868
+ */
869
+ overlapMode?: boolean;
870
+ /**
871
+ * Body param: Search within a place ID (tweet_search_extractor)
390
872
  */
391
873
  place?: string;
392
874
  /**
393
- * Search within a country code (tweet_search_extractor)
875
+ * Body param: Search within a country code (tweet_search_extractor)
394
876
  */
395
877
  placeCountry?: string;
396
878
  /**
397
- * Geo point radius, e.g. -73.99 40.73 25mi (tweet_search_extractor)
879
+ * Body param: Geo point radius, e.g. -73.99 40.73 25mi (tweet_search_extractor)
398
880
  */
399
881
  pointRadius?: string;
400
882
  /**
401
- * Quote mode (tweet_search_extractor)
883
+ * Body param: Search ranking applied to every query.
884
+ */
885
+ queryType?: 'Latest' | 'Top' | 'Both';
886
+ /**
887
+ * Body param: Quote mode (tweet_search_extractor)
402
888
  */
403
889
  quotes?: 'include' | 'exclude' | 'only';
404
890
  /**
405
- * Only quotes of this tweet ID (tweet_search_extractor)
891
+ * Body param: Only quotes of this tweet ID (tweet_search_extractor)
406
892
  */
407
893
  quotesOfTweetId?: string;
408
894
  /**
409
- * Reply mode (tweet_search_extractor)
895
+ * Body param: Profile relations processed within one job.
896
+ */
897
+ relationTargets?: Array<ExtractionRunParams.RelationTarget>;
898
+ /**
899
+ * Body param: Reply mode (tweet_search_extractor)
410
900
  */
411
901
  replies?: 'include' | 'exclude' | 'only';
412
902
  /**
413
- * Maximum number of results to extract. When set, the extraction stops after
414
- * reaching this limit.
903
+ * Body param: Maximum number of results to extract. When set, the extraction stops
904
+ * after reaching this limit.
415
905
  */
416
906
  resultsLimit?: number;
417
907
  /**
418
- * Retweet mode (tweet_search_extractor)
908
+ * Body param: Retweet mode (tweet_search_extractor)
419
909
  */
420
910
  retweets?: 'include' | 'exclude' | 'only';
421
911
  /**
422
- * Only retweets of this tweet ID (tweet_search_extractor)
912
+ * Body param: Only retweets of this tweet ID (tweet_search_extractor)
423
913
  */
424
914
  retweetsOfTweetId?: string;
425
915
  /**
426
- * Required for tweet_search_extractor & community_search.
916
+ * Body param: Enable the safe-search filter.
917
+ */
918
+ safe?: boolean;
919
+ /**
920
+ * Body param: Reply depth scope.
921
+ */
922
+ scope?: 'all' | 'direct' | 'nested';
923
+ /**
924
+ * Body param: Search queries processed as one collection job.
925
+ */
926
+ searchQueries?: Array<string>;
927
+ /**
928
+ * Body param: Required for tweet_search_extractor & community_search.
427
929
  */
428
930
  searchQuery?: string;
429
931
  /**
430
- * Start date YYYY-MM-DD (tweet_search_extractor)
932
+ * Body param: Start date YYYY-MM-DD (tweet_search_extractor)
431
933
  */
432
934
  sinceDate?: string;
433
935
  /**
434
- * Required for community_post_extractor & community_search.
936
+ * Body param: Return Tweets newer than this Tweet ID.
937
+ */
938
+ sinceId?: string;
939
+ /**
940
+ * Body param: Reply start time as ISO 8601 or Unix seconds.
941
+ */
942
+ sinceTime?: string | number;
943
+ /**
944
+ * Body param: Reply result order.
945
+ */
946
+ sort?: 'relevance' | 'latest' | 'oldest' | 'likes';
947
+ /**
948
+ * Body param: Match the source application.
949
+ */
950
+ source?: string;
951
+ /**
952
+ * Body param: Resume one reply target from this cursor.
953
+ */
954
+ startCursor?: string;
955
+ /**
956
+ * Body param: Required for community_post_extractor & community_search.
435
957
  */
436
958
  targetCommunityId?: string;
437
959
  /**
438
- * Required for list_follower_explorer, list_member_extractor &
960
+ * Body param: Community IDs processed as one collection job.
961
+ */
962
+ targetCommunityIds?: Array<string>;
963
+ /**
964
+ * Body param: Required for list_follower_explorer, list_member_extractor &
439
965
  * list_post_extractor.
440
966
  */
441
967
  targetListId?: string;
442
968
  /**
443
- * Required for space_explorer.
969
+ * Body param: List IDs processed as one collection job.
970
+ */
971
+ targetListIds?: Array<string>;
972
+ /**
973
+ * Body param: Mixed targets auto-routed within one job.
974
+ */
975
+ targets?: Array<string | ExtractionRunParams.UnionMember1>;
976
+ /**
977
+ * Body param: Required for space_explorer.
444
978
  */
445
979
  targetSpaceId?: string;
980
+ /**
981
+ * Body param
982
+ */
446
983
  targetTweetId?: string;
984
+ /**
985
+ * Body param: Tweet IDs processed as one collection job.
986
+ */
987
+ targetTweetIds?: Array<string>;
988
+ /**
989
+ * Body param
990
+ */
447
991
  targetUsername?: string;
448
992
  /**
449
- * Filter replies sent to a username (tweet_search_extractor)
993
+ * Body param: Usernames processed as one collection job.
994
+ */
995
+ targetUsernames?: Array<string>;
996
+ /**
997
+ * Body param: Filter replies sent to a username (tweet_search_extractor)
450
998
  */
451
999
  toUser?: string;
452
1000
  /**
453
- * End date YYYY-MM-DD (tweet_search_extractor)
1001
+ * Body param: End date YYYY-MM-DD (tweet_search_extractor)
454
1002
  */
455
1003
  untilDate?: string;
456
1004
  /**
457
- * URL substring or domain filter (tweet_search_extractor)
1005
+ * Body param: Reply end time as ISO 8601 or Unix seconds.
1006
+ */
1007
+ untilTime?: string | number;
1008
+ /**
1009
+ * Body param: URL substring or domain filter (tweet_search_extractor)
458
1010
  */
459
1011
  url?: string;
460
1012
  /**
461
- * Only verified authors (tweet_search_extractor)
1013
+ * Body param: Required username text.
1014
+ */
1015
+ usernameContains?: string;
1016
+ /**
1017
+ * Body param: Only verified authors (tweet_search_extractor)
462
1018
  */
463
1019
  verifiedOnly?: boolean;
1020
+ /**
1021
+ * Body param: Exact profile verification type.
1022
+ */
1023
+ verifiedType?: string;
1024
+ /**
1025
+ * Body param: Set the radius for the near filter.
1026
+ */
1027
+ within?: string;
1028
+ /**
1029
+ * Body param: Match Tweets inside a recent time window.
1030
+ */
1031
+ withinTime?: string;
1032
+ }
1033
+ export declare namespace ExtractionRunParams {
1034
+ /**
1035
+ * One target and relation in a mixed profile collection.
1036
+ */
1037
+ interface RelationTarget {
1038
+ relation: 'community_members' | 'followers' | 'following' | 'list_followers' | 'list_members' | 'verified_followers';
1039
+ value: string;
1040
+ }
1041
+ interface UnionMember1 {
1042
+ kind: 'favoriters' | 'list' | 'profile' | 'profile_likes' | 'profile_media' | 'profile_replies' | 'quotes' | 'replies' | 'retweeters' | 'search' | 'thread' | 'tweet';
1043
+ value: string;
1044
+ }
464
1045
  }
465
1046
  export declare namespace Extractions {
466
1047
  export { type ExtractionJob as ExtractionJob, type ExtractionRetrieveResponse as ExtractionRetrieveResponse, type ExtractionListResponse as ExtractionListResponse, type ExtractionEstimateCostResponse as ExtractionEstimateCostResponse, type ExtractionRunResponse as ExtractionRunResponse, type ExtractionRetrieveParams as ExtractionRetrieveParams, type ExtractionListParams as ExtractionListParams, type ExtractionEstimateCostParams as ExtractionEstimateCostParams, type ExtractionExportResultsParams as ExtractionExportResultsParams, type ExtractionRunParams as ExtractionRunParams, };