x-twitter-scraper 0.13.2 → 0.13.3
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.
- package/CHANGELOG.md +8 -0
- package/README.md +25 -26
- package/package.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.13.3 (2026-10-14)
|
|
6
|
+
|
|
7
|
+
[Full changelog from v0.13.2 to v0.13.3](https://github.com/Xquik-dev/x-twitter-scraper-typescript/compare/v0.13.2...v0.13.3)
|
|
8
|
+
|
|
9
|
+
### Documentation
|
|
10
|
+
|
|
11
|
+
* The README uses sentence case headings, active voice and whole sentences. Its facts, links and legal lines stay the same.
|
|
12
|
+
|
|
5
13
|
## 0.13.2 (2026-10-14)
|
|
6
14
|
|
|
7
15
|
[Full changelog from v0.13.1 to v0.13.2](https://github.com/Xquik-dev/x-twitter-scraper-typescript/compare/v0.13.1...v0.13.2)
|
package/README.md
CHANGED
|
@@ -16,11 +16,11 @@ Xquik charges only for delivered, unique, filter-matching results and never pads
|
|
|
16
16
|
> Xquik is an independent third-party service. Not affiliated with X Corp.
|
|
17
17
|
> "Twitter" and "X" are trademarks of X Corp.
|
|
18
18
|
|
|
19
|
-
[TypeScript SDK
|
|
19
|
+
[TypeScript SDK guide](https://docs.xquik.com/sdks/typescript) | [API map](api.md) | [REST API](https://docs.xquik.com/api-reference/overview) | [Webhooks](https://docs.xquik.com/api-reference/webhooks/create) | [MCP guide](https://docs.xquik.com/mcp/overview)
|
|
20
20
|
|
|
21
21
|
## Pi coding agent package
|
|
22
22
|
|
|
23
|
-
Install the bundled Xquik Skills
|
|
23
|
+
Install the bundled Xquik Skills from npm.
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
26
|
pi install npm:x-twitter-scraper
|
|
@@ -36,7 +36,7 @@ Import the typed SDK from the same npm package.
|
|
|
36
36
|
|
|
37
37
|
## Common Twitter & X tasks
|
|
38
38
|
|
|
39
|
-
| Task | REST
|
|
39
|
+
| Task | REST route | Usage |
|
|
40
40
|
| ------------------------------- | ----------------------------- | ----------------------------------------- |
|
|
41
41
|
| Search tweets without the X API | `GET /x/tweets/search` | Use keyword or advanced operator queries. |
|
|
42
42
|
| Read an X profile timeline | `GET /x/users/{id}/tweets` | Paginate bounded results. |
|
|
@@ -66,7 +66,7 @@ Follow the [MCP guide](https://docs.xquik.com/mcp/overview) for current authenti
|
|
|
66
66
|
|
|
67
67
|
## Installation
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
The SDK requires TypeScript 4.9 or later.
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
72
|
npm install x-twitter-scraper
|
|
@@ -81,7 +81,7 @@ See [api.md](api.md) for the complete API.
|
|
|
81
81
|
import XTwitterScraper from 'x-twitter-scraper';
|
|
82
82
|
|
|
83
83
|
const client = new XTwitterScraper({
|
|
84
|
-
apiKey: process.env['X_TWITTER_SCRAPER_API_KEY'], // Optional
|
|
84
|
+
apiKey: process.env['X_TWITTER_SCRAPER_API_KEY'], // Optional. The client reads this variable.
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
const response = await client.x.tweets.search({ q: 'from:elonmusk', limit: 10 });
|
|
@@ -96,7 +96,7 @@ The package includes types for every request parameter and response field. Impor
|
|
|
96
96
|
import XTwitterScraper from 'x-twitter-scraper';
|
|
97
97
|
|
|
98
98
|
const client = new XTwitterScraper({
|
|
99
|
-
apiKey: process.env['X_TWITTER_SCRAPER_API_KEY'], // Optional
|
|
99
|
+
apiKey: process.env['X_TWITTER_SCRAPER_API_KEY'], // Optional. The client reads this variable.
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
const params: XTwitterScraper.X.TweetSearchParams = { q: 'from:elonmusk', limit: 10 };
|
|
@@ -189,7 +189,7 @@ const paginatedTweets = await client.x.tweets
|
|
|
189
189
|
});
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
| Status
|
|
192
|
+
| Status code | Error type |
|
|
193
193
|
| ----------- | -------------------------- |
|
|
194
194
|
| 400 | `BadRequestError` |
|
|
195
195
|
| 401 | `AuthenticationError` |
|
|
@@ -237,7 +237,7 @@ await client.x.tweets.search({ q: 'from:elonmusk', limit: 10 }, {
|
|
|
237
237
|
});
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
On timeout, an `APIConnectionTimeoutError
|
|
240
|
+
On timeout, the SDK throws an `APIConnectionTimeoutError`.
|
|
241
241
|
|
|
242
242
|
Timed-out requests follow the [default retry policy](#retries).
|
|
243
243
|
|
|
@@ -268,15 +268,15 @@ console.log(paginatedTweets.has_next_page);
|
|
|
268
268
|
## Logging
|
|
269
269
|
|
|
270
270
|
> [!IMPORTANT]
|
|
271
|
-
>
|
|
272
|
-
>
|
|
271
|
+
> Log messages are for debugging only. The format and content of log messages may change
|
|
272
|
+
> between releases.
|
|
273
273
|
|
|
274
274
|
### Log levels
|
|
275
275
|
|
|
276
276
|
Configure the log level in 2 ways.
|
|
277
277
|
|
|
278
|
-
1.
|
|
279
|
-
2.
|
|
278
|
+
1. Set the `X_TWITTER_SCRAPER_LOG` environment variable.
|
|
279
|
+
2. Set the `logLevel` client option. It overrides the environment variable.
|
|
280
280
|
|
|
281
281
|
```ts
|
|
282
282
|
import XTwitterScraper from 'x-twitter-scraper';
|
|
@@ -286,17 +286,16 @@ const client = new XTwitterScraper({
|
|
|
286
286
|
});
|
|
287
287
|
```
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
These are the log levels, from most to least verbose.
|
|
290
290
|
|
|
291
|
-
- `'debug'`
|
|
292
|
-
- `'info'`
|
|
293
|
-
- `'warn'`
|
|
294
|
-
- `'error'`
|
|
295
|
-
- `'off'`
|
|
291
|
+
- `'debug'` shows debug messages, info, warnings, and errors.
|
|
292
|
+
- `'info'` shows info messages, warnings, and errors.
|
|
293
|
+
- `'warn'` shows warnings and errors. It is the default.
|
|
294
|
+
- `'error'` shows only errors.
|
|
295
|
+
- `'off'` disables all logging.
|
|
296
296
|
|
|
297
|
-
At the `'debug'` level,
|
|
298
|
-
|
|
299
|
-
may still be visible.
|
|
297
|
+
At the `'debug'` level, the SDK logs every HTTP request and response, including headers and bodies.
|
|
298
|
+
It redacts some authentication headers, but request and response bodies may still show sensitive data.
|
|
300
299
|
|
|
301
300
|
### Custom logger
|
|
302
301
|
|
|
@@ -447,18 +446,18 @@ Open an [issue](https://www.github.com/Xquik-dev/x-twitter-scraper-typescript/is
|
|
|
447
446
|
|
|
448
447
|
## Runtime support
|
|
449
448
|
|
|
450
|
-
|
|
449
|
+
The SDK supports these runtimes.
|
|
451
450
|
|
|
452
451
|
- Current Chrome, Firefox, Safari, Edge, and other web browsers.
|
|
453
452
|
- [Maintained Node.js](https://endoflife.date/nodejs) 20 LTS or later.
|
|
454
|
-
- Deno v1.28.0 or
|
|
453
|
+
- Deno v1.28.0 or later.
|
|
455
454
|
- Bun 1.0 or later.
|
|
456
455
|
- Cloudflare Workers.
|
|
457
456
|
- Vercel Edge Runtime.
|
|
458
|
-
- Jest 28 or
|
|
459
|
-
- Nitro v2.6 or
|
|
457
|
+
- Jest 28 or later with the `"node"` environment, not `"jsdom"`.
|
|
458
|
+
- Nitro v2.6 or later.
|
|
460
459
|
|
|
461
|
-
|
|
460
|
+
The SDK does not support React Native.
|
|
462
461
|
|
|
463
462
|
Request another runtime in a GitHub issue.
|
|
464
463
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-twitter-scraper",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "X API & Twitter API SDK for TypeScript. Scrape Twitter search, profiles & followers as a Twitter scraper & tweet scraper. Not affiliated with X Corp.",
|
|
5
5
|
"author": "Xquik <support@xquik.com>",
|
|
6
6
|
"types": "./index.d.ts",
|
package/src/version.ts
CHANGED
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.13.
|
|
1
|
+
export declare const VERSION = "0.13.3";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.13.
|
|
1
|
+
export declare const VERSION = "0.13.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEzB,QAAA,OAAO,GAAG,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;;;AAEzB,QAAA,OAAO,GAAG,QAAQ,CAAC"}
|
package/version.mjs
CHANGED
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
|