x-twitter-scraper 0.12.4 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (671) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/README.md +56 -29
  3. package/client.d.mts +18 -15
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +18 -15
  6. package/client.d.ts.map +1 -1
  7. package/client.js +4 -4
  8. package/client.js.map +1 -1
  9. package/client.mjs +5 -5
  10. package/client.mjs.map +1 -1
  11. package/core/api-promise.d.mts.map +1 -1
  12. package/core/api-promise.d.ts.map +1 -1
  13. package/core/api-promise.js.map +1 -1
  14. package/core/api-promise.mjs.map +1 -1
  15. package/core/error.d.mts.map +1 -1
  16. package/core/error.d.ts.map +1 -1
  17. package/core/error.js +0 -1
  18. package/core/error.js.map +1 -1
  19. package/core/error.mjs +0 -1
  20. package/core/error.mjs.map +1 -1
  21. package/core/resource.d.mts.map +1 -1
  22. package/core/resource.d.ts.map +1 -1
  23. package/core/resource.js.map +1 -1
  24. package/core/resource.mjs.map +1 -1
  25. package/core/streaming.d.mts +33 -0
  26. package/core/streaming.d.mts.map +1 -0
  27. package/core/streaming.d.ts +33 -0
  28. package/core/streaming.d.ts.map +1 -0
  29. package/core/streaming.js +269 -0
  30. package/core/streaming.js.map +1 -0
  31. package/core/streaming.mjs +264 -0
  32. package/core/streaming.mjs.map +1 -0
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts.map +1 -1
  35. package/index.js +0 -1
  36. package/index.js.map +1 -1
  37. package/index.mjs +0 -1
  38. package/index.mjs.map +1 -1
  39. package/internal/builtin-types.d.mts.map +1 -1
  40. package/internal/builtin-types.d.ts.map +1 -1
  41. package/internal/decoders/line.d.mts +17 -0
  42. package/internal/decoders/line.d.mts.map +1 -0
  43. package/internal/decoders/line.d.ts +17 -0
  44. package/internal/decoders/line.d.ts.map +1 -0
  45. package/internal/decoders/line.js +115 -0
  46. package/internal/decoders/line.js.map +1 -0
  47. package/internal/decoders/line.mjs +110 -0
  48. package/internal/decoders/line.mjs.map +1 -0
  49. package/internal/detect-platform.d.mts.map +1 -1
  50. package/internal/detect-platform.d.ts.map +1 -1
  51. package/internal/detect-platform.js +0 -1
  52. package/internal/detect-platform.js.map +1 -1
  53. package/internal/detect-platform.mjs +0 -1
  54. package/internal/detect-platform.mjs.map +1 -1
  55. package/internal/errors.d.mts.map +1 -1
  56. package/internal/errors.d.ts.map +1 -1
  57. package/internal/errors.js +0 -1
  58. package/internal/errors.js.map +1 -1
  59. package/internal/errors.mjs +0 -1
  60. package/internal/errors.mjs.map +1 -1
  61. package/internal/headers.d.mts.map +1 -1
  62. package/internal/headers.d.ts.map +1 -1
  63. package/internal/headers.js +0 -1
  64. package/internal/headers.js.map +1 -1
  65. package/internal/headers.mjs +0 -1
  66. package/internal/headers.mjs.map +1 -1
  67. package/internal/parse.d.mts.map +1 -1
  68. package/internal/parse.d.ts.map +1 -1
  69. package/internal/parse.js +7 -0
  70. package/internal/parse.js.map +1 -1
  71. package/internal/parse.mjs +7 -0
  72. package/internal/parse.mjs.map +1 -1
  73. package/internal/request-options.d.mts.map +1 -1
  74. package/internal/request-options.d.ts.map +1 -1
  75. package/internal/request-options.js.map +1 -1
  76. package/internal/request-options.mjs.map +1 -1
  77. package/internal/shim-types.d.mts.map +1 -1
  78. package/internal/shim-types.d.ts.map +1 -1
  79. package/internal/shims.d.mts.map +1 -1
  80. package/internal/shims.d.ts.map +1 -1
  81. package/internal/shims.js.map +1 -1
  82. package/internal/shims.mjs.map +1 -1
  83. package/internal/tslib.js +18 -18
  84. package/internal/types.d.mts.map +1 -1
  85. package/internal/types.d.ts.map +1 -1
  86. package/internal/utils/base64.d.mts.map +1 -1
  87. package/internal/utils/base64.d.ts.map +1 -1
  88. package/internal/utils/base64.js +0 -1
  89. package/internal/utils/base64.js.map +1 -1
  90. package/internal/utils/base64.mjs +0 -1
  91. package/internal/utils/base64.mjs.map +1 -1
  92. package/internal/utils/env.d.mts.map +1 -1
  93. package/internal/utils/env.d.ts.map +1 -1
  94. package/internal/utils/env.js +0 -1
  95. package/internal/utils/env.js.map +1 -1
  96. package/internal/utils/env.mjs +0 -1
  97. package/internal/utils/env.mjs.map +1 -1
  98. package/internal/utils/log.d.mts.map +1 -1
  99. package/internal/utils/log.d.ts.map +1 -1
  100. package/internal/utils/log.js +0 -1
  101. package/internal/utils/log.js.map +1 -1
  102. package/internal/utils/log.mjs +0 -1
  103. package/internal/utils/log.mjs.map +1 -1
  104. package/internal/utils/query.d.mts.map +1 -1
  105. package/internal/utils/query.d.ts.map +1 -1
  106. package/internal/utils/query.js +0 -1
  107. package/internal/utils/query.js.map +1 -1
  108. package/internal/utils/query.mjs +0 -1
  109. package/internal/utils/query.mjs.map +1 -1
  110. package/internal/utils/sleep.d.mts.map +1 -1
  111. package/internal/utils/sleep.d.ts.map +1 -1
  112. package/internal/utils/sleep.js +0 -1
  113. package/internal/utils/sleep.js.map +1 -1
  114. package/internal/utils/sleep.mjs +0 -1
  115. package/internal/utils/sleep.mjs.map +1 -1
  116. package/internal/utils/uuid.d.mts.map +1 -1
  117. package/internal/utils/uuid.d.ts.map +1 -1
  118. package/internal/utils/uuid.js +0 -1
  119. package/internal/utils/uuid.js.map +1 -1
  120. package/internal/utils/uuid.mjs +0 -1
  121. package/internal/utils/uuid.mjs.map +1 -1
  122. package/internal/utils/values.d.mts.map +1 -1
  123. package/internal/utils/values.d.ts.map +1 -1
  124. package/internal/utils/values.js +0 -1
  125. package/internal/utils/values.js.map +1 -1
  126. package/internal/utils/values.mjs +0 -1
  127. package/internal/utils/values.mjs.map +1 -1
  128. package/internal/utils.d.mts.map +1 -1
  129. package/internal/utils.d.ts.map +1 -1
  130. package/internal/utils.js +0 -1
  131. package/internal/utils.js.map +1 -1
  132. package/internal/utils.mjs +0 -1
  133. package/internal/utils.mjs.map +1 -1
  134. package/package.json +23 -5
  135. package/resources/account.d.mts +35 -12
  136. package/resources/account.d.mts.map +1 -1
  137. package/resources/account.d.ts +35 -12
  138. package/resources/account.d.ts.map +1 -1
  139. package/resources/account.js +4 -4
  140. package/resources/account.js.map +1 -1
  141. package/resources/account.mjs +4 -4
  142. package/resources/account.mjs.map +1 -1
  143. package/resources/compose.d.mts +77 -21
  144. package/resources/compose.d.mts.map +1 -1
  145. package/resources/compose.d.ts +77 -21
  146. package/resources/compose.d.ts.map +1 -1
  147. package/resources/compose.js +3 -5
  148. package/resources/compose.js.map +1 -1
  149. package/resources/compose.mjs +3 -5
  150. package/resources/compose.mjs.map +1 -1
  151. package/resources/credits.d.mts +18 -10
  152. package/resources/credits.d.mts.map +1 -1
  153. package/resources/credits.d.ts +18 -10
  154. package/resources/credits.d.ts.map +1 -1
  155. package/resources/credits.js +5 -5
  156. package/resources/credits.js.map +1 -1
  157. package/resources/credits.mjs +5 -5
  158. package/resources/credits.mjs.map +1 -1
  159. package/resources/drafts.d.mts +13 -17
  160. package/resources/drafts.d.mts.map +1 -1
  161. package/resources/drafts.d.ts +13 -17
  162. package/resources/drafts.d.ts.map +1 -1
  163. package/resources/drafts.js +4 -5
  164. package/resources/drafts.js.map +1 -1
  165. package/resources/drafts.mjs +4 -5
  166. package/resources/drafts.mjs.map +1 -1
  167. package/resources/draws.d.mts +84 -28
  168. package/resources/draws.d.mts.map +1 -1
  169. package/resources/draws.d.ts +84 -28
  170. package/resources/draws.d.ts.map +1 -1
  171. package/resources/draws.js +24 -10
  172. package/resources/draws.js.map +1 -1
  173. package/resources/draws.mjs +24 -10
  174. package/resources/draws.mjs.map +1 -1
  175. package/resources/events.d.mts +2564 -21
  176. package/resources/events.d.mts.map +1 -1
  177. package/resources/events.d.ts +2564 -21
  178. package/resources/events.d.ts.map +1 -1
  179. package/resources/events.js +34 -3
  180. package/resources/events.js.map +1 -1
  181. package/resources/events.mjs +34 -3
  182. package/resources/events.mjs.map +1 -1
  183. package/resources/extractions.d.mts +410 -128
  184. package/resources/extractions.d.mts.map +1 -1
  185. package/resources/extractions.d.ts +410 -128
  186. package/resources/extractions.d.ts.map +1 -1
  187. package/resources/extractions.js +74 -13
  188. package/resources/extractions.js.map +1 -1
  189. package/resources/extractions.mjs +74 -13
  190. package/resources/extractions.mjs.map +1 -1
  191. package/resources/guest-wallets.d.mts +6 -5
  192. package/resources/guest-wallets.d.mts.map +1 -1
  193. package/resources/guest-wallets.d.ts +6 -5
  194. package/resources/guest-wallets.d.ts.map +1 -1
  195. package/resources/guest-wallets.js +2 -2
  196. package/resources/guest-wallets.js.map +1 -1
  197. package/resources/guest-wallets.mjs +2 -2
  198. package/resources/guest-wallets.mjs.map +1 -1
  199. package/resources/index.d.mts +6 -6
  200. package/resources/index.d.mts.map +1 -1
  201. package/resources/index.d.ts +6 -6
  202. package/resources/index.d.ts.map +1 -1
  203. package/resources/index.js +0 -1
  204. package/resources/index.js.map +1 -1
  205. package/resources/index.mjs +1 -2
  206. package/resources/index.mjs.map +1 -1
  207. package/resources/monitors/index.d.mts +2 -2
  208. package/resources/monitors/index.d.mts.map +1 -1
  209. package/resources/monitors/index.d.ts +2 -2
  210. package/resources/monitors/index.d.ts.map +1 -1
  211. package/resources/monitors/index.js +0 -1
  212. package/resources/monitors/index.js.map +1 -1
  213. package/resources/monitors/index.mjs +0 -1
  214. package/resources/monitors/index.mjs.map +1 -1
  215. package/resources/monitors/keywords.d.mts +66 -14
  216. package/resources/monitors/keywords.d.mts.map +1 -1
  217. package/resources/monitors/keywords.d.ts +66 -14
  218. package/resources/monitors/keywords.d.ts.map +1 -1
  219. package/resources/monitors/keywords.js +16 -11
  220. package/resources/monitors/keywords.js.map +1 -1
  221. package/resources/monitors/keywords.mjs +16 -11
  222. package/resources/monitors/keywords.mjs.map +1 -1
  223. package/resources/monitors/monitors.d.mts +53 -16
  224. package/resources/monitors/monitors.d.mts.map +1 -1
  225. package/resources/monitors/monitors.d.ts +53 -16
  226. package/resources/monitors/monitors.d.ts.map +1 -1
  227. package/resources/monitors/monitors.js +12 -11
  228. package/resources/monitors/monitors.js.map +1 -1
  229. package/resources/monitors/monitors.mjs +12 -11
  230. package/resources/monitors/monitors.mjs.map +1 -1
  231. package/resources/monitors.d.mts.map +1 -1
  232. package/resources/monitors.d.ts.map +1 -1
  233. package/resources/monitors.js +0 -1
  234. package/resources/monitors.js.map +1 -1
  235. package/resources/monitors.mjs +0 -1
  236. package/resources/monitors.mjs.map +1 -1
  237. package/resources/radar.d.mts +32 -36
  238. package/resources/radar.d.mts.map +1 -1
  239. package/resources/radar.d.ts +32 -36
  240. package/resources/radar.d.ts.map +1 -1
  241. package/resources/radar.js +1 -2
  242. package/resources/radar.js.map +1 -1
  243. package/resources/radar.mjs +1 -2
  244. package/resources/radar.mjs.map +1 -1
  245. package/resources/shared.d.mts +1726 -233
  246. package/resources/shared.d.mts.map +1 -1
  247. package/resources/shared.d.ts +1726 -233
  248. package/resources/shared.d.ts.map +1 -1
  249. package/resources/styles.d.mts +34 -23
  250. package/resources/styles.d.mts.map +1 -1
  251. package/resources/styles.d.ts +34 -23
  252. package/resources/styles.d.ts.map +1 -1
  253. package/resources/styles.js +11 -14
  254. package/resources/styles.js.map +1 -1
  255. package/resources/styles.mjs +11 -14
  256. package/resources/styles.mjs.map +1 -1
  257. package/resources/subscribe.d.mts +1 -1
  258. package/resources/subscribe.d.mts.map +1 -1
  259. package/resources/subscribe.d.ts +1 -1
  260. package/resources/subscribe.d.ts.map +1 -1
  261. package/resources/subscribe.js +1 -2
  262. package/resources/subscribe.js.map +1 -1
  263. package/resources/subscribe.mjs +1 -2
  264. package/resources/subscribe.mjs.map +1 -1
  265. package/resources/support/attachments.d.mts.map +1 -1
  266. package/resources/support/attachments.d.ts.map +1 -1
  267. package/resources/support/attachments.js +0 -1
  268. package/resources/support/attachments.js.map +1 -1
  269. package/resources/support/attachments.mjs +0 -1
  270. package/resources/support/attachments.mjs.map +1 -1
  271. package/resources/support/index.d.mts +1 -1
  272. package/resources/support/index.d.mts.map +1 -1
  273. package/resources/support/index.d.ts +1 -1
  274. package/resources/support/index.d.ts.map +1 -1
  275. package/resources/support/index.js +0 -1
  276. package/resources/support/index.js.map +1 -1
  277. package/resources/support/index.mjs +0 -1
  278. package/resources/support/index.mjs.map +1 -1
  279. package/resources/support/support.d.mts +2 -2
  280. package/resources/support/support.d.mts.map +1 -1
  281. package/resources/support/support.d.ts +2 -2
  282. package/resources/support/support.d.ts.map +1 -1
  283. package/resources/support/support.js +0 -1
  284. package/resources/support/support.js.map +1 -1
  285. package/resources/support/support.mjs +0 -1
  286. package/resources/support/support.mjs.map +1 -1
  287. package/resources/support/tickets.d.mts +30 -10
  288. package/resources/support/tickets.d.mts.map +1 -1
  289. package/resources/support/tickets.d.ts +30 -10
  290. package/resources/support/tickets.d.ts.map +1 -1
  291. package/resources/support/tickets.js +7 -8
  292. package/resources/support/tickets.js.map +1 -1
  293. package/resources/support/tickets.mjs +7 -8
  294. package/resources/support/tickets.mjs.map +1 -1
  295. package/resources/support.d.mts.map +1 -1
  296. package/resources/support.d.ts.map +1 -1
  297. package/resources/support.js +0 -1
  298. package/resources/support.js.map +1 -1
  299. package/resources/support.mjs +0 -1
  300. package/resources/support.mjs.map +1 -1
  301. package/resources/trends.d.mts +21 -5
  302. package/resources/trends.d.mts.map +1 -1
  303. package/resources/trends.d.ts +21 -5
  304. package/resources/trends.d.ts.map +1 -1
  305. package/resources/trends.js +2 -2
  306. package/resources/trends.js.map +1 -1
  307. package/resources/trends.mjs +2 -2
  308. package/resources/trends.mjs.map +1 -1
  309. package/resources/webhooks.d.mts +80 -14
  310. package/resources/webhooks.d.mts.map +1 -1
  311. package/resources/webhooks.d.ts +80 -14
  312. package/resources/webhooks.d.ts.map +1 -1
  313. package/resources/webhooks.js +30 -12
  314. package/resources/webhooks.js.map +1 -1
  315. package/resources/webhooks.mjs +30 -12
  316. package/resources/webhooks.mjs.map +1 -1
  317. package/resources/x/account-connection-attempts.d.mts +1 -1
  318. package/resources/x/account-connection-attempts.d.mts.map +1 -1
  319. package/resources/x/account-connection-attempts.d.ts +1 -1
  320. package/resources/x/account-connection-attempts.d.ts.map +1 -1
  321. package/resources/x/account-connection-attempts.js +1 -2
  322. package/resources/x/account-connection-attempts.js.map +1 -1
  323. package/resources/x/account-connection-attempts.mjs +1 -2
  324. package/resources/x/account-connection-attempts.mjs.map +1 -1
  325. package/resources/x/account-connection-challenges.d.mts +30 -11
  326. package/resources/x/account-connection-challenges.d.mts.map +1 -1
  327. package/resources/x/account-connection-challenges.d.ts +30 -11
  328. package/resources/x/account-connection-challenges.d.ts.map +1 -1
  329. package/resources/x/account-connection-challenges.js +5 -5
  330. package/resources/x/account-connection-challenges.js.map +1 -1
  331. package/resources/x/account-connection-challenges.mjs +5 -5
  332. package/resources/x/account-connection-challenges.mjs.map +1 -1
  333. package/resources/x/accounts.d.mts +38 -10
  334. package/resources/x/accounts.d.mts.map +1 -1
  335. package/resources/x/accounts.d.ts +38 -10
  336. package/resources/x/accounts.d.ts.map +1 -1
  337. package/resources/x/accounts.js +8 -8
  338. package/resources/x/accounts.js.map +1 -1
  339. package/resources/x/accounts.mjs +8 -8
  340. package/resources/x/accounts.mjs.map +1 -1
  341. package/resources/x/analysis.d.mts +3274 -0
  342. package/resources/x/analysis.d.mts.map +1 -0
  343. package/resources/x/analysis.d.ts +3274 -0
  344. package/resources/x/analysis.d.ts.map +1 -0
  345. package/resources/x/analysis.js +131 -0
  346. package/resources/x/analysis.js.map +1 -0
  347. package/resources/x/analysis.mjs +127 -0
  348. package/resources/x/analysis.mjs.map +1 -0
  349. package/resources/x/bookmarks.d.mts +84 -9
  350. package/resources/x/bookmarks.d.mts.map +1 -1
  351. package/resources/x/bookmarks.d.ts +84 -9
  352. package/resources/x/bookmarks.d.ts.map +1 -1
  353. package/resources/x/bookmarks.js +6 -5
  354. package/resources/x/bookmarks.js.map +1 -1
  355. package/resources/x/bookmarks.mjs +6 -5
  356. package/resources/x/bookmarks.mjs.map +1 -1
  357. package/resources/x/broadcasts.d.mts +176 -0
  358. package/resources/x/broadcasts.d.mts.map +1 -0
  359. package/resources/x/broadcasts.d.ts +176 -0
  360. package/resources/x/broadcasts.d.ts.map +1 -0
  361. package/resources/x/broadcasts.js +28 -0
  362. package/resources/x/broadcasts.js.map +1 -0
  363. package/resources/x/broadcasts.mjs +24 -0
  364. package/resources/x/broadcasts.mjs.map +1 -0
  365. package/resources/x/communities/communities.d.mts +612 -128
  366. package/resources/x/communities/communities.d.mts.map +1 -1
  367. package/resources/x/communities/communities.d.ts +612 -128
  368. package/resources/x/communities/communities.d.ts.map +1 -1
  369. package/resources/x/communities/communities.js +96 -18
  370. package/resources/x/communities/communities.js.map +1 -1
  371. package/resources/x/communities/communities.mjs +96 -18
  372. package/resources/x/communities/communities.mjs.map +1 -1
  373. package/resources/x/communities/index.d.mts +2 -1
  374. package/resources/x/communities/index.d.mts.map +1 -1
  375. package/resources/x/communities/index.d.ts +2 -1
  376. package/resources/x/communities/index.d.ts.map +1 -1
  377. package/resources/x/communities/index.js +3 -2
  378. package/resources/x/communities/index.js.map +1 -1
  379. package/resources/x/communities/index.mjs +1 -1
  380. package/resources/x/communities/index.mjs.map +1 -1
  381. package/resources/x/communities/join.d.mts +46 -25
  382. package/resources/x/communities/join.d.mts.map +1 -1
  383. package/resources/x/communities/join.d.ts +46 -25
  384. package/resources/x/communities/join.d.ts.map +1 -1
  385. package/resources/x/communities/join.js +10 -8
  386. package/resources/x/communities/join.js.map +1 -1
  387. package/resources/x/communities/join.mjs +10 -8
  388. package/resources/x/communities/join.mjs.map +1 -1
  389. package/resources/x/communities/media.d.mts +197 -0
  390. package/resources/x/communities/media.d.mts.map +1 -0
  391. package/resources/x/communities/media.d.ts +197 -0
  392. package/resources/x/communities/media.d.ts.map +1 -0
  393. package/resources/x/communities/media.js +28 -0
  394. package/resources/x/communities/media.js.map +1 -0
  395. package/resources/x/communities/media.mjs +24 -0
  396. package/resources/x/communities/media.mjs.map +1 -0
  397. package/resources/x/communities/tweets.d.mts +350 -20
  398. package/resources/x/communities/tweets.d.mts.map +1 -1
  399. package/resources/x/communities/tweets.d.ts +350 -20
  400. package/resources/x/communities/tweets.d.ts.map +1 -1
  401. package/resources/x/communities/tweets.js +8 -8
  402. package/resources/x/communities/tweets.js.map +1 -1
  403. package/resources/x/communities/tweets.mjs +8 -8
  404. package/resources/x/communities/tweets.mjs.map +1 -1
  405. package/resources/x/communities.d.mts.map +1 -1
  406. package/resources/x/communities.d.ts.map +1 -1
  407. package/resources/x/communities.js +0 -1
  408. package/resources/x/communities.js.map +1 -1
  409. package/resources/x/communities.mjs +0 -1
  410. package/resources/x/communities.mjs.map +1 -1
  411. package/resources/x/dm.d.mts +245 -13
  412. package/resources/x/dm.d.mts.map +1 -1
  413. package/resources/x/dm.d.ts +245 -13
  414. package/resources/x/dm.d.ts.map +1 -1
  415. package/resources/x/dm.js +29 -3
  416. package/resources/x/dm.js.map +1 -1
  417. package/resources/x/dm.mjs +29 -3
  418. package/resources/x/dm.mjs.map +1 -1
  419. package/resources/x/followers.d.mts +31 -3
  420. package/resources/x/followers.d.mts.map +1 -1
  421. package/resources/x/followers.d.ts +31 -3
  422. package/resources/x/followers.d.ts.map +1 -1
  423. package/resources/x/followers.js +2 -2
  424. package/resources/x/followers.js.map +1 -1
  425. package/resources/x/followers.mjs +2 -2
  426. package/resources/x/followers.mjs.map +1 -1
  427. package/resources/x/index.d.mts +12 -8
  428. package/resources/x/index.d.mts.map +1 -1
  429. package/resources/x/index.d.ts +12 -8
  430. package/resources/x/index.d.ts.map +1 -1
  431. package/resources/x/index.js +9 -2
  432. package/resources/x/index.js.map +1 -1
  433. package/resources/x/index.mjs +5 -2
  434. package/resources/x/index.mjs.map +1 -1
  435. package/resources/x/jobs.d.mts +506 -0
  436. package/resources/x/jobs.d.mts.map +1 -0
  437. package/resources/x/jobs.d.ts +506 -0
  438. package/resources/x/jobs.d.ts.map +1 -0
  439. package/resources/x/jobs.js +59 -0
  440. package/resources/x/jobs.js.map +1 -0
  441. package/resources/x/jobs.mjs +55 -0
  442. package/resources/x/jobs.mjs.map +1 -0
  443. package/resources/x/lists.d.mts +1058 -27
  444. package/resources/x/lists.d.mts.map +1 -1
  445. package/resources/x/lists.d.ts +1058 -27
  446. package/resources/x/lists.d.ts.map +1 -1
  447. package/resources/x/lists.js +39 -10
  448. package/resources/x/lists.js.map +1 -1
  449. package/resources/x/lists.mjs +39 -10
  450. package/resources/x/lists.mjs.map +1 -1
  451. package/resources/x/media.d.mts +24 -13
  452. package/resources/x/media.d.mts.map +1 -1
  453. package/resources/x/media.d.ts +24 -13
  454. package/resources/x/media.d.ts.map +1 -1
  455. package/resources/x/media.js +2 -3
  456. package/resources/x/media.js.map +1 -1
  457. package/resources/x/media.mjs +2 -3
  458. package/resources/x/media.mjs.map +1 -1
  459. package/resources/x/profile.d.mts +60 -33
  460. package/resources/x/profile.d.mts.map +1 -1
  461. package/resources/x/profile.d.ts +60 -33
  462. package/resources/x/profile.d.ts.map +1 -1
  463. package/resources/x/profile.js +3 -4
  464. package/resources/x/profile.js.map +1 -1
  465. package/resources/x/profile.mjs +3 -4
  466. package/resources/x/profile.mjs.map +1 -1
  467. package/resources/x/spaces.d.mts +857 -0
  468. package/resources/x/spaces.d.mts.map +1 -0
  469. package/resources/x/spaces.d.ts +857 -0
  470. package/resources/x/spaces.d.ts.map +1 -0
  471. package/resources/x/spaces.js +57 -0
  472. package/resources/x/spaces.js.map +1 -0
  473. package/resources/x/spaces.mjs +53 -0
  474. package/resources/x/spaces.mjs.map +1 -0
  475. package/resources/x/tweets/index.d.mts +1 -1
  476. package/resources/x/tweets/index.d.mts.map +1 -1
  477. package/resources/x/tweets/index.d.ts +1 -1
  478. package/resources/x/tweets/index.d.ts.map +1 -1
  479. package/resources/x/tweets/index.js +0 -1
  480. package/resources/x/tweets/index.js.map +1 -1
  481. package/resources/x/tweets/index.mjs +0 -1
  482. package/resources/x/tweets/index.mjs.map +1 -1
  483. package/resources/x/tweets/like.d.mts +38 -20
  484. package/resources/x/tweets/like.d.mts.map +1 -1
  485. package/resources/x/tweets/like.d.ts +38 -20
  486. package/resources/x/tweets/like.d.ts.map +1 -1
  487. package/resources/x/tweets/like.js +2 -3
  488. package/resources/x/tweets/like.js.map +1 -1
  489. package/resources/x/tweets/like.mjs +2 -3
  490. package/resources/x/tweets/like.mjs.map +1 -1
  491. package/resources/x/tweets/retweet.d.mts +38 -20
  492. package/resources/x/tweets/retweet.d.mts.map +1 -1
  493. package/resources/x/tweets/retweet.d.ts +38 -20
  494. package/resources/x/tweets/retweet.d.ts.map +1 -1
  495. package/resources/x/tweets/retweet.js +2 -3
  496. package/resources/x/tweets/retweet.js.map +1 -1
  497. package/resources/x/tweets/retweet.mjs +2 -3
  498. package/resources/x/tweets/retweet.mjs.map +1 -1
  499. package/resources/x/tweets/tweets.d.mts +2639 -326
  500. package/resources/x/tweets/tweets.d.mts.map +1 -1
  501. package/resources/x/tweets/tweets.d.ts +2639 -326
  502. package/resources/x/tweets/tweets.d.ts.map +1 -1
  503. package/resources/x/tweets/tweets.js +147 -22
  504. package/resources/x/tweets/tweets.js.map +1 -1
  505. package/resources/x/tweets/tweets.mjs +147 -22
  506. package/resources/x/tweets/tweets.mjs.map +1 -1
  507. package/resources/x/tweets.d.mts.map +1 -1
  508. package/resources/x/tweets.d.ts.map +1 -1
  509. package/resources/x/tweets.js +0 -1
  510. package/resources/x/tweets.js.map +1 -1
  511. package/resources/x/tweets.mjs +0 -1
  512. package/resources/x/tweets.mjs.map +1 -1
  513. package/resources/x/users/follow.d.mts +38 -20
  514. package/resources/x/users/follow.d.mts.map +1 -1
  515. package/resources/x/users/follow.d.ts +38 -20
  516. package/resources/x/users/follow.d.ts.map +1 -1
  517. package/resources/x/users/follow.js +2 -3
  518. package/resources/x/users/follow.js.map +1 -1
  519. package/resources/x/users/follow.mjs +2 -3
  520. package/resources/x/users/follow.mjs.map +1 -1
  521. package/resources/x/users/index.d.mts +1 -1
  522. package/resources/x/users/index.d.mts.map +1 -1
  523. package/resources/x/users/index.d.ts +1 -1
  524. package/resources/x/users/index.d.ts.map +1 -1
  525. package/resources/x/users/index.js +0 -1
  526. package/resources/x/users/index.js.map +1 -1
  527. package/resources/x/users/index.mjs +0 -1
  528. package/resources/x/users/index.mjs.map +1 -1
  529. package/resources/x/users/users.d.mts +3068 -457
  530. package/resources/x/users/users.d.mts.map +1 -1
  531. package/resources/x/users/users.d.ts +3068 -457
  532. package/resources/x/users/users.d.ts.map +1 -1
  533. package/resources/x/users/users.js +205 -23
  534. package/resources/x/users/users.js.map +1 -1
  535. package/resources/x/users/users.mjs +205 -23
  536. package/resources/x/users/users.mjs.map +1 -1
  537. package/resources/x/users.d.mts.map +1 -1
  538. package/resources/x/users.d.ts.map +1 -1
  539. package/resources/x/users.js +0 -1
  540. package/resources/x/users.js.map +1 -1
  541. package/resources/x/users.mjs +0 -1
  542. package/resources/x/users.mjs.map +1 -1
  543. package/resources/x/write-actions.d.mts +13 -6
  544. package/resources/x/write-actions.d.mts.map +1 -1
  545. package/resources/x/write-actions.d.ts +13 -6
  546. package/resources/x/write-actions.d.ts.map +1 -1
  547. package/resources/x/write-actions.js +1 -2
  548. package/resources/x/write-actions.js.map +1 -1
  549. package/resources/x/write-actions.mjs +1 -2
  550. package/resources/x/write-actions.mjs.map +1 -1
  551. package/resources/x/x.d.mts +864 -27
  552. package/resources/x/x.d.mts.map +1 -1
  553. package/resources/x/x.d.ts +864 -27
  554. package/resources/x/x.d.ts.map +1 -1
  555. package/resources/x/x.js +78 -6
  556. package/resources/x/x.js.map +1 -1
  557. package/resources/x/x.mjs +80 -8
  558. package/resources/x/x.mjs.map +1 -1
  559. package/resources/x.d.mts.map +1 -1
  560. package/resources/x.d.ts.map +1 -1
  561. package/resources/x.js +0 -1
  562. package/resources/x.js.map +1 -1
  563. package/resources/x.mjs +0 -1
  564. package/resources/x.mjs.map +1 -1
  565. package/skills/x-twitter-scraper/SKILL.md +99 -344
  566. package/skills/x-twitter-scraper/metadata.json +2 -2
  567. package/skills/x-twitter-scraper/references/mcp-setup.md +12 -15
  568. package/skills/x-twitter-scraper/references/mcp-tools.md +105 -166
  569. package/skills/x-twitter-scraper/references/types-mcp-output-schemas.md +4 -4
  570. package/skills/x-twitter-scraper/references/types.md +0 -1
  571. package/skills/x-twitter-scraper/skill-card.md +5 -6
  572. package/skills/x-twitter-scraper/skillspector-report.md +6 -3
  573. package/skills/xquik-account-automation/LICENSE +21 -0
  574. package/skills/xquik-account-automation/SKILL.md +91 -0
  575. package/skills/xquik-social-research/SKILL.md +48 -55
  576. package/src/client.ts +48 -7
  577. package/src/core/api-promise.ts +0 -2
  578. package/src/core/error.ts +0 -2
  579. package/src/core/resource.ts +0 -2
  580. package/src/core/streaming.ts +326 -0
  581. package/src/index.ts +0 -2
  582. package/src/internal/builtin-types.ts +0 -2
  583. package/src/internal/decoders/line.ts +138 -0
  584. package/src/internal/detect-platform.ts +0 -2
  585. package/src/internal/errors.ts +0 -2
  586. package/src/internal/headers.ts +0 -2
  587. package/src/internal/parse.ts +9 -2
  588. package/src/internal/request-options.ts +0 -2
  589. package/src/internal/shim-types.ts +0 -2
  590. package/src/internal/shims.ts +0 -2
  591. package/src/internal/types.ts +0 -2
  592. package/src/internal/utils/base64.ts +0 -2
  593. package/src/internal/utils/env.ts +0 -2
  594. package/src/internal/utils/log.ts +0 -2
  595. package/src/internal/utils/query.ts +0 -2
  596. package/src/internal/utils/sleep.ts +0 -2
  597. package/src/internal/utils/uuid.ts +0 -2
  598. package/src/internal/utils/values.ts +0 -2
  599. package/src/internal/utils.ts +0 -2
  600. package/src/lib/.keep +2 -4
  601. package/src/resources/account.ts +41 -14
  602. package/src/resources/compose.ts +77 -23
  603. package/src/resources/credits.ts +19 -12
  604. package/src/resources/drafts.ts +13 -24
  605. package/src/resources/draws.ts +94 -38
  606. package/src/resources/events.ts +3225 -70
  607. package/src/resources/extractions.ts +512 -127
  608. package/src/resources/guest-wallets.ts +6 -7
  609. package/src/resources/index.ts +24 -3
  610. package/src/resources/monitors/index.ts +2 -2
  611. package/src/resources/monitors/keywords.ts +82 -16
  612. package/src/resources/monitors/monitors.ts +66 -16
  613. package/src/resources/monitors.ts +0 -2
  614. package/src/resources/radar.ts +32 -38
  615. package/src/resources/shared.ts +2226 -352
  616. package/src/resources/styles.ts +43 -29
  617. package/src/resources/subscribe.ts +1 -3
  618. package/src/resources/support/attachments.ts +0 -2
  619. package/src/resources/support/index.ts +1 -2
  620. package/src/resources/support/support.ts +2 -2
  621. package/src/resources/support/tickets.ts +38 -12
  622. package/src/resources/support.ts +0 -2
  623. package/src/resources/trends.ts +23 -7
  624. package/src/resources/webhooks.ts +109 -17
  625. package/src/resources/x/account-connection-attempts.ts +1 -3
  626. package/src/resources/x/account-connection-challenges.ts +39 -13
  627. package/src/resources/x/accounts.ts +46 -12
  628. package/src/resources/x/analysis.ts +3945 -0
  629. package/src/resources/x/bookmarks.ts +103 -11
  630. package/src/resources/x/broadcasts.ts +223 -0
  631. package/src/resources/x/communities/communities.ts +743 -143
  632. package/src/resources/x/communities/index.ts +9 -2
  633. package/src/resources/x/communities/join.ts +46 -25
  634. package/src/resources/x/communities/media.ts +249 -0
  635. package/src/resources/x/communities/tweets.ts +427 -22
  636. package/src/resources/x/communities.ts +0 -2
  637. package/src/resources/x/dm.ts +334 -13
  638. package/src/resources/x/followers.ts +35 -5
  639. package/src/resources/x/index.ts +106 -3
  640. package/src/resources/x/jobs.ts +625 -0
  641. package/src/resources/x/lists.ts +1307 -30
  642. package/src/resources/x/media.ts +24 -14
  643. package/src/resources/x/profile.ts +60 -32
  644. package/src/resources/x/spaces.ts +1074 -0
  645. package/src/resources/x/tweets/index.ts +18 -2
  646. package/src/resources/x/tweets/like.ts +38 -20
  647. package/src/resources/x/tweets/retweet.ts +38 -20
  648. package/src/resources/x/tweets/tweets.ts +3693 -843
  649. package/src/resources/x/tweets.ts +0 -2
  650. package/src/resources/x/users/follow.ts +38 -20
  651. package/src/resources/x/users/index.ts +22 -2
  652. package/src/resources/x/users/users.ts +3687 -467
  653. package/src/resources/x/users.ts +0 -2
  654. package/src/resources/x/write-actions.ts +13 -7
  655. package/src/resources/x/x.ts +1234 -24
  656. package/src/resources/x.ts +0 -2
  657. package/src/streaming.ts +6 -0
  658. package/src/version.ts +1 -1
  659. package/streaming.d.mts +3 -0
  660. package/streaming.d.mts.map +1 -0
  661. package/streaming.d.ts +3 -0
  662. package/streaming.d.ts.map +1 -0
  663. package/streaming.js +9 -0
  664. package/streaming.js.map +1 -0
  665. package/streaming.mjs +6 -0
  666. package/streaming.mjs.map +1 -0
  667. package/version.d.mts +1 -1
  668. package/version.d.ts +1 -1
  669. package/version.js +1 -1
  670. package/version.mjs +1 -1
  671. package/skills/x-twitter-scraper/references/types-rest-api-vs-mcp-field-naming.md +0 -15
@@ -0,0 +1,3945 @@
1
+ // SPDX-FileCopyrightText: 2026 Xquik contributors
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ import { APIResource } from '../../core/resource';
6
+ import * as Shared from '../shared';
7
+ import { APIPromise } from '../../core/api-promise';
8
+ import { RequestOptions } from '../../internal/request-options';
9
+
10
+ /**
11
+ * AI analysis of posts, at 2 credits per analyzed post
12
+ */
13
+ export class Analysis extends APIResource {
14
+ /**
15
+ * Answers whether each post is about your brand, the author's attitude toward it &
16
+ * the author's relationship with it. Name the brand in analysis.targets. Each
17
+ * analyzed post costs 2 credits.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * const response = await client.x.analysis.brand({
22
+ * limit: 20,
23
+ * query: 'Artemis lang:en',
24
+ * queryType: 'Latest',
25
+ * sinceTime: '2026-09-01T00:00:00Z',
26
+ * untilTime: '2026-09-30T23:59:59Z',
27
+ * });
28
+ * ```
29
+ */
30
+ brand(body: AnalysisBrandParams, options?: RequestOptions): APIPromise<AnalysisBrandResponse> {
31
+ return this._client.post('/x/analysis/brand', { body, ...options });
32
+ }
33
+
34
+ /**
35
+ * Answers 1 to 8 questions you write in analysis.questions. A choice picks a
36
+ * category, such as a topic. A score picks a level. A probability answers yes or
37
+ * no. Without questions it answers the sentiment questions. Each analyzed post
38
+ * costs 2 credits.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const response = await client.x.analysis.classify({
43
+ * limit: 20,
44
+ * query: 'Artemis lang:en',
45
+ * queryType: 'Latest',
46
+ * sinceTime: '2026-09-01T00:00:00Z',
47
+ * untilTime: '2026-09-30T23:59:59Z',
48
+ * });
49
+ * ```
50
+ */
51
+ classify(body: AnalysisClassifyParams, options?: RequestOptions): APIPromise<AnalysisClassifyResponse> {
52
+ return this._client.post('/x/analysis/classify', { body, ...options });
53
+ }
54
+
55
+ /**
56
+ * Answers each post's stance on an asset, its content type, its conviction & its
57
+ * relevance. The summary counts bullish & bearish posts per cashtag. Name the
58
+ * asset in analysis.targets. Each analyzed post costs 2 credits.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const response = await client.x.analysis.marketSignals({
63
+ * limit: 20,
64
+ * query: 'Artemis lang:en',
65
+ * queryType: 'Latest',
66
+ * sinceTime: '2026-09-01T00:00:00Z',
67
+ * untilTime: '2026-09-30T23:59:59Z',
68
+ * });
69
+ * ```
70
+ */
71
+ marketSignals(
72
+ body: AnalysisMarketSignalsParams,
73
+ options?: RequestOptions,
74
+ ): APIPromise<AnalysisMarketSignalsResponse> {
75
+ return this._client.post('/x/analysis/market-signals', { body, ...options });
76
+ }
77
+
78
+ /**
79
+ * Answers each post's format, such as reporting, commentary or speculation, its
80
+ * source attribution & its relevance to your topic. Name the topic in
81
+ * analysis.targets. Each analyzed post costs 2 credits.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const response = await client.x.analysis.news({
86
+ * limit: 20,
87
+ * query: 'Artemis lang:en',
88
+ * queryType: 'Latest',
89
+ * sinceTime: '2026-09-01T00:00:00Z',
90
+ * untilTime: '2026-09-30T23:59:59Z',
91
+ * });
92
+ * ```
93
+ */
94
+ news(body: AnalysisNewsParams, options?: RequestOptions): APIPromise<AnalysisNewsResponse> {
95
+ return this._client.post('/x/analysis/news', { body, ...options });
96
+ }
97
+
98
+ /**
99
+ * Answers each post's attitude, its intensity & its sarcasm probability. Send post
100
+ * IDs, an X search, an account, a List, a post's replies or quotes, or your own
101
+ * texts. Each analyzed post costs 2 credits. A post without an analysis costs
102
+ * nothing.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const response = await client.x.analysis.sentiment({
107
+ * limit: 20,
108
+ * query: 'Artemis lang:en',
109
+ * queryType: 'Latest',
110
+ * sinceTime: '2026-09-01T00:00:00Z',
111
+ * untilTime: '2026-09-30T23:59:59Z',
112
+ * });
113
+ * ```
114
+ */
115
+ sentiment(body: AnalysisSentimentParams, options?: RequestOptions): APIPromise<AnalysisSentimentResponse> {
116
+ return this._client.post('/x/analysis/sentiment', { body, ...options });
117
+ }
118
+
119
+ /**
120
+ * Answers each post's hook, clarity, payoff, humor, spam risk & likely reaction, &
121
+ * adds a Viral Score from 0 to 100 with a verdict. The score rates the wording. It
122
+ * does not predict likes or views. Send drafts in texts to score them before
123
+ * posting. Each analyzed post costs 2 credits.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * const response = await client.x.analysis.viralScore({
128
+ * limit: 20,
129
+ * query: 'Artemis lang:en',
130
+ * queryType: 'Latest',
131
+ * sinceTime: '2026-09-01T00:00:00Z',
132
+ * untilTime: '2026-09-30T23:59:59Z',
133
+ * });
134
+ * ```
135
+ */
136
+ viralScore(
137
+ body: AnalysisViralScoreParams,
138
+ options?: RequestOptions,
139
+ ): APIPromise<AnalysisViralScoreResponse> {
140
+ return this._client.post('/x/analysis/viral-score', { body, ...options });
141
+ }
142
+ }
143
+
144
+ /**
145
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
146
+ * row in results costs 2 credits.
147
+ */
148
+ export interface AnalysisBrandResponse {
149
+ /**
150
+ * Totals of the answers across the analyzed posts.
151
+ */
152
+ analysisSummary: AnalysisBrandResponse.AnalysisSummary;
153
+
154
+ /**
155
+ * Whether the search has more posts. Send next_cursor as cursor.
156
+ */
157
+ has_next_page: boolean;
158
+
159
+ /**
160
+ * Cursor of the search's next page, else empty.
161
+ */
162
+ next_cursor: string;
163
+
164
+ /**
165
+ * Each analyzed post with its answers.
166
+ */
167
+ results: Array<AnalysisBrandResponse.Result>;
168
+
169
+ /**
170
+ * Each post without an analysis, by ID & reason. These cost nothing.
171
+ */
172
+ unanalyzed: Array<AnalysisBrandResponse.Unanalyzed>;
173
+ }
174
+
175
+ export namespace AnalysisBrandResponse {
176
+ /**
177
+ * Totals of the answers across the analyzed posts.
178
+ */
179
+ export interface AnalysisSummary {
180
+ /**
181
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
182
+ * the market questions.
183
+ */
184
+ cashtags: Array<AnalysisSummary.Cashtag>;
185
+
186
+ /**
187
+ * Likes, reposts, replies & quotes of the analyzed posts.
188
+ */
189
+ engagement: number;
190
+
191
+ /**
192
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
193
+ * when the answer holds no post.
194
+ */
195
+ monitor: AnalysisSummary.Monitor | null;
196
+
197
+ /**
198
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
199
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
200
+ * has mean, yes & no.
201
+ */
202
+ questions: { [key: string]: { [key: string]: unknown } };
203
+
204
+ /**
205
+ * Posts by analysis outcome.
206
+ */
207
+ rows: AnalysisSummary.Rows;
208
+
209
+ schemaVersion: number;
210
+
211
+ /**
212
+ * Posts per linked hostname, most posts first, up to 20.
213
+ */
214
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
215
+
216
+ /**
217
+ * Mentions & answers per target in analysis.targets.
218
+ */
219
+ targets: Array<AnalysisSummary.Target>;
220
+
221
+ /**
222
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
223
+ * counts, the scores against actual engagement, a report per author & the
224
+ * leaderboards.
225
+ */
226
+ viral?: { [key: string]: unknown };
227
+ }
228
+
229
+ export namespace AnalysisSummary {
230
+ export interface Cashtag {
231
+ cashtag: string;
232
+
233
+ /**
234
+ * Category counts of the cashtag's posts by question ID.
235
+ */
236
+ choices: { [key: string]: unknown };
237
+
238
+ rows: number;
239
+
240
+ signal?: Cashtag.Signal;
241
+ }
242
+
243
+ export namespace Cashtag {
244
+ export interface Signal {
245
+ bearish: number;
246
+
247
+ bullish: number;
248
+
249
+ /**
250
+ * Bullish minus bearish posts, over all posts.
251
+ */
252
+ score: number;
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
258
+ * when the answer holds no post.
259
+ */
260
+ export interface Monitor {
261
+ changedRows: Array<Monitor.ChangedRow>;
262
+
263
+ /**
264
+ * Posts per monitor status.
265
+ */
266
+ statuses: { [key: string]: number };
267
+ }
268
+
269
+ export namespace Monitor {
270
+ export interface ChangedRow {
271
+ changes: Array<ChangedRow.Change>;
272
+
273
+ tweetId: string;
274
+ }
275
+
276
+ export namespace ChangedRow {
277
+ export interface Change {
278
+ current: string;
279
+
280
+ previous: string;
281
+
282
+ questionId: string;
283
+ }
284
+ }
285
+ }
286
+
287
+ /**
288
+ * Posts by analysis outcome.
289
+ */
290
+ export interface Rows {
291
+ analyzed: number;
292
+
293
+ failed: number;
294
+
295
+ skipped: number;
296
+ }
297
+
298
+ export interface SourceDomain {
299
+ domain: string;
300
+
301
+ posts: number;
302
+ }
303
+
304
+ export interface Target {
305
+ /**
306
+ * Category counts by question ID.
307
+ */
308
+ choices: { [key: string]: unknown };
309
+
310
+ engagement: number;
311
+
312
+ mentions: number;
313
+
314
+ name: string;
315
+
316
+ share: number;
317
+
318
+ /**
319
+ * The most engaged posts per question ID & category.
320
+ */
321
+ top: { [key: string]: unknown };
322
+ }
323
+ }
324
+
325
+ /**
326
+ * 1 analyzed post with its answers.
327
+ */
328
+ export interface Result {
329
+ /**
330
+ * The answers in full, with their probabilities.
331
+ */
332
+ analysis: Result.Analysis;
333
+
334
+ /**
335
+ * Each question's decision by question ID. A choice gives its category, a score
336
+ * its level from 0, which can have decimals, & a probability its value from 0 to
337
+ * 1.
338
+ */
339
+ answers: { [key: string]: string | number };
340
+
341
+ /**
342
+ * Cashtags in the post's text, in upper case.
343
+ */
344
+ cashtags: Array<string>;
345
+
346
+ /**
347
+ * How the post's answers compare with its row in baseline, as the AI Actors
348
+ * compare a run with an earlier dataset.
349
+ */
350
+ monitor: Result.Monitor;
351
+
352
+ /**
353
+ * Hostnames the post links to, without t.co.
354
+ */
355
+ sourceDomains: Array<string>;
356
+
357
+ /**
358
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
359
+ * text:2 & so on.
360
+ */
361
+ tweet: Shared.SearchTweet;
362
+
363
+ /**
364
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
365
+ * that applied & the engagement comparison.
366
+ */
367
+ viral?: { [key: string]: unknown };
368
+
369
+ /**
370
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
371
+ * 1,000 followers. Null without a follower count.
372
+ */
373
+ viralActualEngagementRate?: number | null;
374
+
375
+ /**
376
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
377
+ * ranking weights, per 1,000 views or followers.
378
+ */
379
+ viralAlgorithmScore?: number | null;
380
+
381
+ /**
382
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
383
+ * trait has no answer.
384
+ */
385
+ viralScore?: number | null;
386
+
387
+ /**
388
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
389
+ * sleep_on_it.
390
+ */
391
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
392
+ }
393
+
394
+ export namespace Result {
395
+ /**
396
+ * The answers in full, with their probabilities.
397
+ */
398
+ export interface Analysis {
399
+ /**
400
+ * 1 answer per question, in question order.
401
+ */
402
+ answers: Array<Analysis.Answer>;
403
+
404
+ /**
405
+ * What the AI read beside the post's text.
406
+ */
407
+ contextAvailability: Analysis.ContextAvailability;
408
+
409
+ /**
410
+ * Bytes of post & settings the AI read.
411
+ */
412
+ contextBytes: number;
413
+
414
+ /**
415
+ * The ID & version of each question asked.
416
+ */
417
+ questions: Array<Analysis.Question>;
418
+
419
+ status: 'succeeded';
420
+ }
421
+
422
+ export namespace Analysis {
423
+ /**
424
+ * 1 question's answer. A probability has probability. A choice or score has value,
425
+ * confidence & the probability of each category or level.
426
+ */
427
+ export interface Answer {
428
+ questionId: string;
429
+
430
+ questionVersion: string;
431
+
432
+ type: 'choice' | 'score' | 'probability';
433
+
434
+ confidence?: number;
435
+
436
+ /**
437
+ * For a score. The levels the question named, from 0.
438
+ */
439
+ levels?: Array<string>;
440
+
441
+ /**
442
+ * Probability of each category, or of each level by index.
443
+ */
444
+ probabilities?: { [key: string]: number };
445
+
446
+ /**
447
+ * For a probability. The chance the answer is yes.
448
+ */
449
+ probability?: number;
450
+
451
+ /**
452
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
453
+ * between levels 1 & 2.
454
+ */
455
+ value?: string | number;
456
+ }
457
+
458
+ /**
459
+ * What the AI read beside the post's text.
460
+ */
461
+ export interface ContextAvailability {
462
+ article: 'text_blocks' | 'summary' | 'not_supplied';
463
+
464
+ author: 'available' | 'missing';
465
+
466
+ media: 'text_descriptions_only' | 'not_supplied';
467
+
468
+ /**
469
+ * truncated when the post was cut to fit.
470
+ */
471
+ postText: 'full' | 'truncated';
472
+
473
+ quote: 'available' | 'missing' | 'not_applicable';
474
+
475
+ reply: 'available' | 'missing' | 'not_applicable';
476
+ }
477
+
478
+ export interface Question {
479
+ id: string;
480
+
481
+ version: string;
482
+ }
483
+ }
484
+
485
+ /**
486
+ * How the post's answers compare with its row in baseline, as the AI Actors
487
+ * compare a run with an earlier dataset.
488
+ */
489
+ export interface Monitor {
490
+ /**
491
+ * Always null. The baseline is the rows you sent.
492
+ */
493
+ baselineDatasetId: null;
494
+
495
+ /**
496
+ * IDs of the questions whose decision changed.
497
+ */
498
+ changedQuestionIds: Array<string>;
499
+
500
+ /**
501
+ * Each changed decision, earlier & now.
502
+ */
503
+ changes: Array<Monitor.Change>;
504
+
505
+ /**
506
+ * Hash of the questions, targets & context. Rows with another hash are
507
+ * not_comparable.
508
+ */
509
+ configurationFingerprint: string;
510
+
511
+ /**
512
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
513
+ * when an answer clearly left its earlier decision. not_comparable when other
514
+ * settings made the earlier row or it answers none of these questions.
515
+ */
516
+ status:
517
+ 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
518
+ }
519
+
520
+ export namespace Monitor {
521
+ export interface Change {
522
+ current: string;
523
+
524
+ previous: string;
525
+
526
+ questionId: string;
527
+ }
528
+ }
529
+ }
530
+
531
+ /**
532
+ * A post without an analysis. It costs nothing.
533
+ */
534
+ export interface Unanalyzed {
535
+ /**
536
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
537
+ */
538
+ id: string;
539
+
540
+ /**
541
+ * post_unavailable when X returns no such post. missing_text for a post without
542
+ * text. insufficient_credits when credits ran out. context_limit when the settings
543
+ * leave the post no room. The other reasons mean the analysis failed. Send the
544
+ * post again.
545
+ */
546
+ reason: string;
547
+
548
+ status: 'failed' | 'skipped';
549
+ }
550
+ }
551
+
552
+ /**
553
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
554
+ * row in results costs 2 credits.
555
+ */
556
+ export interface AnalysisClassifyResponse {
557
+ /**
558
+ * Totals of the answers across the analyzed posts.
559
+ */
560
+ analysisSummary: AnalysisClassifyResponse.AnalysisSummary;
561
+
562
+ /**
563
+ * Whether the search has more posts. Send next_cursor as cursor.
564
+ */
565
+ has_next_page: boolean;
566
+
567
+ /**
568
+ * Cursor of the search's next page, else empty.
569
+ */
570
+ next_cursor: string;
571
+
572
+ /**
573
+ * Each analyzed post with its answers.
574
+ */
575
+ results: Array<AnalysisClassifyResponse.Result>;
576
+
577
+ /**
578
+ * Each post without an analysis, by ID & reason. These cost nothing.
579
+ */
580
+ unanalyzed: Array<AnalysisClassifyResponse.Unanalyzed>;
581
+ }
582
+
583
+ export namespace AnalysisClassifyResponse {
584
+ /**
585
+ * Totals of the answers across the analyzed posts.
586
+ */
587
+ export interface AnalysisSummary {
588
+ /**
589
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
590
+ * the market questions.
591
+ */
592
+ cashtags: Array<AnalysisSummary.Cashtag>;
593
+
594
+ /**
595
+ * Likes, reposts, replies & quotes of the analyzed posts.
596
+ */
597
+ engagement: number;
598
+
599
+ /**
600
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
601
+ * when the answer holds no post.
602
+ */
603
+ monitor: AnalysisSummary.Monitor | null;
604
+
605
+ /**
606
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
607
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
608
+ * has mean, yes & no.
609
+ */
610
+ questions: { [key: string]: { [key: string]: unknown } };
611
+
612
+ /**
613
+ * Posts by analysis outcome.
614
+ */
615
+ rows: AnalysisSummary.Rows;
616
+
617
+ schemaVersion: number;
618
+
619
+ /**
620
+ * Posts per linked hostname, most posts first, up to 20.
621
+ */
622
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
623
+
624
+ /**
625
+ * Mentions & answers per target in analysis.targets.
626
+ */
627
+ targets: Array<AnalysisSummary.Target>;
628
+
629
+ /**
630
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
631
+ * counts, the scores against actual engagement, a report per author & the
632
+ * leaderboards.
633
+ */
634
+ viral?: { [key: string]: unknown };
635
+ }
636
+
637
+ export namespace AnalysisSummary {
638
+ export interface Cashtag {
639
+ cashtag: string;
640
+
641
+ /**
642
+ * Category counts of the cashtag's posts by question ID.
643
+ */
644
+ choices: { [key: string]: unknown };
645
+
646
+ rows: number;
647
+
648
+ signal?: Cashtag.Signal;
649
+ }
650
+
651
+ export namespace Cashtag {
652
+ export interface Signal {
653
+ bearish: number;
654
+
655
+ bullish: number;
656
+
657
+ /**
658
+ * Bullish minus bearish posts, over all posts.
659
+ */
660
+ score: number;
661
+ }
662
+ }
663
+
664
+ /**
665
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
666
+ * when the answer holds no post.
667
+ */
668
+ export interface Monitor {
669
+ changedRows: Array<Monitor.ChangedRow>;
670
+
671
+ /**
672
+ * Posts per monitor status.
673
+ */
674
+ statuses: { [key: string]: number };
675
+ }
676
+
677
+ export namespace Monitor {
678
+ export interface ChangedRow {
679
+ changes: Array<ChangedRow.Change>;
680
+
681
+ tweetId: string;
682
+ }
683
+
684
+ export namespace ChangedRow {
685
+ export interface Change {
686
+ current: string;
687
+
688
+ previous: string;
689
+
690
+ questionId: string;
691
+ }
692
+ }
693
+ }
694
+
695
+ /**
696
+ * Posts by analysis outcome.
697
+ */
698
+ export interface Rows {
699
+ analyzed: number;
700
+
701
+ failed: number;
702
+
703
+ skipped: number;
704
+ }
705
+
706
+ export interface SourceDomain {
707
+ domain: string;
708
+
709
+ posts: number;
710
+ }
711
+
712
+ export interface Target {
713
+ /**
714
+ * Category counts by question ID.
715
+ */
716
+ choices: { [key: string]: unknown };
717
+
718
+ engagement: number;
719
+
720
+ mentions: number;
721
+
722
+ name: string;
723
+
724
+ share: number;
725
+
726
+ /**
727
+ * The most engaged posts per question ID & category.
728
+ */
729
+ top: { [key: string]: unknown };
730
+ }
731
+ }
732
+
733
+ /**
734
+ * 1 analyzed post with its answers.
735
+ */
736
+ export interface Result {
737
+ /**
738
+ * The answers in full, with their probabilities.
739
+ */
740
+ analysis: Result.Analysis;
741
+
742
+ /**
743
+ * Each question's decision by question ID. A choice gives its category, a score
744
+ * its level from 0, which can have decimals, & a probability its value from 0 to
745
+ * 1.
746
+ */
747
+ answers: { [key: string]: string | number };
748
+
749
+ /**
750
+ * Cashtags in the post's text, in upper case.
751
+ */
752
+ cashtags: Array<string>;
753
+
754
+ /**
755
+ * How the post's answers compare with its row in baseline, as the AI Actors
756
+ * compare a run with an earlier dataset.
757
+ */
758
+ monitor: Result.Monitor;
759
+
760
+ /**
761
+ * Hostnames the post links to, without t.co.
762
+ */
763
+ sourceDomains: Array<string>;
764
+
765
+ /**
766
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
767
+ * text:2 & so on.
768
+ */
769
+ tweet: Shared.SearchTweet;
770
+
771
+ /**
772
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
773
+ * that applied & the engagement comparison.
774
+ */
775
+ viral?: { [key: string]: unknown };
776
+
777
+ /**
778
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
779
+ * 1,000 followers. Null without a follower count.
780
+ */
781
+ viralActualEngagementRate?: number | null;
782
+
783
+ /**
784
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
785
+ * ranking weights, per 1,000 views or followers.
786
+ */
787
+ viralAlgorithmScore?: number | null;
788
+
789
+ /**
790
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
791
+ * trait has no answer.
792
+ */
793
+ viralScore?: number | null;
794
+
795
+ /**
796
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
797
+ * sleep_on_it.
798
+ */
799
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
800
+ }
801
+
802
+ export namespace Result {
803
+ /**
804
+ * The answers in full, with their probabilities.
805
+ */
806
+ export interface Analysis {
807
+ /**
808
+ * 1 answer per question, in question order.
809
+ */
810
+ answers: Array<Analysis.Answer>;
811
+
812
+ /**
813
+ * What the AI read beside the post's text.
814
+ */
815
+ contextAvailability: Analysis.ContextAvailability;
816
+
817
+ /**
818
+ * Bytes of post & settings the AI read.
819
+ */
820
+ contextBytes: number;
821
+
822
+ /**
823
+ * The ID & version of each question asked.
824
+ */
825
+ questions: Array<Analysis.Question>;
826
+
827
+ status: 'succeeded';
828
+ }
829
+
830
+ export namespace Analysis {
831
+ /**
832
+ * 1 question's answer. A probability has probability. A choice or score has value,
833
+ * confidence & the probability of each category or level.
834
+ */
835
+ export interface Answer {
836
+ questionId: string;
837
+
838
+ questionVersion: string;
839
+
840
+ type: 'choice' | 'score' | 'probability';
841
+
842
+ confidence?: number;
843
+
844
+ /**
845
+ * For a score. The levels the question named, from 0.
846
+ */
847
+ levels?: Array<string>;
848
+
849
+ /**
850
+ * Probability of each category, or of each level by index.
851
+ */
852
+ probabilities?: { [key: string]: number };
853
+
854
+ /**
855
+ * For a probability. The chance the answer is yes.
856
+ */
857
+ probability?: number;
858
+
859
+ /**
860
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
861
+ * between levels 1 & 2.
862
+ */
863
+ value?: string | number;
864
+ }
865
+
866
+ /**
867
+ * What the AI read beside the post's text.
868
+ */
869
+ export interface ContextAvailability {
870
+ article: 'text_blocks' | 'summary' | 'not_supplied';
871
+
872
+ author: 'available' | 'missing';
873
+
874
+ media: 'text_descriptions_only' | 'not_supplied';
875
+
876
+ /**
877
+ * truncated when the post was cut to fit.
878
+ */
879
+ postText: 'full' | 'truncated';
880
+
881
+ quote: 'available' | 'missing' | 'not_applicable';
882
+
883
+ reply: 'available' | 'missing' | 'not_applicable';
884
+ }
885
+
886
+ export interface Question {
887
+ id: string;
888
+
889
+ version: string;
890
+ }
891
+ }
892
+
893
+ /**
894
+ * How the post's answers compare with its row in baseline, as the AI Actors
895
+ * compare a run with an earlier dataset.
896
+ */
897
+ export interface Monitor {
898
+ /**
899
+ * Always null. The baseline is the rows you sent.
900
+ */
901
+ baselineDatasetId: null;
902
+
903
+ /**
904
+ * IDs of the questions whose decision changed.
905
+ */
906
+ changedQuestionIds: Array<string>;
907
+
908
+ /**
909
+ * Each changed decision, earlier & now.
910
+ */
911
+ changes: Array<Monitor.Change>;
912
+
913
+ /**
914
+ * Hash of the questions, targets & context. Rows with another hash are
915
+ * not_comparable.
916
+ */
917
+ configurationFingerprint: string;
918
+
919
+ /**
920
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
921
+ * when an answer clearly left its earlier decision. not_comparable when other
922
+ * settings made the earlier row or it answers none of these questions.
923
+ */
924
+ status:
925
+ 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
926
+ }
927
+
928
+ export namespace Monitor {
929
+ export interface Change {
930
+ current: string;
931
+
932
+ previous: string;
933
+
934
+ questionId: string;
935
+ }
936
+ }
937
+ }
938
+
939
+ /**
940
+ * A post without an analysis. It costs nothing.
941
+ */
942
+ export interface Unanalyzed {
943
+ /**
944
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
945
+ */
946
+ id: string;
947
+
948
+ /**
949
+ * post_unavailable when X returns no such post. missing_text for a post without
950
+ * text. insufficient_credits when credits ran out. context_limit when the settings
951
+ * leave the post no room. The other reasons mean the analysis failed. Send the
952
+ * post again.
953
+ */
954
+ reason: string;
955
+
956
+ status: 'failed' | 'skipped';
957
+ }
958
+ }
959
+
960
+ /**
961
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
962
+ * row in results costs 2 credits.
963
+ */
964
+ export interface AnalysisMarketSignalsResponse {
965
+ /**
966
+ * Totals of the answers across the analyzed posts.
967
+ */
968
+ analysisSummary: AnalysisMarketSignalsResponse.AnalysisSummary;
969
+
970
+ /**
971
+ * Whether the search has more posts. Send next_cursor as cursor.
972
+ */
973
+ has_next_page: boolean;
974
+
975
+ /**
976
+ * Cursor of the search's next page, else empty.
977
+ */
978
+ next_cursor: string;
979
+
980
+ /**
981
+ * Each analyzed post with its answers.
982
+ */
983
+ results: Array<AnalysisMarketSignalsResponse.Result>;
984
+
985
+ /**
986
+ * Each post without an analysis, by ID & reason. These cost nothing.
987
+ */
988
+ unanalyzed: Array<AnalysisMarketSignalsResponse.Unanalyzed>;
989
+ }
990
+
991
+ export namespace AnalysisMarketSignalsResponse {
992
+ /**
993
+ * Totals of the answers across the analyzed posts.
994
+ */
995
+ export interface AnalysisSummary {
996
+ /**
997
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
998
+ * the market questions.
999
+ */
1000
+ cashtags: Array<AnalysisSummary.Cashtag>;
1001
+
1002
+ /**
1003
+ * Likes, reposts, replies & quotes of the analyzed posts.
1004
+ */
1005
+ engagement: number;
1006
+
1007
+ /**
1008
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1009
+ * when the answer holds no post.
1010
+ */
1011
+ monitor: AnalysisSummary.Monitor | null;
1012
+
1013
+ /**
1014
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
1015
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
1016
+ * has mean, yes & no.
1017
+ */
1018
+ questions: { [key: string]: { [key: string]: unknown } };
1019
+
1020
+ /**
1021
+ * Posts by analysis outcome.
1022
+ */
1023
+ rows: AnalysisSummary.Rows;
1024
+
1025
+ schemaVersion: number;
1026
+
1027
+ /**
1028
+ * Posts per linked hostname, most posts first, up to 20.
1029
+ */
1030
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
1031
+
1032
+ /**
1033
+ * Mentions & answers per target in analysis.targets.
1034
+ */
1035
+ targets: Array<AnalysisSummary.Target>;
1036
+
1037
+ /**
1038
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
1039
+ * counts, the scores against actual engagement, a report per author & the
1040
+ * leaderboards.
1041
+ */
1042
+ viral?: { [key: string]: unknown };
1043
+ }
1044
+
1045
+ export namespace AnalysisSummary {
1046
+ export interface Cashtag {
1047
+ cashtag: string;
1048
+
1049
+ /**
1050
+ * Category counts of the cashtag's posts by question ID.
1051
+ */
1052
+ choices: { [key: string]: unknown };
1053
+
1054
+ rows: number;
1055
+
1056
+ signal?: Cashtag.Signal;
1057
+ }
1058
+
1059
+ export namespace Cashtag {
1060
+ export interface Signal {
1061
+ bearish: number;
1062
+
1063
+ bullish: number;
1064
+
1065
+ /**
1066
+ * Bullish minus bearish posts, over all posts.
1067
+ */
1068
+ score: number;
1069
+ }
1070
+ }
1071
+
1072
+ /**
1073
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1074
+ * when the answer holds no post.
1075
+ */
1076
+ export interface Monitor {
1077
+ changedRows: Array<Monitor.ChangedRow>;
1078
+
1079
+ /**
1080
+ * Posts per monitor status.
1081
+ */
1082
+ statuses: { [key: string]: number };
1083
+ }
1084
+
1085
+ export namespace Monitor {
1086
+ export interface ChangedRow {
1087
+ changes: Array<ChangedRow.Change>;
1088
+
1089
+ tweetId: string;
1090
+ }
1091
+
1092
+ export namespace ChangedRow {
1093
+ export interface Change {
1094
+ current: string;
1095
+
1096
+ previous: string;
1097
+
1098
+ questionId: string;
1099
+ }
1100
+ }
1101
+ }
1102
+
1103
+ /**
1104
+ * Posts by analysis outcome.
1105
+ */
1106
+ export interface Rows {
1107
+ analyzed: number;
1108
+
1109
+ failed: number;
1110
+
1111
+ skipped: number;
1112
+ }
1113
+
1114
+ export interface SourceDomain {
1115
+ domain: string;
1116
+
1117
+ posts: number;
1118
+ }
1119
+
1120
+ export interface Target {
1121
+ /**
1122
+ * Category counts by question ID.
1123
+ */
1124
+ choices: { [key: string]: unknown };
1125
+
1126
+ engagement: number;
1127
+
1128
+ mentions: number;
1129
+
1130
+ name: string;
1131
+
1132
+ share: number;
1133
+
1134
+ /**
1135
+ * The most engaged posts per question ID & category.
1136
+ */
1137
+ top: { [key: string]: unknown };
1138
+ }
1139
+ }
1140
+
1141
+ /**
1142
+ * 1 analyzed post with its answers.
1143
+ */
1144
+ export interface Result {
1145
+ /**
1146
+ * The answers in full, with their probabilities.
1147
+ */
1148
+ analysis: Result.Analysis;
1149
+
1150
+ /**
1151
+ * Each question's decision by question ID. A choice gives its category, a score
1152
+ * its level from 0, which can have decimals, & a probability its value from 0 to
1153
+ * 1.
1154
+ */
1155
+ answers: { [key: string]: string | number };
1156
+
1157
+ /**
1158
+ * Cashtags in the post's text, in upper case.
1159
+ */
1160
+ cashtags: Array<string>;
1161
+
1162
+ /**
1163
+ * How the post's answers compare with its row in baseline, as the AI Actors
1164
+ * compare a run with an earlier dataset.
1165
+ */
1166
+ monitor: Result.Monitor;
1167
+
1168
+ /**
1169
+ * Hostnames the post links to, without t.co.
1170
+ */
1171
+ sourceDomains: Array<string>;
1172
+
1173
+ /**
1174
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
1175
+ * text:2 & so on.
1176
+ */
1177
+ tweet: Shared.SearchTweet;
1178
+
1179
+ /**
1180
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
1181
+ * that applied & the engagement comparison.
1182
+ */
1183
+ viral?: { [key: string]: unknown };
1184
+
1185
+ /**
1186
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
1187
+ * 1,000 followers. Null without a follower count.
1188
+ */
1189
+ viralActualEngagementRate?: number | null;
1190
+
1191
+ /**
1192
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
1193
+ * ranking weights, per 1,000 views or followers.
1194
+ */
1195
+ viralAlgorithmScore?: number | null;
1196
+
1197
+ /**
1198
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
1199
+ * trait has no answer.
1200
+ */
1201
+ viralScore?: number | null;
1202
+
1203
+ /**
1204
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
1205
+ * sleep_on_it.
1206
+ */
1207
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
1208
+ }
1209
+
1210
+ export namespace Result {
1211
+ /**
1212
+ * The answers in full, with their probabilities.
1213
+ */
1214
+ export interface Analysis {
1215
+ /**
1216
+ * 1 answer per question, in question order.
1217
+ */
1218
+ answers: Array<Analysis.Answer>;
1219
+
1220
+ /**
1221
+ * What the AI read beside the post's text.
1222
+ */
1223
+ contextAvailability: Analysis.ContextAvailability;
1224
+
1225
+ /**
1226
+ * Bytes of post & settings the AI read.
1227
+ */
1228
+ contextBytes: number;
1229
+
1230
+ /**
1231
+ * The ID & version of each question asked.
1232
+ */
1233
+ questions: Array<Analysis.Question>;
1234
+
1235
+ status: 'succeeded';
1236
+ }
1237
+
1238
+ export namespace Analysis {
1239
+ /**
1240
+ * 1 question's answer. A probability has probability. A choice or score has value,
1241
+ * confidence & the probability of each category or level.
1242
+ */
1243
+ export interface Answer {
1244
+ questionId: string;
1245
+
1246
+ questionVersion: string;
1247
+
1248
+ type: 'choice' | 'score' | 'probability';
1249
+
1250
+ confidence?: number;
1251
+
1252
+ /**
1253
+ * For a score. The levels the question named, from 0.
1254
+ */
1255
+ levels?: Array<string>;
1256
+
1257
+ /**
1258
+ * Probability of each category, or of each level by index.
1259
+ */
1260
+ probabilities?: { [key: string]: number };
1261
+
1262
+ /**
1263
+ * For a probability. The chance the answer is yes.
1264
+ */
1265
+ probability?: number;
1266
+
1267
+ /**
1268
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
1269
+ * between levels 1 & 2.
1270
+ */
1271
+ value?: string | number;
1272
+ }
1273
+
1274
+ /**
1275
+ * What the AI read beside the post's text.
1276
+ */
1277
+ export interface ContextAvailability {
1278
+ article: 'text_blocks' | 'summary' | 'not_supplied';
1279
+
1280
+ author: 'available' | 'missing';
1281
+
1282
+ media: 'text_descriptions_only' | 'not_supplied';
1283
+
1284
+ /**
1285
+ * truncated when the post was cut to fit.
1286
+ */
1287
+ postText: 'full' | 'truncated';
1288
+
1289
+ quote: 'available' | 'missing' | 'not_applicable';
1290
+
1291
+ reply: 'available' | 'missing' | 'not_applicable';
1292
+ }
1293
+
1294
+ export interface Question {
1295
+ id: string;
1296
+
1297
+ version: string;
1298
+ }
1299
+ }
1300
+
1301
+ /**
1302
+ * How the post's answers compare with its row in baseline, as the AI Actors
1303
+ * compare a run with an earlier dataset.
1304
+ */
1305
+ export interface Monitor {
1306
+ /**
1307
+ * Always null. The baseline is the rows you sent.
1308
+ */
1309
+ baselineDatasetId: null;
1310
+
1311
+ /**
1312
+ * IDs of the questions whose decision changed.
1313
+ */
1314
+ changedQuestionIds: Array<string>;
1315
+
1316
+ /**
1317
+ * Each changed decision, earlier & now.
1318
+ */
1319
+ changes: Array<Monitor.Change>;
1320
+
1321
+ /**
1322
+ * Hash of the questions, targets & context. Rows with another hash are
1323
+ * not_comparable.
1324
+ */
1325
+ configurationFingerprint: string;
1326
+
1327
+ /**
1328
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
1329
+ * when an answer clearly left its earlier decision. not_comparable when other
1330
+ * settings made the earlier row or it answers none of these questions.
1331
+ */
1332
+ status:
1333
+ 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
1334
+ }
1335
+
1336
+ export namespace Monitor {
1337
+ export interface Change {
1338
+ current: string;
1339
+
1340
+ previous: string;
1341
+
1342
+ questionId: string;
1343
+ }
1344
+ }
1345
+ }
1346
+
1347
+ /**
1348
+ * A post without an analysis. It costs nothing.
1349
+ */
1350
+ export interface Unanalyzed {
1351
+ /**
1352
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
1353
+ */
1354
+ id: string;
1355
+
1356
+ /**
1357
+ * post_unavailable when X returns no such post. missing_text for a post without
1358
+ * text. insufficient_credits when credits ran out. context_limit when the settings
1359
+ * leave the post no room. The other reasons mean the analysis failed. Send the
1360
+ * post again.
1361
+ */
1362
+ reason: string;
1363
+
1364
+ status: 'failed' | 'skipped';
1365
+ }
1366
+ }
1367
+
1368
+ /**
1369
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
1370
+ * row in results costs 2 credits.
1371
+ */
1372
+ export interface AnalysisNewsResponse {
1373
+ /**
1374
+ * Totals of the answers across the analyzed posts.
1375
+ */
1376
+ analysisSummary: AnalysisNewsResponse.AnalysisSummary;
1377
+
1378
+ /**
1379
+ * Whether the search has more posts. Send next_cursor as cursor.
1380
+ */
1381
+ has_next_page: boolean;
1382
+
1383
+ /**
1384
+ * Cursor of the search's next page, else empty.
1385
+ */
1386
+ next_cursor: string;
1387
+
1388
+ /**
1389
+ * Each analyzed post with its answers.
1390
+ */
1391
+ results: Array<AnalysisNewsResponse.Result>;
1392
+
1393
+ /**
1394
+ * Each post without an analysis, by ID & reason. These cost nothing.
1395
+ */
1396
+ unanalyzed: Array<AnalysisNewsResponse.Unanalyzed>;
1397
+ }
1398
+
1399
+ export namespace AnalysisNewsResponse {
1400
+ /**
1401
+ * Totals of the answers across the analyzed posts.
1402
+ */
1403
+ export interface AnalysisSummary {
1404
+ /**
1405
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
1406
+ * the market questions.
1407
+ */
1408
+ cashtags: Array<AnalysisSummary.Cashtag>;
1409
+
1410
+ /**
1411
+ * Likes, reposts, replies & quotes of the analyzed posts.
1412
+ */
1413
+ engagement: number;
1414
+
1415
+ /**
1416
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1417
+ * when the answer holds no post.
1418
+ */
1419
+ monitor: AnalysisSummary.Monitor | null;
1420
+
1421
+ /**
1422
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
1423
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
1424
+ * has mean, yes & no.
1425
+ */
1426
+ questions: { [key: string]: { [key: string]: unknown } };
1427
+
1428
+ /**
1429
+ * Posts by analysis outcome.
1430
+ */
1431
+ rows: AnalysisSummary.Rows;
1432
+
1433
+ schemaVersion: number;
1434
+
1435
+ /**
1436
+ * Posts per linked hostname, most posts first, up to 20.
1437
+ */
1438
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
1439
+
1440
+ /**
1441
+ * Mentions & answers per target in analysis.targets.
1442
+ */
1443
+ targets: Array<AnalysisSummary.Target>;
1444
+
1445
+ /**
1446
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
1447
+ * counts, the scores against actual engagement, a report per author & the
1448
+ * leaderboards.
1449
+ */
1450
+ viral?: { [key: string]: unknown };
1451
+ }
1452
+
1453
+ export namespace AnalysisSummary {
1454
+ export interface Cashtag {
1455
+ cashtag: string;
1456
+
1457
+ /**
1458
+ * Category counts of the cashtag's posts by question ID.
1459
+ */
1460
+ choices: { [key: string]: unknown };
1461
+
1462
+ rows: number;
1463
+
1464
+ signal?: Cashtag.Signal;
1465
+ }
1466
+
1467
+ export namespace Cashtag {
1468
+ export interface Signal {
1469
+ bearish: number;
1470
+
1471
+ bullish: number;
1472
+
1473
+ /**
1474
+ * Bullish minus bearish posts, over all posts.
1475
+ */
1476
+ score: number;
1477
+ }
1478
+ }
1479
+
1480
+ /**
1481
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1482
+ * when the answer holds no post.
1483
+ */
1484
+ export interface Monitor {
1485
+ changedRows: Array<Monitor.ChangedRow>;
1486
+
1487
+ /**
1488
+ * Posts per monitor status.
1489
+ */
1490
+ statuses: { [key: string]: number };
1491
+ }
1492
+
1493
+ export namespace Monitor {
1494
+ export interface ChangedRow {
1495
+ changes: Array<ChangedRow.Change>;
1496
+
1497
+ tweetId: string;
1498
+ }
1499
+
1500
+ export namespace ChangedRow {
1501
+ export interface Change {
1502
+ current: string;
1503
+
1504
+ previous: string;
1505
+
1506
+ questionId: string;
1507
+ }
1508
+ }
1509
+ }
1510
+
1511
+ /**
1512
+ * Posts by analysis outcome.
1513
+ */
1514
+ export interface Rows {
1515
+ analyzed: number;
1516
+
1517
+ failed: number;
1518
+
1519
+ skipped: number;
1520
+ }
1521
+
1522
+ export interface SourceDomain {
1523
+ domain: string;
1524
+
1525
+ posts: number;
1526
+ }
1527
+
1528
+ export interface Target {
1529
+ /**
1530
+ * Category counts by question ID.
1531
+ */
1532
+ choices: { [key: string]: unknown };
1533
+
1534
+ engagement: number;
1535
+
1536
+ mentions: number;
1537
+
1538
+ name: string;
1539
+
1540
+ share: number;
1541
+
1542
+ /**
1543
+ * The most engaged posts per question ID & category.
1544
+ */
1545
+ top: { [key: string]: unknown };
1546
+ }
1547
+ }
1548
+
1549
+ /**
1550
+ * 1 analyzed post with its answers.
1551
+ */
1552
+ export interface Result {
1553
+ /**
1554
+ * The answers in full, with their probabilities.
1555
+ */
1556
+ analysis: Result.Analysis;
1557
+
1558
+ /**
1559
+ * Each question's decision by question ID. A choice gives its category, a score
1560
+ * its level from 0, which can have decimals, & a probability its value from 0 to
1561
+ * 1.
1562
+ */
1563
+ answers: { [key: string]: string | number };
1564
+
1565
+ /**
1566
+ * Cashtags in the post's text, in upper case.
1567
+ */
1568
+ cashtags: Array<string>;
1569
+
1570
+ /**
1571
+ * How the post's answers compare with its row in baseline, as the AI Actors
1572
+ * compare a run with an earlier dataset.
1573
+ */
1574
+ monitor: Result.Monitor;
1575
+
1576
+ /**
1577
+ * Hostnames the post links to, without t.co.
1578
+ */
1579
+ sourceDomains: Array<string>;
1580
+
1581
+ /**
1582
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
1583
+ * text:2 & so on.
1584
+ */
1585
+ tweet: Shared.SearchTweet;
1586
+
1587
+ /**
1588
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
1589
+ * that applied & the engagement comparison.
1590
+ */
1591
+ viral?: { [key: string]: unknown };
1592
+
1593
+ /**
1594
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
1595
+ * 1,000 followers. Null without a follower count.
1596
+ */
1597
+ viralActualEngagementRate?: number | null;
1598
+
1599
+ /**
1600
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
1601
+ * ranking weights, per 1,000 views or followers.
1602
+ */
1603
+ viralAlgorithmScore?: number | null;
1604
+
1605
+ /**
1606
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
1607
+ * trait has no answer.
1608
+ */
1609
+ viralScore?: number | null;
1610
+
1611
+ /**
1612
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
1613
+ * sleep_on_it.
1614
+ */
1615
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
1616
+ }
1617
+
1618
+ export namespace Result {
1619
+ /**
1620
+ * The answers in full, with their probabilities.
1621
+ */
1622
+ export interface Analysis {
1623
+ /**
1624
+ * 1 answer per question, in question order.
1625
+ */
1626
+ answers: Array<Analysis.Answer>;
1627
+
1628
+ /**
1629
+ * What the AI read beside the post's text.
1630
+ */
1631
+ contextAvailability: Analysis.ContextAvailability;
1632
+
1633
+ /**
1634
+ * Bytes of post & settings the AI read.
1635
+ */
1636
+ contextBytes: number;
1637
+
1638
+ /**
1639
+ * The ID & version of each question asked.
1640
+ */
1641
+ questions: Array<Analysis.Question>;
1642
+
1643
+ status: 'succeeded';
1644
+ }
1645
+
1646
+ export namespace Analysis {
1647
+ /**
1648
+ * 1 question's answer. A probability has probability. A choice or score has value,
1649
+ * confidence & the probability of each category or level.
1650
+ */
1651
+ export interface Answer {
1652
+ questionId: string;
1653
+
1654
+ questionVersion: string;
1655
+
1656
+ type: 'choice' | 'score' | 'probability';
1657
+
1658
+ confidence?: number;
1659
+
1660
+ /**
1661
+ * For a score. The levels the question named, from 0.
1662
+ */
1663
+ levels?: Array<string>;
1664
+
1665
+ /**
1666
+ * Probability of each category, or of each level by index.
1667
+ */
1668
+ probabilities?: { [key: string]: number };
1669
+
1670
+ /**
1671
+ * For a probability. The chance the answer is yes.
1672
+ */
1673
+ probability?: number;
1674
+
1675
+ /**
1676
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
1677
+ * between levels 1 & 2.
1678
+ */
1679
+ value?: string | number;
1680
+ }
1681
+
1682
+ /**
1683
+ * What the AI read beside the post's text.
1684
+ */
1685
+ export interface ContextAvailability {
1686
+ article: 'text_blocks' | 'summary' | 'not_supplied';
1687
+
1688
+ author: 'available' | 'missing';
1689
+
1690
+ media: 'text_descriptions_only' | 'not_supplied';
1691
+
1692
+ /**
1693
+ * truncated when the post was cut to fit.
1694
+ */
1695
+ postText: 'full' | 'truncated';
1696
+
1697
+ quote: 'available' | 'missing' | 'not_applicable';
1698
+
1699
+ reply: 'available' | 'missing' | 'not_applicable';
1700
+ }
1701
+
1702
+ export interface Question {
1703
+ id: string;
1704
+
1705
+ version: string;
1706
+ }
1707
+ }
1708
+
1709
+ /**
1710
+ * How the post's answers compare with its row in baseline, as the AI Actors
1711
+ * compare a run with an earlier dataset.
1712
+ */
1713
+ export interface Monitor {
1714
+ /**
1715
+ * Always null. The baseline is the rows you sent.
1716
+ */
1717
+ baselineDatasetId: null;
1718
+
1719
+ /**
1720
+ * IDs of the questions whose decision changed.
1721
+ */
1722
+ changedQuestionIds: Array<string>;
1723
+
1724
+ /**
1725
+ * Each changed decision, earlier & now.
1726
+ */
1727
+ changes: Array<Monitor.Change>;
1728
+
1729
+ /**
1730
+ * Hash of the questions, targets & context. Rows with another hash are
1731
+ * not_comparable.
1732
+ */
1733
+ configurationFingerprint: string;
1734
+
1735
+ /**
1736
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
1737
+ * when an answer clearly left its earlier decision. not_comparable when other
1738
+ * settings made the earlier row or it answers none of these questions.
1739
+ */
1740
+ status:
1741
+ 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
1742
+ }
1743
+
1744
+ export namespace Monitor {
1745
+ export interface Change {
1746
+ current: string;
1747
+
1748
+ previous: string;
1749
+
1750
+ questionId: string;
1751
+ }
1752
+ }
1753
+ }
1754
+
1755
+ /**
1756
+ * A post without an analysis. It costs nothing.
1757
+ */
1758
+ export interface Unanalyzed {
1759
+ /**
1760
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
1761
+ */
1762
+ id: string;
1763
+
1764
+ /**
1765
+ * post_unavailable when X returns no such post. missing_text for a post without
1766
+ * text. insufficient_credits when credits ran out. context_limit when the settings
1767
+ * leave the post no room. The other reasons mean the analysis failed. Send the
1768
+ * post again.
1769
+ */
1770
+ reason: string;
1771
+
1772
+ status: 'failed' | 'skipped';
1773
+ }
1774
+ }
1775
+
1776
+ /**
1777
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
1778
+ * row in results costs 2 credits.
1779
+ */
1780
+ export interface AnalysisSentimentResponse {
1781
+ /**
1782
+ * Totals of the answers across the analyzed posts.
1783
+ */
1784
+ analysisSummary: AnalysisSentimentResponse.AnalysisSummary;
1785
+
1786
+ /**
1787
+ * Whether the search has more posts. Send next_cursor as cursor.
1788
+ */
1789
+ has_next_page: boolean;
1790
+
1791
+ /**
1792
+ * Cursor of the search's next page, else empty.
1793
+ */
1794
+ next_cursor: string;
1795
+
1796
+ /**
1797
+ * Each analyzed post with its answers.
1798
+ */
1799
+ results: Array<AnalysisSentimentResponse.Result>;
1800
+
1801
+ /**
1802
+ * Each post without an analysis, by ID & reason. These cost nothing.
1803
+ */
1804
+ unanalyzed: Array<AnalysisSentimentResponse.Unanalyzed>;
1805
+ }
1806
+
1807
+ export namespace AnalysisSentimentResponse {
1808
+ /**
1809
+ * Totals of the answers across the analyzed posts.
1810
+ */
1811
+ export interface AnalysisSummary {
1812
+ /**
1813
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
1814
+ * the market questions.
1815
+ */
1816
+ cashtags: Array<AnalysisSummary.Cashtag>;
1817
+
1818
+ /**
1819
+ * Likes, reposts, replies & quotes of the analyzed posts.
1820
+ */
1821
+ engagement: number;
1822
+
1823
+ /**
1824
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1825
+ * when the answer holds no post.
1826
+ */
1827
+ monitor: AnalysisSummary.Monitor | null;
1828
+
1829
+ /**
1830
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
1831
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
1832
+ * has mean, yes & no.
1833
+ */
1834
+ questions: { [key: string]: { [key: string]: unknown } };
1835
+
1836
+ /**
1837
+ * Posts by analysis outcome.
1838
+ */
1839
+ rows: AnalysisSummary.Rows;
1840
+
1841
+ schemaVersion: number;
1842
+
1843
+ /**
1844
+ * Posts per linked hostname, most posts first, up to 20.
1845
+ */
1846
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
1847
+
1848
+ /**
1849
+ * Mentions & answers per target in analysis.targets.
1850
+ */
1851
+ targets: Array<AnalysisSummary.Target>;
1852
+
1853
+ /**
1854
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
1855
+ * counts, the scores against actual engagement, a report per author & the
1856
+ * leaderboards.
1857
+ */
1858
+ viral?: { [key: string]: unknown };
1859
+ }
1860
+
1861
+ export namespace AnalysisSummary {
1862
+ export interface Cashtag {
1863
+ cashtag: string;
1864
+
1865
+ /**
1866
+ * Category counts of the cashtag's posts by question ID.
1867
+ */
1868
+ choices: { [key: string]: unknown };
1869
+
1870
+ rows: number;
1871
+
1872
+ signal?: Cashtag.Signal;
1873
+ }
1874
+
1875
+ export namespace Cashtag {
1876
+ export interface Signal {
1877
+ bearish: number;
1878
+
1879
+ bullish: number;
1880
+
1881
+ /**
1882
+ * Bullish minus bearish posts, over all posts.
1883
+ */
1884
+ score: number;
1885
+ }
1886
+ }
1887
+
1888
+ /**
1889
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
1890
+ * when the answer holds no post.
1891
+ */
1892
+ export interface Monitor {
1893
+ changedRows: Array<Monitor.ChangedRow>;
1894
+
1895
+ /**
1896
+ * Posts per monitor status.
1897
+ */
1898
+ statuses: { [key: string]: number };
1899
+ }
1900
+
1901
+ export namespace Monitor {
1902
+ export interface ChangedRow {
1903
+ changes: Array<ChangedRow.Change>;
1904
+
1905
+ tweetId: string;
1906
+ }
1907
+
1908
+ export namespace ChangedRow {
1909
+ export interface Change {
1910
+ current: string;
1911
+
1912
+ previous: string;
1913
+
1914
+ questionId: string;
1915
+ }
1916
+ }
1917
+ }
1918
+
1919
+ /**
1920
+ * Posts by analysis outcome.
1921
+ */
1922
+ export interface Rows {
1923
+ analyzed: number;
1924
+
1925
+ failed: number;
1926
+
1927
+ skipped: number;
1928
+ }
1929
+
1930
+ export interface SourceDomain {
1931
+ domain: string;
1932
+
1933
+ posts: number;
1934
+ }
1935
+
1936
+ export interface Target {
1937
+ /**
1938
+ * Category counts by question ID.
1939
+ */
1940
+ choices: { [key: string]: unknown };
1941
+
1942
+ engagement: number;
1943
+
1944
+ mentions: number;
1945
+
1946
+ name: string;
1947
+
1948
+ share: number;
1949
+
1950
+ /**
1951
+ * The most engaged posts per question ID & category.
1952
+ */
1953
+ top: { [key: string]: unknown };
1954
+ }
1955
+ }
1956
+
1957
+ /**
1958
+ * 1 analyzed post with its answers.
1959
+ */
1960
+ export interface Result {
1961
+ /**
1962
+ * The answers in full, with their probabilities.
1963
+ */
1964
+ analysis: Result.Analysis;
1965
+
1966
+ /**
1967
+ * Each question's decision by question ID. A choice gives its category, a score
1968
+ * its level from 0, which can have decimals, & a probability its value from 0 to
1969
+ * 1.
1970
+ */
1971
+ answers: { [key: string]: string | number };
1972
+
1973
+ /**
1974
+ * Cashtags in the post's text, in upper case.
1975
+ */
1976
+ cashtags: Array<string>;
1977
+
1978
+ /**
1979
+ * How the post's answers compare with its row in baseline, as the AI Actors
1980
+ * compare a run with an earlier dataset.
1981
+ */
1982
+ monitor: Result.Monitor;
1983
+
1984
+ /**
1985
+ * Hostnames the post links to, without t.co.
1986
+ */
1987
+ sourceDomains: Array<string>;
1988
+
1989
+ /**
1990
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
1991
+ * text:2 & so on.
1992
+ */
1993
+ tweet: Shared.SearchTweet;
1994
+
1995
+ /**
1996
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
1997
+ * that applied & the engagement comparison.
1998
+ */
1999
+ viral?: { [key: string]: unknown };
2000
+
2001
+ /**
2002
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
2003
+ * 1,000 followers. Null without a follower count.
2004
+ */
2005
+ viralActualEngagementRate?: number | null;
2006
+
2007
+ /**
2008
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
2009
+ * ranking weights, per 1,000 views or followers.
2010
+ */
2011
+ viralAlgorithmScore?: number | null;
2012
+
2013
+ /**
2014
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
2015
+ * trait has no answer.
2016
+ */
2017
+ viralScore?: number | null;
2018
+
2019
+ /**
2020
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
2021
+ * sleep_on_it.
2022
+ */
2023
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
2024
+ }
2025
+
2026
+ export namespace Result {
2027
+ /**
2028
+ * The answers in full, with their probabilities.
2029
+ */
2030
+ export interface Analysis {
2031
+ /**
2032
+ * 1 answer per question, in question order.
2033
+ */
2034
+ answers: Array<Analysis.Answer>;
2035
+
2036
+ /**
2037
+ * What the AI read beside the post's text.
2038
+ */
2039
+ contextAvailability: Analysis.ContextAvailability;
2040
+
2041
+ /**
2042
+ * Bytes of post & settings the AI read.
2043
+ */
2044
+ contextBytes: number;
2045
+
2046
+ /**
2047
+ * The ID & version of each question asked.
2048
+ */
2049
+ questions: Array<Analysis.Question>;
2050
+
2051
+ status: 'succeeded';
2052
+ }
2053
+
2054
+ export namespace Analysis {
2055
+ /**
2056
+ * 1 question's answer. A probability has probability. A choice or score has value,
2057
+ * confidence & the probability of each category or level.
2058
+ */
2059
+ export interface Answer {
2060
+ questionId: string;
2061
+
2062
+ questionVersion: string;
2063
+
2064
+ type: 'choice' | 'score' | 'probability';
2065
+
2066
+ confidence?: number;
2067
+
2068
+ /**
2069
+ * For a score. The levels the question named, from 0.
2070
+ */
2071
+ levels?: Array<string>;
2072
+
2073
+ /**
2074
+ * Probability of each category, or of each level by index.
2075
+ */
2076
+ probabilities?: { [key: string]: number };
2077
+
2078
+ /**
2079
+ * For a probability. The chance the answer is yes.
2080
+ */
2081
+ probability?: number;
2082
+
2083
+ /**
2084
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
2085
+ * between levels 1 & 2.
2086
+ */
2087
+ value?: string | number;
2088
+ }
2089
+
2090
+ /**
2091
+ * What the AI read beside the post's text.
2092
+ */
2093
+ export interface ContextAvailability {
2094
+ article: 'text_blocks' | 'summary' | 'not_supplied';
2095
+
2096
+ author: 'available' | 'missing';
2097
+
2098
+ media: 'text_descriptions_only' | 'not_supplied';
2099
+
2100
+ /**
2101
+ * truncated when the post was cut to fit.
2102
+ */
2103
+ postText: 'full' | 'truncated';
2104
+
2105
+ quote: 'available' | 'missing' | 'not_applicable';
2106
+
2107
+ reply: 'available' | 'missing' | 'not_applicable';
2108
+ }
2109
+
2110
+ export interface Question {
2111
+ id: string;
2112
+
2113
+ version: string;
2114
+ }
2115
+ }
2116
+
2117
+ /**
2118
+ * How the post's answers compare with its row in baseline, as the AI Actors
2119
+ * compare a run with an earlier dataset.
2120
+ */
2121
+ export interface Monitor {
2122
+ /**
2123
+ * Always null. The baseline is the rows you sent.
2124
+ */
2125
+ baselineDatasetId: null;
2126
+
2127
+ /**
2128
+ * IDs of the questions whose decision changed.
2129
+ */
2130
+ changedQuestionIds: Array<string>;
2131
+
2132
+ /**
2133
+ * Each changed decision, earlier & now.
2134
+ */
2135
+ changes: Array<Monitor.Change>;
2136
+
2137
+ /**
2138
+ * Hash of the questions, targets & context. Rows with another hash are
2139
+ * not_comparable.
2140
+ */
2141
+ configurationFingerprint: string;
2142
+
2143
+ /**
2144
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
2145
+ * when an answer clearly left its earlier decision. not_comparable when other
2146
+ * settings made the earlier row or it answers none of these questions.
2147
+ */
2148
+ status:
2149
+ 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
2150
+ }
2151
+
2152
+ export namespace Monitor {
2153
+ export interface Change {
2154
+ current: string;
2155
+
2156
+ previous: string;
2157
+
2158
+ questionId: string;
2159
+ }
2160
+ }
2161
+ }
2162
+
2163
+ /**
2164
+ * A post without an analysis. It costs nothing.
2165
+ */
2166
+ export interface Unanalyzed {
2167
+ /**
2168
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
2169
+ */
2170
+ id: string;
2171
+
2172
+ /**
2173
+ * post_unavailable when X returns no such post. missing_text for a post without
2174
+ * text. insufficient_credits when credits ran out. context_limit when the settings
2175
+ * leave the post no room. The other reasons mean the analysis failed. Send the
2176
+ * post again.
2177
+ */
2178
+ reason: string;
2179
+
2180
+ status: 'failed' | 'skipped';
2181
+ }
2182
+ }
2183
+
2184
+ /**
2185
+ * Analyzed posts, the posts without an analysis & the totals of the answers. Each
2186
+ * row in results costs 2 credits.
2187
+ */
2188
+ export interface AnalysisViralScoreResponse {
2189
+ /**
2190
+ * Totals of the answers across the analyzed posts.
2191
+ */
2192
+ analysisSummary: AnalysisViralScoreResponse.AnalysisSummary;
2193
+
2194
+ /**
2195
+ * Whether the search has more posts. Send next_cursor as cursor.
2196
+ */
2197
+ has_next_page: boolean;
2198
+
2199
+ /**
2200
+ * Cursor of the search's next page, else empty.
2201
+ */
2202
+ next_cursor: string;
2203
+
2204
+ /**
2205
+ * Each analyzed post with its answers.
2206
+ */
2207
+ results: Array<AnalysisViralScoreResponse.Result>;
2208
+
2209
+ /**
2210
+ * Each post without an analysis, by ID & reason. These cost nothing.
2211
+ */
2212
+ unanalyzed: Array<AnalysisViralScoreResponse.Unanalyzed>;
2213
+ }
2214
+
2215
+ export namespace AnalysisViralScoreResponse {
2216
+ /**
2217
+ * Totals of the answers across the analyzed posts.
2218
+ */
2219
+ export interface AnalysisSummary {
2220
+ /**
2221
+ * Posts & answers per cashtag, most posts first, up to 20. signal is present for
2222
+ * the market questions.
2223
+ */
2224
+ cashtags: Array<AnalysisSummary.Cashtag>;
2225
+
2226
+ /**
2227
+ * Likes, reposts, replies & quotes of the analyzed posts.
2228
+ */
2229
+ engagement: number;
2230
+
2231
+ /**
2232
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
2233
+ * when the answer holds no post.
2234
+ */
2235
+ monitor: AnalysisSummary.Monitor | null;
2236
+
2237
+ /**
2238
+ * Totals by question ID. A choice has counts, shares, engagementShares & top posts
2239
+ * per category. A score has mean, engagementWeightedMean & levels. A probability
2240
+ * has mean, yes & no.
2241
+ */
2242
+ questions: { [key: string]: { [key: string]: unknown } };
2243
+
2244
+ /**
2245
+ * Posts by analysis outcome.
2246
+ */
2247
+ rows: AnalysisSummary.Rows;
2248
+
2249
+ schemaVersion: number;
2250
+
2251
+ /**
2252
+ * Posts per linked hostname, most posts first, up to 20.
2253
+ */
2254
+ sourceDomains: Array<AnalysisSummary.SourceDomain>;
2255
+
2256
+ /**
2257
+ * Mentions & answers per target in analysis.targets.
2258
+ */
2259
+ targets: Array<AnalysisSummary.Target>;
2260
+
2261
+ /**
2262
+ * Only from /x/analysis/viral-score. Scored posts, the average score, verdict
2263
+ * counts, the scores against actual engagement, a report per author & the
2264
+ * leaderboards.
2265
+ */
2266
+ viral?: { [key: string]: unknown };
2267
+ }
2268
+
2269
+ export namespace AnalysisSummary {
2270
+ export interface Cashtag {
2271
+ cashtag: string;
2272
+
2273
+ /**
2274
+ * Category counts of the cashtag's posts by question ID.
2275
+ */
2276
+ choices: { [key: string]: unknown };
2277
+
2278
+ rows: number;
2279
+
2280
+ signal?: Cashtag.Signal;
2281
+ }
2282
+
2283
+ export namespace Cashtag {
2284
+ export interface Signal {
2285
+ bearish: number;
2286
+
2287
+ bullish: number;
2288
+
2289
+ /**
2290
+ * Bullish minus bearish posts, over all posts.
2291
+ */
2292
+ score: number;
2293
+ }
2294
+ }
2295
+
2296
+ /**
2297
+ * Posts per comparison status, & up to 50 changed posts with their changes. Null
2298
+ * when the answer holds no post.
2299
+ */
2300
+ export interface Monitor {
2301
+ changedRows: Array<Monitor.ChangedRow>;
2302
+
2303
+ /**
2304
+ * Posts per monitor status.
2305
+ */
2306
+ statuses: { [key: string]: number };
2307
+ }
2308
+
2309
+ export namespace Monitor {
2310
+ export interface ChangedRow {
2311
+ changes: Array<ChangedRow.Change>;
2312
+
2313
+ tweetId: string;
2314
+ }
2315
+
2316
+ export namespace ChangedRow {
2317
+ export interface Change {
2318
+ current: string;
2319
+
2320
+ previous: string;
2321
+
2322
+ questionId: string;
2323
+ }
2324
+ }
2325
+ }
2326
+
2327
+ /**
2328
+ * Posts by analysis outcome.
2329
+ */
2330
+ export interface Rows {
2331
+ analyzed: number;
2332
+
2333
+ failed: number;
2334
+
2335
+ skipped: number;
2336
+ }
2337
+
2338
+ export interface SourceDomain {
2339
+ domain: string;
2340
+
2341
+ posts: number;
2342
+ }
2343
+
2344
+ export interface Target {
2345
+ /**
2346
+ * Category counts by question ID.
2347
+ */
2348
+ choices: { [key: string]: unknown };
2349
+
2350
+ engagement: number;
2351
+
2352
+ mentions: number;
2353
+
2354
+ name: string;
2355
+
2356
+ share: number;
2357
+
2358
+ /**
2359
+ * The most engaged posts per question ID & category.
2360
+ */
2361
+ top: { [key: string]: unknown };
2362
+ }
2363
+ }
2364
+
2365
+ /**
2366
+ * 1 analyzed post with its answers.
2367
+ */
2368
+ export interface Result {
2369
+ /**
2370
+ * The answers in full, with their probabilities.
2371
+ */
2372
+ analysis: Result.Analysis;
2373
+
2374
+ /**
2375
+ * Each question's decision by question ID. A choice gives its category, a score
2376
+ * its level from 0, which can have decimals, & a probability its value from 0 to
2377
+ * 1.
2378
+ */
2379
+ answers: { [key: string]: string | number };
2380
+
2381
+ /**
2382
+ * Cashtags in the post's text, in upper case.
2383
+ */
2384
+ cashtags: Array<string>;
2385
+
2386
+ /**
2387
+ * How the post's answers compare with its row in baseline, as the AI Actors
2388
+ * compare a run with an earlier dataset.
2389
+ */
2390
+ monitor: Result.Monitor;
2391
+
2392
+ /**
2393
+ * Hostnames the post links to, without t.co.
2394
+ */
2395
+ sourceDomains: Array<string>;
2396
+
2397
+ /**
2398
+ * The post, as /x/tweets/search returns it. Your own texts have the IDs text:1,
2399
+ * text:2 & so on.
2400
+ */
2401
+ tweet: Shared.SearchTweet;
2402
+
2403
+ /**
2404
+ * Only from /x/analysis/viral-score. The score with its weights version, the caps
2405
+ * that applied & the engagement comparison.
2406
+ */
2407
+ viral?: { [key: string]: unknown };
2408
+
2409
+ /**
2410
+ * Only from /x/analysis/viral-score. log10 of 1 plus the weighted engagement per
2411
+ * 1,000 followers. Null without a follower count.
2412
+ */
2413
+ viralActualEngagementRate?: number | null;
2414
+
2415
+ /**
2416
+ * Only from /x/analysis/viral-score. The post's public counts under X's published
2417
+ * ranking weights, per 1,000 views or followers.
2418
+ */
2419
+ viralAlgorithmScore?: number | null;
2420
+
2421
+ /**
2422
+ * Only from /x/analysis/viral-score. How viral the wording reads, or null when a
2423
+ * trait has no answer.
2424
+ */
2425
+ viralScore?: number | null;
2426
+
2427
+ /**
2428
+ * Only from /x/analysis/viral-score. send_it from 70, edit_first from 40, else
2429
+ * sleep_on_it.
2430
+ */
2431
+ viralVerdict?: 'send_it' | 'edit_first' | 'sleep_on_it' | null;
2432
+ }
2433
+
2434
+ export namespace Result {
2435
+ /**
2436
+ * The answers in full, with their probabilities.
2437
+ */
2438
+ export interface Analysis {
2439
+ /**
2440
+ * 1 answer per question, in question order.
2441
+ */
2442
+ answers: Array<Analysis.Answer>;
2443
+
2444
+ /**
2445
+ * What the AI read beside the post's text.
2446
+ */
2447
+ contextAvailability: Analysis.ContextAvailability;
2448
+
2449
+ /**
2450
+ * Bytes of post & settings the AI read.
2451
+ */
2452
+ contextBytes: number;
2453
+
2454
+ /**
2455
+ * The ID & version of each question asked.
2456
+ */
2457
+ questions: Array<Analysis.Question>;
2458
+
2459
+ status: 'succeeded';
2460
+ }
2461
+
2462
+ export namespace Analysis {
2463
+ /**
2464
+ * 1 question's answer. A probability has probability. A choice or score has value,
2465
+ * confidence & the probability of each category or level.
2466
+ */
2467
+ export interface Answer {
2468
+ questionId: string;
2469
+
2470
+ questionVersion: string;
2471
+
2472
+ type: 'choice' | 'score' | 'probability';
2473
+
2474
+ confidence?: number;
2475
+
2476
+ /**
2477
+ * For a score. The levels the question named, from 0.
2478
+ */
2479
+ levels?: Array<string>;
2480
+
2481
+ /**
2482
+ * Probability of each category, or of each level by index.
2483
+ */
2484
+ probabilities?: { [key: string]: number };
2485
+
2486
+ /**
2487
+ * For a probability. The chance the answer is yes.
2488
+ */
2489
+ probability?: number;
2490
+
2491
+ /**
2492
+ * The chosen category, or the level from 0, which can have decimals, such as 1.4
2493
+ * between levels 1 & 2.
2494
+ */
2495
+ value?: string | number;
2496
+ }
2497
+
2498
+ /**
2499
+ * What the AI read beside the post's text.
2500
+ */
2501
+ export interface ContextAvailability {
2502
+ article: 'text_blocks' | 'summary' | 'not_supplied';
2503
+
2504
+ author: 'available' | 'missing';
2505
+
2506
+ media: 'text_descriptions_only' | 'not_supplied';
2507
+
2508
+ /**
2509
+ * truncated when the post was cut to fit.
2510
+ */
2511
+ postText: 'full' | 'truncated';
2512
+
2513
+ quote: 'available' | 'missing' | 'not_applicable';
2514
+
2515
+ reply: 'available' | 'missing' | 'not_applicable';
2516
+ }
2517
+
2518
+ export interface Question {
2519
+ id: string;
2520
+
2521
+ version: string;
2522
+ }
2523
+ }
2524
+
2525
+ /**
2526
+ * How the post's answers compare with its row in baseline, as the AI Actors
2527
+ * compare a run with an earlier dataset.
2528
+ */
2529
+ export interface Monitor {
2530
+ /**
2531
+ * Always null. The baseline is the rows you sent.
2532
+ */
2533
+ baselineDatasetId: null;
2534
+
2535
+ /**
2536
+ * IDs of the questions whose decision changed.
2537
+ */
2538
+ changedQuestionIds: Array<string>;
2539
+
2540
+ /**
2541
+ * Each changed decision, earlier & now.
2542
+ */
2543
+ changes: Array<Monitor.Change>;
2544
+
2545
+ /**
2546
+ * Hash of the questions, targets & context. Rows with another hash are
2547
+ * not_comparable.
2548
+ */
2549
+ configurationFingerprint: string;
2550
+
2551
+ /**
2552
+ * first_run without baseline. new_to_baseline for a post baseline lacks. changed
2553
+ * when an answer clearly left its earlier decision. not_comparable when other
2554
+ * settings made the earlier row or it answers none of these questions.
2555
+ */
2556
+ status:
2557
+ 'first_run' | 'new_to_baseline' | 'unchanged' | 'changed' | 'not_comparable' | 'analysis_unavailable';
2558
+ }
2559
+
2560
+ export namespace Monitor {
2561
+ export interface Change {
2562
+ current: string;
2563
+
2564
+ previous: string;
2565
+
2566
+ questionId: string;
2567
+ }
2568
+ }
2569
+ }
2570
+
2571
+ /**
2572
+ * A post without an analysis. It costs nothing.
2573
+ */
2574
+ export interface Unanalyzed {
2575
+ /**
2576
+ * Post ID. Your own texts have the IDs text:1, text:2 & so on.
2577
+ */
2578
+ id: string;
2579
+
2580
+ /**
2581
+ * post_unavailable when X returns no such post. missing_text for a post without
2582
+ * text. insufficient_credits when credits ran out. context_limit when the settings
2583
+ * leave the post no room. The other reasons mean the analysis failed. Send the
2584
+ * post again.
2585
+ */
2586
+ reason: string;
2587
+
2588
+ status: 'failed' | 'skipped';
2589
+ }
2590
+ }
2591
+
2592
+ export interface AnalysisBrandParams {
2593
+ /**
2594
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2595
+ * out for the route's own questions.
2596
+ */
2597
+ analysis?: AnalysisBrandParams.Analysis;
2598
+
2599
+ /**
2600
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2601
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2602
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2603
+ * or unchanged. The comparison costs nothing extra.
2604
+ */
2605
+ baseline?: Array<AnalysisBrandParams.Baseline>;
2606
+
2607
+ /**
2608
+ * The next_cursor of the page before. Send the same search with it.
2609
+ */
2610
+ cursor?: string;
2611
+
2612
+ /**
2613
+ * Maximum posts to analyze from the search. Credits can return fewer.
2614
+ */
2615
+ limit?: number;
2616
+
2617
+ /**
2618
+ * Analyze a public List's posts. Send its ID or URL.
2619
+ */
2620
+ listId?: string;
2621
+
2622
+ /**
2623
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2624
+ * or lang:en. X searches up to 512 characters, counted with the other search
2625
+ * fields, as /x/tweets/search counts q.
2626
+ */
2627
+ query?: string;
2628
+
2629
+ /**
2630
+ * Search order. Default Latest.
2631
+ */
2632
+ queryType?: 'Latest' | 'Top';
2633
+
2634
+ /**
2635
+ * Analyze the quotes of 1 post. Send its ID or URL.
2636
+ */
2637
+ quotesOf?: string;
2638
+
2639
+ /**
2640
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2641
+ */
2642
+ repliesTo?: string;
2643
+
2644
+ /**
2645
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2646
+ * work. A time without an offset is UTC.
2647
+ */
2648
+ sinceTime?: string | number;
2649
+
2650
+ /**
2651
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2652
+ * the same as 1 analyzed post.
2653
+ */
2654
+ texts?: Array<string>;
2655
+
2656
+ /**
2657
+ * Post IDs or post URLs to analyze, up to 100.
2658
+ */
2659
+ tweetIds?: Array<string>;
2660
+
2661
+ /**
2662
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2663
+ * work. A time without an offset is UTC.
2664
+ */
2665
+ untilTime?: string | number;
2666
+
2667
+ /**
2668
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2669
+ */
2670
+ username?: string;
2671
+ }
2672
+
2673
+ export namespace AnalysisBrandParams {
2674
+ /**
2675
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2676
+ * out for the route's own questions.
2677
+ */
2678
+ export interface Analysis {
2679
+ /**
2680
+ * Posts analyzed at the same time.
2681
+ */
2682
+ concurrency?: number;
2683
+
2684
+ /**
2685
+ * Background the AI reads with every post.
2686
+ */
2687
+ context?: string;
2688
+
2689
+ /**
2690
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2691
+ * settings take 219 bytes, so a smaller value gets a 400.
2692
+ */
2693
+ maxContextBytes?: number;
2694
+
2695
+ /**
2696
+ * A ready set of questions, used when questions is left out. complaints,
2697
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2698
+ * how viral the wording reads.
2699
+ */
2700
+ preset?:
2701
+ | 'brand'
2702
+ | 'complaints'
2703
+ | 'competitors'
2704
+ | 'purchase_intent'
2705
+ | 'product_feedback'
2706
+ | 'news'
2707
+ | 'sentiment'
2708
+ | 'market'
2709
+ | 'viral_lite';
2710
+
2711
+ /**
2712
+ * Your own questions, which replace the route's questions. Write question IDs &
2713
+ * category names in lower case without hyphens.
2714
+ */
2715
+ questions?: Array<Analysis.Question>;
2716
+
2717
+ /**
2718
+ * Brands, people, assets or topics the questions are about, each with its aliases.
2719
+ */
2720
+ targets?: Array<Analysis.Target>;
2721
+ }
2722
+
2723
+ export namespace Analysis {
2724
+ /**
2725
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
2726
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
2727
+ * yes or no.
2728
+ */
2729
+ export interface Question {
2730
+ /**
2731
+ * Name of the answer, such as request. A name the response renames or drops gets a
2732
+ * 400, such as created_at, favorite_count, muting or blocking.
2733
+ */
2734
+ id: string;
2735
+
2736
+ /**
2737
+ * The question, as the AI reads it.
2738
+ */
2739
+ instructions: string;
2740
+
2741
+ type: 'choice' | 'score' | 'probability';
2742
+
2743
+ /**
2744
+ * Your version of the question, such as 1.
2745
+ */
2746
+ version: string;
2747
+
2748
+ /**
2749
+ * For a choice. Each category name with its description, or null.
2750
+ */
2751
+ categories?: { [key: string]: string | null };
2752
+
2753
+ /**
2754
+ * For a probability. What counts as yes & as no.
2755
+ */
2756
+ criteria?: Question.Criteria;
2757
+
2758
+ /**
2759
+ * For a score. Each level's description, lowest first.
2760
+ */
2761
+ levels?: Array<string>;
2762
+ }
2763
+
2764
+ export namespace Question {
2765
+ /**
2766
+ * For a probability. What counts as yes & as no.
2767
+ */
2768
+ export interface Criteria {
2769
+ no: string;
2770
+
2771
+ yes: string;
2772
+ }
2773
+ }
2774
+
2775
+ export interface Target {
2776
+ name: string;
2777
+
2778
+ aliases?: Array<string>;
2779
+ }
2780
+ }
2781
+
2782
+ export interface Baseline {
2783
+ /**
2784
+ * The earlier answers by question ID.
2785
+ */
2786
+ answers: { [key: string]: string | number };
2787
+
2788
+ /**
2789
+ * Post ID, or text:1 & so on. Else tweet.id counts.
2790
+ */
2791
+ id?: string;
2792
+
2793
+ /**
2794
+ * The earlier row's monitor, with its fingerprint.
2795
+ */
2796
+ monitor?: Baseline.Monitor;
2797
+
2798
+ tweet?: Baseline.Tweet;
2799
+ }
2800
+
2801
+ export namespace Baseline {
2802
+ /**
2803
+ * The earlier row's monitor, with its fingerprint.
2804
+ */
2805
+ export interface Monitor {
2806
+ configurationFingerprint?: string;
2807
+ }
2808
+
2809
+ export interface Tweet {
2810
+ id: string;
2811
+ }
2812
+ }
2813
+ }
2814
+
2815
+ export interface AnalysisClassifyParams {
2816
+ /**
2817
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2818
+ * out for the route's own questions.
2819
+ */
2820
+ analysis?: AnalysisClassifyParams.Analysis;
2821
+
2822
+ /**
2823
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
2824
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
2825
+ * as not_comparable. Each result's monitor says whether the post is new, changed
2826
+ * or unchanged. The comparison costs nothing extra.
2827
+ */
2828
+ baseline?: Array<AnalysisClassifyParams.Baseline>;
2829
+
2830
+ /**
2831
+ * The next_cursor of the page before. Send the same search with it.
2832
+ */
2833
+ cursor?: string;
2834
+
2835
+ /**
2836
+ * Maximum posts to analyze from the search. Credits can return fewer.
2837
+ */
2838
+ limit?: number;
2839
+
2840
+ /**
2841
+ * Analyze a public List's posts. Send its ID or URL.
2842
+ */
2843
+ listId?: string;
2844
+
2845
+ /**
2846
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
2847
+ * or lang:en. X searches up to 512 characters, counted with the other search
2848
+ * fields, as /x/tweets/search counts q.
2849
+ */
2850
+ query?: string;
2851
+
2852
+ /**
2853
+ * Search order. Default Latest.
2854
+ */
2855
+ queryType?: 'Latest' | 'Top';
2856
+
2857
+ /**
2858
+ * Analyze the quotes of 1 post. Send its ID or URL.
2859
+ */
2860
+ quotesOf?: string;
2861
+
2862
+ /**
2863
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
2864
+ */
2865
+ repliesTo?: string;
2866
+
2867
+ /**
2868
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
2869
+ * work. A time without an offset is UTC.
2870
+ */
2871
+ sinceTime?: string | number;
2872
+
2873
+ /**
2874
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
2875
+ * the same as 1 analyzed post.
2876
+ */
2877
+ texts?: Array<string>;
2878
+
2879
+ /**
2880
+ * Post IDs or post URLs to analyze, up to 100.
2881
+ */
2882
+ tweetIds?: Array<string>;
2883
+
2884
+ /**
2885
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
2886
+ * work. A time without an offset is UTC.
2887
+ */
2888
+ untilTime?: string | number;
2889
+
2890
+ /**
2891
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
2892
+ */
2893
+ username?: string;
2894
+ }
2895
+
2896
+ export namespace AnalysisClassifyParams {
2897
+ /**
2898
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
2899
+ * out for the route's own questions.
2900
+ */
2901
+ export interface Analysis {
2902
+ /**
2903
+ * Posts analyzed at the same time.
2904
+ */
2905
+ concurrency?: number;
2906
+
2907
+ /**
2908
+ * Background the AI reads with every post.
2909
+ */
2910
+ context?: string;
2911
+
2912
+ /**
2913
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
2914
+ * settings take 219 bytes, so a smaller value gets a 400.
2915
+ */
2916
+ maxContextBytes?: number;
2917
+
2918
+ /**
2919
+ * A ready set of questions, used when questions is left out. complaints,
2920
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
2921
+ * how viral the wording reads.
2922
+ */
2923
+ preset?:
2924
+ | 'brand'
2925
+ | 'complaints'
2926
+ | 'competitors'
2927
+ | 'purchase_intent'
2928
+ | 'product_feedback'
2929
+ | 'news'
2930
+ | 'sentiment'
2931
+ | 'market'
2932
+ | 'viral_lite';
2933
+
2934
+ /**
2935
+ * Your own questions, which replace the route's questions. Write question IDs &
2936
+ * category names in lower case without hyphens.
2937
+ */
2938
+ questions?: Array<Analysis.Question>;
2939
+
2940
+ /**
2941
+ * Brands, people, assets or topics the questions are about, each with its aliases.
2942
+ */
2943
+ targets?: Array<Analysis.Target>;
2944
+ }
2945
+
2946
+ export namespace Analysis {
2947
+ /**
2948
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
2949
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
2950
+ * yes or no.
2951
+ */
2952
+ export interface Question {
2953
+ /**
2954
+ * Name of the answer, such as request. A name the response renames or drops gets a
2955
+ * 400, such as created_at, favorite_count, muting or blocking.
2956
+ */
2957
+ id: string;
2958
+
2959
+ /**
2960
+ * The question, as the AI reads it.
2961
+ */
2962
+ instructions: string;
2963
+
2964
+ type: 'choice' | 'score' | 'probability';
2965
+
2966
+ /**
2967
+ * Your version of the question, such as 1.
2968
+ */
2969
+ version: string;
2970
+
2971
+ /**
2972
+ * For a choice. Each category name with its description, or null.
2973
+ */
2974
+ categories?: { [key: string]: string | null };
2975
+
2976
+ /**
2977
+ * For a probability. What counts as yes & as no.
2978
+ */
2979
+ criteria?: Question.Criteria;
2980
+
2981
+ /**
2982
+ * For a score. Each level's description, lowest first.
2983
+ */
2984
+ levels?: Array<string>;
2985
+ }
2986
+
2987
+ export namespace Question {
2988
+ /**
2989
+ * For a probability. What counts as yes & as no.
2990
+ */
2991
+ export interface Criteria {
2992
+ no: string;
2993
+
2994
+ yes: string;
2995
+ }
2996
+ }
2997
+
2998
+ export interface Target {
2999
+ name: string;
3000
+
3001
+ aliases?: Array<string>;
3002
+ }
3003
+ }
3004
+
3005
+ export interface Baseline {
3006
+ /**
3007
+ * The earlier answers by question ID.
3008
+ */
3009
+ answers: { [key: string]: string | number };
3010
+
3011
+ /**
3012
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3013
+ */
3014
+ id?: string;
3015
+
3016
+ /**
3017
+ * The earlier row's monitor, with its fingerprint.
3018
+ */
3019
+ monitor?: Baseline.Monitor;
3020
+
3021
+ tweet?: Baseline.Tweet;
3022
+ }
3023
+
3024
+ export namespace Baseline {
3025
+ /**
3026
+ * The earlier row's monitor, with its fingerprint.
3027
+ */
3028
+ export interface Monitor {
3029
+ configurationFingerprint?: string;
3030
+ }
3031
+
3032
+ export interface Tweet {
3033
+ id: string;
3034
+ }
3035
+ }
3036
+ }
3037
+
3038
+ export interface AnalysisMarketSignalsParams {
3039
+ /**
3040
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3041
+ * out for the route's own questions.
3042
+ */
3043
+ analysis?: AnalysisMarketSignalsParams.Analysis;
3044
+
3045
+ /**
3046
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
3047
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
3048
+ * as not_comparable. Each result's monitor says whether the post is new, changed
3049
+ * or unchanged. The comparison costs nothing extra.
3050
+ */
3051
+ baseline?: Array<AnalysisMarketSignalsParams.Baseline>;
3052
+
3053
+ /**
3054
+ * The next_cursor of the page before. Send the same search with it.
3055
+ */
3056
+ cursor?: string;
3057
+
3058
+ /**
3059
+ * Maximum posts to analyze from the search. Credits can return fewer.
3060
+ */
3061
+ limit?: number;
3062
+
3063
+ /**
3064
+ * Analyze a public List's posts. Send its ID or URL.
3065
+ */
3066
+ listId?: string;
3067
+
3068
+ /**
3069
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
3070
+ * or lang:en. X searches up to 512 characters, counted with the other search
3071
+ * fields, as /x/tweets/search counts q.
3072
+ */
3073
+ query?: string;
3074
+
3075
+ /**
3076
+ * Search order. Default Latest.
3077
+ */
3078
+ queryType?: 'Latest' | 'Top';
3079
+
3080
+ /**
3081
+ * Analyze the quotes of 1 post. Send its ID or URL.
3082
+ */
3083
+ quotesOf?: string;
3084
+
3085
+ /**
3086
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
3087
+ */
3088
+ repliesTo?: string;
3089
+
3090
+ /**
3091
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
3092
+ * work. A time without an offset is UTC.
3093
+ */
3094
+ sinceTime?: string | number;
3095
+
3096
+ /**
3097
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
3098
+ * the same as 1 analyzed post.
3099
+ */
3100
+ texts?: Array<string>;
3101
+
3102
+ /**
3103
+ * Post IDs or post URLs to analyze, up to 100.
3104
+ */
3105
+ tweetIds?: Array<string>;
3106
+
3107
+ /**
3108
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
3109
+ * work. A time without an offset is UTC.
3110
+ */
3111
+ untilTime?: string | number;
3112
+
3113
+ /**
3114
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
3115
+ */
3116
+ username?: string;
3117
+ }
3118
+
3119
+ export namespace AnalysisMarketSignalsParams {
3120
+ /**
3121
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3122
+ * out for the route's own questions.
3123
+ */
3124
+ export interface Analysis {
3125
+ /**
3126
+ * Posts analyzed at the same time.
3127
+ */
3128
+ concurrency?: number;
3129
+
3130
+ /**
3131
+ * Background the AI reads with every post.
3132
+ */
3133
+ context?: string;
3134
+
3135
+ /**
3136
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
3137
+ * settings take 219 bytes, so a smaller value gets a 400.
3138
+ */
3139
+ maxContextBytes?: number;
3140
+
3141
+ /**
3142
+ * A ready set of questions, used when questions is left out. complaints,
3143
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
3144
+ * how viral the wording reads.
3145
+ */
3146
+ preset?:
3147
+ | 'brand'
3148
+ | 'complaints'
3149
+ | 'competitors'
3150
+ | 'purchase_intent'
3151
+ | 'product_feedback'
3152
+ | 'news'
3153
+ | 'sentiment'
3154
+ | 'market'
3155
+ | 'viral_lite';
3156
+
3157
+ /**
3158
+ * Your own questions, which replace the route's questions. Write question IDs &
3159
+ * category names in lower case without hyphens.
3160
+ */
3161
+ questions?: Array<Analysis.Question>;
3162
+
3163
+ /**
3164
+ * Brands, people, assets or topics the questions are about, each with its aliases.
3165
+ */
3166
+ targets?: Array<Analysis.Target>;
3167
+ }
3168
+
3169
+ export namespace Analysis {
3170
+ /**
3171
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
3172
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
3173
+ * yes or no.
3174
+ */
3175
+ export interface Question {
3176
+ /**
3177
+ * Name of the answer, such as request. A name the response renames or drops gets a
3178
+ * 400, such as created_at, favorite_count, muting or blocking.
3179
+ */
3180
+ id: string;
3181
+
3182
+ /**
3183
+ * The question, as the AI reads it.
3184
+ */
3185
+ instructions: string;
3186
+
3187
+ type: 'choice' | 'score' | 'probability';
3188
+
3189
+ /**
3190
+ * Your version of the question, such as 1.
3191
+ */
3192
+ version: string;
3193
+
3194
+ /**
3195
+ * For a choice. Each category name with its description, or null.
3196
+ */
3197
+ categories?: { [key: string]: string | null };
3198
+
3199
+ /**
3200
+ * For a probability. What counts as yes & as no.
3201
+ */
3202
+ criteria?: Question.Criteria;
3203
+
3204
+ /**
3205
+ * For a score. Each level's description, lowest first.
3206
+ */
3207
+ levels?: Array<string>;
3208
+ }
3209
+
3210
+ export namespace Question {
3211
+ /**
3212
+ * For a probability. What counts as yes & as no.
3213
+ */
3214
+ export interface Criteria {
3215
+ no: string;
3216
+
3217
+ yes: string;
3218
+ }
3219
+ }
3220
+
3221
+ export interface Target {
3222
+ name: string;
3223
+
3224
+ aliases?: Array<string>;
3225
+ }
3226
+ }
3227
+
3228
+ export interface Baseline {
3229
+ /**
3230
+ * The earlier answers by question ID.
3231
+ */
3232
+ answers: { [key: string]: string | number };
3233
+
3234
+ /**
3235
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3236
+ */
3237
+ id?: string;
3238
+
3239
+ /**
3240
+ * The earlier row's monitor, with its fingerprint.
3241
+ */
3242
+ monitor?: Baseline.Monitor;
3243
+
3244
+ tweet?: Baseline.Tweet;
3245
+ }
3246
+
3247
+ export namespace Baseline {
3248
+ /**
3249
+ * The earlier row's monitor, with its fingerprint.
3250
+ */
3251
+ export interface Monitor {
3252
+ configurationFingerprint?: string;
3253
+ }
3254
+
3255
+ export interface Tweet {
3256
+ id: string;
3257
+ }
3258
+ }
3259
+ }
3260
+
3261
+ export interface AnalysisNewsParams {
3262
+ /**
3263
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3264
+ * out for the route's own questions.
3265
+ */
3266
+ analysis?: AnalysisNewsParams.Analysis;
3267
+
3268
+ /**
3269
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
3270
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
3271
+ * as not_comparable. Each result's monitor says whether the post is new, changed
3272
+ * or unchanged. The comparison costs nothing extra.
3273
+ */
3274
+ baseline?: Array<AnalysisNewsParams.Baseline>;
3275
+
3276
+ /**
3277
+ * The next_cursor of the page before. Send the same search with it.
3278
+ */
3279
+ cursor?: string;
3280
+
3281
+ /**
3282
+ * Maximum posts to analyze from the search. Credits can return fewer.
3283
+ */
3284
+ limit?: number;
3285
+
3286
+ /**
3287
+ * Analyze a public List's posts. Send its ID or URL.
3288
+ */
3289
+ listId?: string;
3290
+
3291
+ /**
3292
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
3293
+ * or lang:en. X searches up to 512 characters, counted with the other search
3294
+ * fields, as /x/tweets/search counts q.
3295
+ */
3296
+ query?: string;
3297
+
3298
+ /**
3299
+ * Search order. Default Latest.
3300
+ */
3301
+ queryType?: 'Latest' | 'Top';
3302
+
3303
+ /**
3304
+ * Analyze the quotes of 1 post. Send its ID or URL.
3305
+ */
3306
+ quotesOf?: string;
3307
+
3308
+ /**
3309
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
3310
+ */
3311
+ repliesTo?: string;
3312
+
3313
+ /**
3314
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
3315
+ * work. A time without an offset is UTC.
3316
+ */
3317
+ sinceTime?: string | number;
3318
+
3319
+ /**
3320
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
3321
+ * the same as 1 analyzed post.
3322
+ */
3323
+ texts?: Array<string>;
3324
+
3325
+ /**
3326
+ * Post IDs or post URLs to analyze, up to 100.
3327
+ */
3328
+ tweetIds?: Array<string>;
3329
+
3330
+ /**
3331
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
3332
+ * work. A time without an offset is UTC.
3333
+ */
3334
+ untilTime?: string | number;
3335
+
3336
+ /**
3337
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
3338
+ */
3339
+ username?: string;
3340
+ }
3341
+
3342
+ export namespace AnalysisNewsParams {
3343
+ /**
3344
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3345
+ * out for the route's own questions.
3346
+ */
3347
+ export interface Analysis {
3348
+ /**
3349
+ * Posts analyzed at the same time.
3350
+ */
3351
+ concurrency?: number;
3352
+
3353
+ /**
3354
+ * Background the AI reads with every post.
3355
+ */
3356
+ context?: string;
3357
+
3358
+ /**
3359
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
3360
+ * settings take 219 bytes, so a smaller value gets a 400.
3361
+ */
3362
+ maxContextBytes?: number;
3363
+
3364
+ /**
3365
+ * A ready set of questions, used when questions is left out. complaints,
3366
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
3367
+ * how viral the wording reads.
3368
+ */
3369
+ preset?:
3370
+ | 'brand'
3371
+ | 'complaints'
3372
+ | 'competitors'
3373
+ | 'purchase_intent'
3374
+ | 'product_feedback'
3375
+ | 'news'
3376
+ | 'sentiment'
3377
+ | 'market'
3378
+ | 'viral_lite';
3379
+
3380
+ /**
3381
+ * Your own questions, which replace the route's questions. Write question IDs &
3382
+ * category names in lower case without hyphens.
3383
+ */
3384
+ questions?: Array<Analysis.Question>;
3385
+
3386
+ /**
3387
+ * Brands, people, assets or topics the questions are about, each with its aliases.
3388
+ */
3389
+ targets?: Array<Analysis.Target>;
3390
+ }
3391
+
3392
+ export namespace Analysis {
3393
+ /**
3394
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
3395
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
3396
+ * yes or no.
3397
+ */
3398
+ export interface Question {
3399
+ /**
3400
+ * Name of the answer, such as request. A name the response renames or drops gets a
3401
+ * 400, such as created_at, favorite_count, muting or blocking.
3402
+ */
3403
+ id: string;
3404
+
3405
+ /**
3406
+ * The question, as the AI reads it.
3407
+ */
3408
+ instructions: string;
3409
+
3410
+ type: 'choice' | 'score' | 'probability';
3411
+
3412
+ /**
3413
+ * Your version of the question, such as 1.
3414
+ */
3415
+ version: string;
3416
+
3417
+ /**
3418
+ * For a choice. Each category name with its description, or null.
3419
+ */
3420
+ categories?: { [key: string]: string | null };
3421
+
3422
+ /**
3423
+ * For a probability. What counts as yes & as no.
3424
+ */
3425
+ criteria?: Question.Criteria;
3426
+
3427
+ /**
3428
+ * For a score. Each level's description, lowest first.
3429
+ */
3430
+ levels?: Array<string>;
3431
+ }
3432
+
3433
+ export namespace Question {
3434
+ /**
3435
+ * For a probability. What counts as yes & as no.
3436
+ */
3437
+ export interface Criteria {
3438
+ no: string;
3439
+
3440
+ yes: string;
3441
+ }
3442
+ }
3443
+
3444
+ export interface Target {
3445
+ name: string;
3446
+
3447
+ aliases?: Array<string>;
3448
+ }
3449
+ }
3450
+
3451
+ export interface Baseline {
3452
+ /**
3453
+ * The earlier answers by question ID.
3454
+ */
3455
+ answers: { [key: string]: string | number };
3456
+
3457
+ /**
3458
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3459
+ */
3460
+ id?: string;
3461
+
3462
+ /**
3463
+ * The earlier row's monitor, with its fingerprint.
3464
+ */
3465
+ monitor?: Baseline.Monitor;
3466
+
3467
+ tweet?: Baseline.Tweet;
3468
+ }
3469
+
3470
+ export namespace Baseline {
3471
+ /**
3472
+ * The earlier row's monitor, with its fingerprint.
3473
+ */
3474
+ export interface Monitor {
3475
+ configurationFingerprint?: string;
3476
+ }
3477
+
3478
+ export interface Tweet {
3479
+ id: string;
3480
+ }
3481
+ }
3482
+ }
3483
+
3484
+ export interface AnalysisSentimentParams {
3485
+ /**
3486
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3487
+ * out for the route's own questions.
3488
+ */
3489
+ analysis?: AnalysisSentimentParams.Analysis;
3490
+
3491
+ /**
3492
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
3493
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
3494
+ * as not_comparable. Each result's monitor says whether the post is new, changed
3495
+ * or unchanged. The comparison costs nothing extra.
3496
+ */
3497
+ baseline?: Array<AnalysisSentimentParams.Baseline>;
3498
+
3499
+ /**
3500
+ * The next_cursor of the page before. Send the same search with it.
3501
+ */
3502
+ cursor?: string;
3503
+
3504
+ /**
3505
+ * Maximum posts to analyze from the search. Credits can return fewer.
3506
+ */
3507
+ limit?: number;
3508
+
3509
+ /**
3510
+ * Analyze a public List's posts. Send its ID or URL.
3511
+ */
3512
+ listId?: string;
3513
+
3514
+ /**
3515
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
3516
+ * or lang:en. X searches up to 512 characters, counted with the other search
3517
+ * fields, as /x/tweets/search counts q.
3518
+ */
3519
+ query?: string;
3520
+
3521
+ /**
3522
+ * Search order. Default Latest.
3523
+ */
3524
+ queryType?: 'Latest' | 'Top';
3525
+
3526
+ /**
3527
+ * Analyze the quotes of 1 post. Send its ID or URL.
3528
+ */
3529
+ quotesOf?: string;
3530
+
3531
+ /**
3532
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
3533
+ */
3534
+ repliesTo?: string;
3535
+
3536
+ /**
3537
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
3538
+ * work. A time without an offset is UTC.
3539
+ */
3540
+ sinceTime?: string | number;
3541
+
3542
+ /**
3543
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
3544
+ * the same as 1 analyzed post.
3545
+ */
3546
+ texts?: Array<string>;
3547
+
3548
+ /**
3549
+ * Post IDs or post URLs to analyze, up to 100.
3550
+ */
3551
+ tweetIds?: Array<string>;
3552
+
3553
+ /**
3554
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
3555
+ * work. A time without an offset is UTC.
3556
+ */
3557
+ untilTime?: string | number;
3558
+
3559
+ /**
3560
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
3561
+ */
3562
+ username?: string;
3563
+ }
3564
+
3565
+ export namespace AnalysisSentimentParams {
3566
+ /**
3567
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3568
+ * out for the route's own questions.
3569
+ */
3570
+ export interface Analysis {
3571
+ /**
3572
+ * Posts analyzed at the same time.
3573
+ */
3574
+ concurrency?: number;
3575
+
3576
+ /**
3577
+ * Background the AI reads with every post.
3578
+ */
3579
+ context?: string;
3580
+
3581
+ /**
3582
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
3583
+ * settings take 219 bytes, so a smaller value gets a 400.
3584
+ */
3585
+ maxContextBytes?: number;
3586
+
3587
+ /**
3588
+ * A ready set of questions, used when questions is left out. complaints,
3589
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
3590
+ * how viral the wording reads.
3591
+ */
3592
+ preset?:
3593
+ | 'brand'
3594
+ | 'complaints'
3595
+ | 'competitors'
3596
+ | 'purchase_intent'
3597
+ | 'product_feedback'
3598
+ | 'news'
3599
+ | 'sentiment'
3600
+ | 'market'
3601
+ | 'viral_lite';
3602
+
3603
+ /**
3604
+ * Your own questions, which replace the route's questions. Write question IDs &
3605
+ * category names in lower case without hyphens.
3606
+ */
3607
+ questions?: Array<Analysis.Question>;
3608
+
3609
+ /**
3610
+ * Brands, people, assets or topics the questions are about, each with its aliases.
3611
+ */
3612
+ targets?: Array<Analysis.Target>;
3613
+ }
3614
+
3615
+ export namespace Analysis {
3616
+ /**
3617
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
3618
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
3619
+ * yes or no.
3620
+ */
3621
+ export interface Question {
3622
+ /**
3623
+ * Name of the answer, such as request. A name the response renames or drops gets a
3624
+ * 400, such as created_at, favorite_count, muting or blocking.
3625
+ */
3626
+ id: string;
3627
+
3628
+ /**
3629
+ * The question, as the AI reads it.
3630
+ */
3631
+ instructions: string;
3632
+
3633
+ type: 'choice' | 'score' | 'probability';
3634
+
3635
+ /**
3636
+ * Your version of the question, such as 1.
3637
+ */
3638
+ version: string;
3639
+
3640
+ /**
3641
+ * For a choice. Each category name with its description, or null.
3642
+ */
3643
+ categories?: { [key: string]: string | null };
3644
+
3645
+ /**
3646
+ * For a probability. What counts as yes & as no.
3647
+ */
3648
+ criteria?: Question.Criteria;
3649
+
3650
+ /**
3651
+ * For a score. Each level's description, lowest first.
3652
+ */
3653
+ levels?: Array<string>;
3654
+ }
3655
+
3656
+ export namespace Question {
3657
+ /**
3658
+ * For a probability. What counts as yes & as no.
3659
+ */
3660
+ export interface Criteria {
3661
+ no: string;
3662
+
3663
+ yes: string;
3664
+ }
3665
+ }
3666
+
3667
+ export interface Target {
3668
+ name: string;
3669
+
3670
+ aliases?: Array<string>;
3671
+ }
3672
+ }
3673
+
3674
+ export interface Baseline {
3675
+ /**
3676
+ * The earlier answers by question ID.
3677
+ */
3678
+ answers: { [key: string]: string | number };
3679
+
3680
+ /**
3681
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3682
+ */
3683
+ id?: string;
3684
+
3685
+ /**
3686
+ * The earlier row's monitor, with its fingerprint.
3687
+ */
3688
+ monitor?: Baseline.Monitor;
3689
+
3690
+ tweet?: Baseline.Tweet;
3691
+ }
3692
+
3693
+ export namespace Baseline {
3694
+ /**
3695
+ * The earlier row's monitor, with its fingerprint.
3696
+ */
3697
+ export interface Monitor {
3698
+ configurationFingerprint?: string;
3699
+ }
3700
+
3701
+ export interface Tweet {
3702
+ id: string;
3703
+ }
3704
+ }
3705
+ }
3706
+
3707
+ export interface AnalysisViralScoreParams {
3708
+ /**
3709
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3710
+ * out for the route's own questions.
3711
+ */
3712
+ analysis?: AnalysisViralScoreParams.Analysis;
3713
+
3714
+ /**
3715
+ * Rows of an earlier answer to compare with, such as its results. Each needs the
3716
+ * post's id, or tweet.id, & its answers. Send monitor too, so other settings show
3717
+ * as not_comparable. Each result's monitor says whether the post is new, changed
3718
+ * or unchanged. The comparison costs nothing extra.
3719
+ */
3720
+ baseline?: Array<AnalysisViralScoreParams.Baseline>;
3721
+
3722
+ /**
3723
+ * The next_cursor of the page before. Send the same search with it.
3724
+ */
3725
+ cursor?: string;
3726
+
3727
+ /**
3728
+ * Maximum posts to analyze from the search. Credits can return fewer.
3729
+ */
3730
+ limit?: number;
3731
+
3732
+ /**
3733
+ * Analyze a public List's posts. Send its ID or URL.
3734
+ */
3735
+ listId?: string;
3736
+
3737
+ /**
3738
+ * X search to analyze, with the operators of /x/tweets/search, such as from:nasa
3739
+ * or lang:en. X searches up to 512 characters, counted with the other search
3740
+ * fields, as /x/tweets/search counts q.
3741
+ */
3742
+ query?: string;
3743
+
3744
+ /**
3745
+ * Search order. Default Latest.
3746
+ */
3747
+ queryType?: 'Latest' | 'Top';
3748
+
3749
+ /**
3750
+ * Analyze the quotes of 1 post. Send its ID or URL.
3751
+ */
3752
+ quotesOf?: string;
3753
+
3754
+ /**
3755
+ * Analyze the replies in 1 post's conversation. Send its ID or URL.
3756
+ */
3757
+ repliesTo?: string;
3758
+
3759
+ /**
3760
+ * Inclusive start of the search, such as 2026-09-25T00:00:00Z. Unix seconds also
3761
+ * work. A time without an offset is UTC.
3762
+ */
3763
+ sinceTime?: string | number;
3764
+
3765
+ /**
3766
+ * Your own texts to analyze, such as drafts. Reads nothing from X. Each text costs
3767
+ * the same as 1 analyzed post.
3768
+ */
3769
+ texts?: Array<string>;
3770
+
3771
+ /**
3772
+ * Post IDs or post URLs to analyze, up to 100.
3773
+ */
3774
+ tweetIds?: Array<string>;
3775
+
3776
+ /**
3777
+ * Exclusive end of the search, such as 2026-09-26T00:00:00Z. Unix seconds also
3778
+ * work. A time without an offset is UTC.
3779
+ */
3780
+ untilTime?: string | number;
3781
+
3782
+ /**
3783
+ * Analyze 1 account's posts. Send a handle, with or without @, or a profile URL.
3784
+ */
3785
+ username?: string;
3786
+ }
3787
+
3788
+ export namespace AnalysisViralScoreParams {
3789
+ /**
3790
+ * Analysis settings, the same as the analysis input of Xquik's AI Actors. Leave it
3791
+ * out for the route's own questions.
3792
+ */
3793
+ export interface Analysis {
3794
+ /**
3795
+ * Posts analyzed at the same time.
3796
+ */
3797
+ concurrency?: number;
3798
+
3799
+ /**
3800
+ * Background the AI reads with every post.
3801
+ */
3802
+ context?: string;
3803
+
3804
+ /**
3805
+ * Bytes of post, quote & settings the AI reads. Longer posts are cut to fit. Empty
3806
+ * settings take 219 bytes, so a smaller value gets a 400.
3807
+ */
3808
+ maxContextBytes?: number;
3809
+
3810
+ /**
3811
+ * A ready set of questions, used when questions is left out. complaints,
3812
+ * competitors, purchase_intent & product_feedback need targets. viral_lite scores
3813
+ * how viral the wording reads.
3814
+ */
3815
+ preset?:
3816
+ | 'brand'
3817
+ | 'complaints'
3818
+ | 'competitors'
3819
+ | 'purchase_intent'
3820
+ | 'product_feedback'
3821
+ | 'news'
3822
+ | 'sentiment'
3823
+ | 'market'
3824
+ | 'viral_lite';
3825
+
3826
+ /**
3827
+ * Your own questions, which replace the route's questions. Write question IDs &
3828
+ * category names in lower case without hyphens.
3829
+ */
3830
+ questions?: Array<Analysis.Question>;
3831
+
3832
+ /**
3833
+ * Brands, people, assets or topics the questions are about, each with its aliases.
3834
+ */
3835
+ targets?: Array<Analysis.Target>;
3836
+ }
3837
+
3838
+ export namespace Analysis {
3839
+ /**
3840
+ * A question the AI answers for each post. A choice picks 1 of 2 to 255
3841
+ * categories, a score picks 1 of 2 or more ordered levels & a probability answers
3842
+ * yes or no.
3843
+ */
3844
+ export interface Question {
3845
+ /**
3846
+ * Name of the answer, such as request. A name the response renames or drops gets a
3847
+ * 400, such as created_at, favorite_count, muting or blocking.
3848
+ */
3849
+ id: string;
3850
+
3851
+ /**
3852
+ * The question, as the AI reads it.
3853
+ */
3854
+ instructions: string;
3855
+
3856
+ type: 'choice' | 'score' | 'probability';
3857
+
3858
+ /**
3859
+ * Your version of the question, such as 1.
3860
+ */
3861
+ version: string;
3862
+
3863
+ /**
3864
+ * For a choice. Each category name with its description, or null.
3865
+ */
3866
+ categories?: { [key: string]: string | null };
3867
+
3868
+ /**
3869
+ * For a probability. What counts as yes & as no.
3870
+ */
3871
+ criteria?: Question.Criteria;
3872
+
3873
+ /**
3874
+ * For a score. Each level's description, lowest first.
3875
+ */
3876
+ levels?: Array<string>;
3877
+ }
3878
+
3879
+ export namespace Question {
3880
+ /**
3881
+ * For a probability. What counts as yes & as no.
3882
+ */
3883
+ export interface Criteria {
3884
+ no: string;
3885
+
3886
+ yes: string;
3887
+ }
3888
+ }
3889
+
3890
+ export interface Target {
3891
+ name: string;
3892
+
3893
+ aliases?: Array<string>;
3894
+ }
3895
+ }
3896
+
3897
+ export interface Baseline {
3898
+ /**
3899
+ * The earlier answers by question ID.
3900
+ */
3901
+ answers: { [key: string]: string | number };
3902
+
3903
+ /**
3904
+ * Post ID, or text:1 & so on. Else tweet.id counts.
3905
+ */
3906
+ id?: string;
3907
+
3908
+ /**
3909
+ * The earlier row's monitor, with its fingerprint.
3910
+ */
3911
+ monitor?: Baseline.Monitor;
3912
+
3913
+ tweet?: Baseline.Tweet;
3914
+ }
3915
+
3916
+ export namespace Baseline {
3917
+ /**
3918
+ * The earlier row's monitor, with its fingerprint.
3919
+ */
3920
+ export interface Monitor {
3921
+ configurationFingerprint?: string;
3922
+ }
3923
+
3924
+ export interface Tweet {
3925
+ id: string;
3926
+ }
3927
+ }
3928
+ }
3929
+
3930
+ export declare namespace Analysis {
3931
+ export {
3932
+ type AnalysisBrandResponse as AnalysisBrandResponse,
3933
+ type AnalysisClassifyResponse as AnalysisClassifyResponse,
3934
+ type AnalysisMarketSignalsResponse as AnalysisMarketSignalsResponse,
3935
+ type AnalysisNewsResponse as AnalysisNewsResponse,
3936
+ type AnalysisSentimentResponse as AnalysisSentimentResponse,
3937
+ type AnalysisViralScoreResponse as AnalysisViralScoreResponse,
3938
+ type AnalysisBrandParams as AnalysisBrandParams,
3939
+ type AnalysisClassifyParams as AnalysisClassifyParams,
3940
+ type AnalysisMarketSignalsParams as AnalysisMarketSignalsParams,
3941
+ type AnalysisNewsParams as AnalysisNewsParams,
3942
+ type AnalysisSentimentParams as AnalysisSentimentParams,
3943
+ type AnalysisViralScoreParams as AnalysisViralScoreParams,
3944
+ };
3945
+ }