mcpscraper-sdk 0.54.1 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,7 +41,7 @@ Every non-2xx response throws a `ScraperApiError` with `status`, `code`, and the
41
41
  - `err.isConcurrencyLimitExceeded()` — narrows `err.body` to `{ active, limit, retryable, upgrade, ... }`.
42
42
  - `err.isVerificationChallenge()` / `err.isTimeout()` — preserve actionable, vendor-neutral retry and charge details returned by the service.
43
43
 
44
- Google Search light mode returns organic positions, URLs, titles, and descriptions for 20 Credits per delivered SERP page, or 35 Credits when the backup supplies the result. One-page full mode adds available same-page SERP features for 35 Credits. Both modes default to one page; an unfiltered two-page search costs 40 Credits when the normal provider returns both pages. Past-week and past-month searches use a managed browser for organic results at 35 Credits per delivered page. Unfiltered light searches try the primary path twice, then one API fallback; an unfiltered one-page full search uses the feature-capable API directly. If page 2 cannot be delivered, an available page 1 is returned as partial and billed at the one-page rate. A 35-Credit-per-requested-page hold is settled after delivery. PAA costs 400 Credits plus 10 Credits per returned question. One optional concurrency pack adds two browser slots for $5/month; quantity `n` adds `2n` slots for `$5n` without changing the base plan.
44
+ Google Search light mode returns organic positions, URLs, titles, and descriptions for 20 Credits per delivered SERP page, or 35 Credits when the backup supplies the result. One-page full mode adds available same-page SERP features for 35 Credits. Both modes default to one page; an unfiltered two-page search costs 40 Credits when the normal provider returns both pages. Past-week and past-month searches return one page of organic results at 35 Credits; omit the date filter when requesting two pages. Unfiltered one-page light searches try the primary path twice, then one API fallback; an unfiltered one-page full search uses the feature-capable API directly. Date filters and saved search identities require one page. Combining either with two pages is rejected before acquisition or billing. Two-page searches return organic results without a backup provider. If page 2 cannot be delivered, an available page 1 is returned as partial and billed at the one-page rate. A 35-Credit-per-requested-page hold is settled after delivery. PAA costs 400 Credits plus 10 Credits per returned question. One optional concurrency pack adds two browser slots for $5/month; quantity `n` adds `2n` slots for `$5n` without changing the base plan.
45
45
 
46
46
  ## API surface
47
47
 
@@ -193,10 +193,36 @@ npm run verify:rest-contract
193
193
 
194
194
  Durable PAA harvests should wait at least 20 seconds between status checks and honor a longer returned polling interval. Keep the same job ID and retry key while the original work is running.
195
195
 
196
- Release changes: [SDK 0.54.1 release notes](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.54.1).
196
+ Release changes: [SDK 0.56.0 release notes](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.56.0).
197
197
 
198
198
  ## Client attribution and full results
199
199
 
200
200
  Clients accept `clientAttribution: { installChannel?, aiClient?, aiModel? }` and default to calling surface `sdk`. Set only known caller labels; unspecified labels stay unknown. `onResponse({ requestId, status })` receives per-response correlation without changing results, and errors keep their own `requestId`. These options also apply to `McpToolsClient` and `MemoryClient`; labels are reporting declarations, not authorization.
201
201
 
202
202
  Large tool outputs may be delivery envelopes instead of inline domain values. Preserve `delivery`, `scope` and `recovery`, then use `tools.artifacts.describe`, `readRetained` (follow `nextOffset` to null), or `download` with the returned artifact ID. The legacy `artifacts.read` method remains the report reader. `callToolResult` preserves native content/resource links. Download URL expiry differs from artifact retention; renew a URL through `download` without rerunning acquisition. Use the returned capability for binary files.
203
+
204
+ Artifact delivery may include optional `delivery.availableExports` handles. Use the
205
+ export artifact ID with `artifact_download`, `artifact_read` or `artifact_describe`
206
+ to generate Markdown from retained JSON without repeating acquisition. The
207
+ [on-demand export example](https://github.com/VilovietaSEO/mcpscraper-sdk/blob/v0.55.0/examples/serp-on-demand-export.mjs)
208
+ shows the complete flow and preserves a retry key for uncertain search responses.
209
+
210
+ ## Reddit discovery and known threads
211
+
212
+ Use `reddit_trending` with `window:"year"` to discover past-year search candidates and
213
+ select relevant threads before collecting comments. Set `maxThreads` to bound the
214
+ number selected and `maxCommentsPerThread:20` for a per-thread capture limit.
215
+ Twenty is a request limit; inspect returned coverage because fewer accessible text
216
+ comments can produce a partial result. Publication dates are optional when unknown.
217
+
218
+ Pass a known Reddit thread URL directly to `reddit_thread` with `maxComments:20`;
219
+ it does not require a discovery call first. Trending returns ranked summaries and
220
+ questions; the thread tool returns full comment bodies. Preserve each operation's
221
+ retry key and exact inputs after an uncertain response.
222
+
223
+ The [past-year and direct-thread example](https://github.com/VilovietaSEO/mcpscraper-sdk/blob/v0.56.0/examples/reddit-past-year.mjs)
224
+ shows both paths.
225
+
226
+ ## Saved Maps reviews
227
+
228
+ Server 0.100.1 improves Maps discovery, review text and list collection through the existing interfaces. Use the exact name and location returned by discovery. Read the saved run and its review pages before considering a new acquisition. An explicit resume uses a fresh browser and reopens the profile and reviews; it retains saved review IDs. A new resume key authorizes a separately billed attempt, while repeating that key reads the same run.
package/dist/index.d.cts CHANGED
@@ -46,7 +46,10 @@ interface paths {
46
46
  * positions, URLs, titles, and descriptions for 20 Credits per delivered
47
47
  * page, or 35 Credits when the backup supplies the result. Full mode adds
48
48
  * available same-page SERP features for 35 Credits per delivered page.
49
- * Both modes default to one page; set `pages: 2` explicitly for two.
49
+ * Both modes default to one page; set `pages: 2` explicitly for two unfiltered
50
+ * organic pages without a backup provider. With `serpOnly: true`, `recency: week` or `month` returns
51
+ * one page for 35 Credits. Combining recency with two pages is rejected
52
+ * before acquisition or billing.
50
53
  * A 35-Credit-per-requested-page hold is settled after delivery.
51
54
  * Omit or set `false` for a full People-Also-Ask harvest, which also returns SERP data
52
55
  * (400 Credit base + 10 Credits per question actually returned; unused estimate is
@@ -559,7 +562,7 @@ interface paths {
559
562
  put?: never;
560
563
  /**
561
564
  * Capture a Reddit post and its comment tree
562
- * @description Costs 30 credits for the thread plus 2 credits per comment actually returned. Refunded automatically if Reddit blocks the request after retries.
565
+ * @description Opens a known Reddit thread directly without a discovery search. Costs 30 credits for the thread plus 2 credits per comment actually returned. Refunded automatically if Reddit blocks the request after retries.
563
566
  */
564
567
  post: operations["redditThread"];
565
568
  delete?: never;
@@ -579,13 +582,14 @@ interface paths {
579
582
  put?: never;
580
583
  /**
581
584
  * Discover and rank the top recent Reddit threads for a topic
582
- * @description Finds relevant recent Reddit threads via a Google site:reddit.com search over a week/month window,
583
- * then (by default) scrapes them all in parallel for real upvotes, comments, and the questions people
584
- * asked, and ranks by engagement (upvotes + 2x comments). Billing: one discovery debit plus, when
585
- * includeComments is true, 30 credits per scraped thread and 2 credits per captured comment, each
586
- * refunded on failure. Set includeComments:false for a cheap discovery-only sweep (thread list, no
587
- * engagement stats, no per-thread billing). Scraping respects a soft deadline and returns partial:true
588
- * if it stops early rather than exceeding the request limit.
585
+ * @description Discovers Reddit threads through a Google site:reddit.com search and selects relevant candidates
586
+ * before scraping. Supports week, month, year and all-time windows. Scraped post dates are checked
587
+ * against the requested publication window; discovery-only candidate dates remain unverified.
588
+ * With includeComments:true, collects selected threads and ranks by engagement (upvotes + 2x
589
+ * reported comments). Billing: one discovery debit plus 30 credits per scraped thread and 2 credits
590
+ * per captured comment, each refunded on failure. Set includeComments:false for a candidate list
591
+ * without per-thread billing. Comment coverage distinguishes the requested limit, returned text
592
+ * comments and reported comment count. A bounded capture can return partial:true.
589
593
  */
590
594
  post: operations["redditTrending"];
591
595
  delete?: never;
@@ -1257,7 +1261,7 @@ interface components {
1257
1261
  /** @description Optional US ZIP override. */
1258
1262
  proxyZip?: string;
1259
1263
  /**
1260
- * @description Google result pages to fetch. Full mode alone does not request page 2.
1264
+ * @description Google result pages to fetch. Full mode alone does not request page 2. For serpOnly searches, two pages require an omitted recency filter.
1261
1265
  * @default 1
1262
1266
  */
1263
1267
  pages: number;
@@ -1273,7 +1277,7 @@ interface components {
1273
1277
  */
1274
1278
  serpOnly: boolean;
1275
1279
  /**
1276
- * @description Optional Google time filter. Ordinary search_serp accepts week or month and returns organic browser results; PAA harvest also accepts day and year. Omit for all-time results.
1280
+ * @description Optional Google time filter. Ordinary search_serp accepts week or month for one page of organic results at 35 Credits; combining recency with pages 2 is rejected before acquisition or billing. PAA harvest also accepts day and year. Omit for all-time results.
1277
1281
  * @enum {string}
1278
1282
  */
1279
1283
  recency?: "day" | "week" | "month" | "year";
@@ -2363,6 +2367,108 @@ interface components {
2363
2367
  } & {
2364
2368
  [key: string]: unknown;
2365
2369
  };
2370
+ RedditThreadRequest: {
2371
+ /** @description A known Reddit thread URL to open directly without searching; legacy Reddit hostnames are normalized to the current page. */
2372
+ url: string;
2373
+ maxComments?: number;
2374
+ };
2375
+ RedditThreadResponse: {
2376
+ title?: string;
2377
+ author?: string | null;
2378
+ score?: string | null;
2379
+ postBody?: string;
2380
+ /**
2381
+ * Format: date-time
2382
+ * @description Observed publication timestamp when available.
2383
+ */
2384
+ publishedAt?: string | null;
2385
+ numComments?: number;
2386
+ comments?: {
2387
+ author?: string | null;
2388
+ score?: string;
2389
+ depth?: number;
2390
+ body?: string;
2391
+ }[];
2392
+ sourceUrl?: string;
2393
+ };
2394
+ RedditTrendingRequest: {
2395
+ /** @description Topic in plain words, e.g. "crm for small business". Not a URL. */
2396
+ topic: string;
2397
+ /** @description Bare subreddit name to scope the scan, e.g. "SEO" (no r/ prefix). Omit to scan all of Reddit. */
2398
+ subreddit?: string;
2399
+ /**
2400
+ * @description Publication window; scraped threads are checked against their actual post dates, while discovery-only dates remain unverified.
2401
+ * @default month
2402
+ * @enum {string}
2403
+ */
2404
+ window: "week" | "month" | "year" | "all";
2405
+ /**
2406
+ * @description Cap on relevant threads selected before scraping; one search page can yield fewer. Each scraped thread and its returned comments are billed separately.
2407
+ * @default 20
2408
+ */
2409
+ maxThreads: number;
2410
+ /**
2411
+ * @description Open selected threads to verify post dates and collect comments; false returns search candidates for your own selection, without per-thread charges or verified post dates.
2412
+ * @default true
2413
+ */
2414
+ includeComments: boolean;
2415
+ /**
2416
+ * @description Comments captured (and billed) per scraped thread when includeComments is true.
2417
+ * @default 50
2418
+ */
2419
+ maxCommentsPerThread: number;
2420
+ };
2421
+ RedditTrendingResponse: {
2422
+ topic?: string;
2423
+ subreddit?: string | null;
2424
+ /** @description Resolved publication window: "7d", "30d", "365d" or "all". */
2425
+ window?: string;
2426
+ totals?: {
2427
+ threads?: number;
2428
+ upvotes?: number;
2429
+ comments?: number;
2430
+ };
2431
+ rankedThreads?: {
2432
+ title?: string;
2433
+ url?: string;
2434
+ subreddit?: string;
2435
+ score?: number;
2436
+ commentCount?: number;
2437
+ engagementScore?: number;
2438
+ ageText?: string;
2439
+ /**
2440
+ * Format: date-time
2441
+ * @description Observed publication timestamp when available.
2442
+ */
2443
+ publishedAt?: string | null;
2444
+ /** @description Text comments actually returned for this thread. */
2445
+ capturedCommentCount?: number;
2446
+ /** @description Requested per-thread comment cap. */
2447
+ requestedCommentLimit?: number;
2448
+ commentCoverage?: {
2449
+ requestedLimit: number;
2450
+ returnedCount: number;
2451
+ declaredCount: number;
2452
+ status: components["schemas"]["RedditCommentCoverageStatus"];
2453
+ reason: components["schemas"]["RedditCommentCoverageReason"];
2454
+ };
2455
+ topQuestions?: string[];
2456
+ }[];
2457
+ questions?: {
2458
+ question?: string;
2459
+ threadUrl?: string;
2460
+ }[];
2461
+ threadsScraped?: number;
2462
+ candidatesFound?: number;
2463
+ /** @description true if scraping stopped early at the time limit. */
2464
+ partial?: boolean;
2465
+ /** @description The Google site:reddit.com query used for discovery. */
2466
+ searchQuery?: string;
2467
+ };
2468
+ /** @enum {string} */
2469
+ RedditCommentCoverageStatus: "complete" | "partial";
2470
+ /** @enum {string} */
2471
+ RedditCommentCoverageReason: "requested_limit_reached" | "declared_count_reached" | "stable_visible_shortfall" | "capture_shortfall" | "funding_limited";
2366
2472
  MapsSearchRequest: {
2367
2473
  query: string;
2368
2474
  location?: string;
@@ -3588,11 +3694,7 @@ interface operations {
3588
3694
  };
3589
3695
  requestBody: {
3590
3696
  content: {
3591
- "application/json": {
3592
- /** @description A reddit.com or redd.it thread URL. */
3593
- url: string;
3594
- maxComments?: number;
3595
- };
3697
+ "application/json": components["schemas"]["RedditThreadRequest"];
3596
3698
  };
3597
3699
  };
3598
3700
  responses: {
@@ -3602,20 +3704,7 @@ interface operations {
3602
3704
  [name: string]: unknown;
3603
3705
  };
3604
3706
  content: {
3605
- "application/json": {
3606
- title?: string;
3607
- author?: string | null;
3608
- score?: string | null;
3609
- postBody?: string;
3610
- numComments?: number;
3611
- comments?: {
3612
- author?: string | null;
3613
- score?: string;
3614
- depth?: number;
3615
- body?: string;
3616
- }[];
3617
- sourceUrl?: string;
3618
- };
3707
+ "application/json": components["schemas"]["RedditThreadResponse"];
3619
3708
  };
3620
3709
  };
3621
3710
  400: components["responses"]["BadRequest"];
@@ -3640,33 +3729,7 @@ interface operations {
3640
3729
  };
3641
3730
  requestBody: {
3642
3731
  content: {
3643
- "application/json": {
3644
- /** @description Topic in plain words, e.g. "crm for small business". Not a URL. */
3645
- topic: string;
3646
- /** @description Bare subreddit name to scope the scan, e.g. "SEO" (no r/ prefix). Omit to scan all of Reddit. */
3647
- subreddit?: string;
3648
- /**
3649
- * @description How recent the threads must be.
3650
- * @default month
3651
- * @enum {string}
3652
- */
3653
- window?: "week" | "month";
3654
- /**
3655
- * @description How many discovered threads to scrape and rank (scrape-all default). Lower to cap cost.
3656
- * @default 20
3657
- */
3658
- maxThreads?: number;
3659
- /**
3660
- * @description true = scrape each thread for engagement + questions and rank; false = cheap discovery-only list.
3661
- * @default true
3662
- */
3663
- includeComments?: boolean;
3664
- /**
3665
- * @description Comments captured (and billed) per scraped thread when includeComments is true.
3666
- * @default 50
3667
- */
3668
- maxCommentsPerThread?: number;
3669
- };
3732
+ "application/json": components["schemas"]["RedditTrendingRequest"];
3670
3733
  };
3671
3734
  };
3672
3735
  responses: {
@@ -3676,37 +3739,7 @@ interface operations {
3676
3739
  [name: string]: unknown;
3677
3740
  };
3678
3741
  content: {
3679
- "application/json": {
3680
- topic?: string;
3681
- subreddit?: string | null;
3682
- /** @description Resolved window, e.g. "7d" or "30d". */
3683
- window?: string;
3684
- totals?: {
3685
- threads?: number;
3686
- upvotes?: number;
3687
- comments?: number;
3688
- };
3689
- rankedThreads?: {
3690
- title?: string;
3691
- url?: string;
3692
- subreddit?: string;
3693
- score?: number;
3694
- commentCount?: number;
3695
- engagementScore?: number;
3696
- ageText?: string;
3697
- topQuestions?: string[];
3698
- }[];
3699
- questions?: {
3700
- question?: string;
3701
- threadUrl?: string;
3702
- }[];
3703
- threadsScraped?: number;
3704
- candidatesFound?: number;
3705
- /** @description true if scraping stopped early at the time limit. */
3706
- partial?: boolean;
3707
- /** @description The Google site:reddit.com query used for discovery. */
3708
- searchQuery?: string;
3709
- };
3742
+ "application/json": components["schemas"]["RedditTrendingResponse"];
3710
3743
  };
3711
3744
  };
3712
3745
  400: components["responses"]["BadRequest"];
@@ -4902,6 +4935,7 @@ declare class RedditNamespace {
4902
4935
  author?: string | null;
4903
4936
  score?: string | null;
4904
4937
  postBody?: string;
4938
+ publishedAt?: string | null;
4905
4939
  numComments?: number;
4906
4940
  comments?: {
4907
4941
  author?: string | null;
package/dist/index.d.ts CHANGED
@@ -46,7 +46,10 @@ interface paths {
46
46
  * positions, URLs, titles, and descriptions for 20 Credits per delivered
47
47
  * page, or 35 Credits when the backup supplies the result. Full mode adds
48
48
  * available same-page SERP features for 35 Credits per delivered page.
49
- * Both modes default to one page; set `pages: 2` explicitly for two.
49
+ * Both modes default to one page; set `pages: 2` explicitly for two unfiltered
50
+ * organic pages without a backup provider. With `serpOnly: true`, `recency: week` or `month` returns
51
+ * one page for 35 Credits. Combining recency with two pages is rejected
52
+ * before acquisition or billing.
50
53
  * A 35-Credit-per-requested-page hold is settled after delivery.
51
54
  * Omit or set `false` for a full People-Also-Ask harvest, which also returns SERP data
52
55
  * (400 Credit base + 10 Credits per question actually returned; unused estimate is
@@ -559,7 +562,7 @@ interface paths {
559
562
  put?: never;
560
563
  /**
561
564
  * Capture a Reddit post and its comment tree
562
- * @description Costs 30 credits for the thread plus 2 credits per comment actually returned. Refunded automatically if Reddit blocks the request after retries.
565
+ * @description Opens a known Reddit thread directly without a discovery search. Costs 30 credits for the thread plus 2 credits per comment actually returned. Refunded automatically if Reddit blocks the request after retries.
563
566
  */
564
567
  post: operations["redditThread"];
565
568
  delete?: never;
@@ -579,13 +582,14 @@ interface paths {
579
582
  put?: never;
580
583
  /**
581
584
  * Discover and rank the top recent Reddit threads for a topic
582
- * @description Finds relevant recent Reddit threads via a Google site:reddit.com search over a week/month window,
583
- * then (by default) scrapes them all in parallel for real upvotes, comments, and the questions people
584
- * asked, and ranks by engagement (upvotes + 2x comments). Billing: one discovery debit plus, when
585
- * includeComments is true, 30 credits per scraped thread and 2 credits per captured comment, each
586
- * refunded on failure. Set includeComments:false for a cheap discovery-only sweep (thread list, no
587
- * engagement stats, no per-thread billing). Scraping respects a soft deadline and returns partial:true
588
- * if it stops early rather than exceeding the request limit.
585
+ * @description Discovers Reddit threads through a Google site:reddit.com search and selects relevant candidates
586
+ * before scraping. Supports week, month, year and all-time windows. Scraped post dates are checked
587
+ * against the requested publication window; discovery-only candidate dates remain unverified.
588
+ * With includeComments:true, collects selected threads and ranks by engagement (upvotes + 2x
589
+ * reported comments). Billing: one discovery debit plus 30 credits per scraped thread and 2 credits
590
+ * per captured comment, each refunded on failure. Set includeComments:false for a candidate list
591
+ * without per-thread billing. Comment coverage distinguishes the requested limit, returned text
592
+ * comments and reported comment count. A bounded capture can return partial:true.
589
593
  */
590
594
  post: operations["redditTrending"];
591
595
  delete?: never;
@@ -1257,7 +1261,7 @@ interface components {
1257
1261
  /** @description Optional US ZIP override. */
1258
1262
  proxyZip?: string;
1259
1263
  /**
1260
- * @description Google result pages to fetch. Full mode alone does not request page 2.
1264
+ * @description Google result pages to fetch. Full mode alone does not request page 2. For serpOnly searches, two pages require an omitted recency filter.
1261
1265
  * @default 1
1262
1266
  */
1263
1267
  pages: number;
@@ -1273,7 +1277,7 @@ interface components {
1273
1277
  */
1274
1278
  serpOnly: boolean;
1275
1279
  /**
1276
- * @description Optional Google time filter. Ordinary search_serp accepts week or month and returns organic browser results; PAA harvest also accepts day and year. Omit for all-time results.
1280
+ * @description Optional Google time filter. Ordinary search_serp accepts week or month for one page of organic results at 35 Credits; combining recency with pages 2 is rejected before acquisition or billing. PAA harvest also accepts day and year. Omit for all-time results.
1277
1281
  * @enum {string}
1278
1282
  */
1279
1283
  recency?: "day" | "week" | "month" | "year";
@@ -2363,6 +2367,108 @@ interface components {
2363
2367
  } & {
2364
2368
  [key: string]: unknown;
2365
2369
  };
2370
+ RedditThreadRequest: {
2371
+ /** @description A known Reddit thread URL to open directly without searching; legacy Reddit hostnames are normalized to the current page. */
2372
+ url: string;
2373
+ maxComments?: number;
2374
+ };
2375
+ RedditThreadResponse: {
2376
+ title?: string;
2377
+ author?: string | null;
2378
+ score?: string | null;
2379
+ postBody?: string;
2380
+ /**
2381
+ * Format: date-time
2382
+ * @description Observed publication timestamp when available.
2383
+ */
2384
+ publishedAt?: string | null;
2385
+ numComments?: number;
2386
+ comments?: {
2387
+ author?: string | null;
2388
+ score?: string;
2389
+ depth?: number;
2390
+ body?: string;
2391
+ }[];
2392
+ sourceUrl?: string;
2393
+ };
2394
+ RedditTrendingRequest: {
2395
+ /** @description Topic in plain words, e.g. "crm for small business". Not a URL. */
2396
+ topic: string;
2397
+ /** @description Bare subreddit name to scope the scan, e.g. "SEO" (no r/ prefix). Omit to scan all of Reddit. */
2398
+ subreddit?: string;
2399
+ /**
2400
+ * @description Publication window; scraped threads are checked against their actual post dates, while discovery-only dates remain unverified.
2401
+ * @default month
2402
+ * @enum {string}
2403
+ */
2404
+ window: "week" | "month" | "year" | "all";
2405
+ /**
2406
+ * @description Cap on relevant threads selected before scraping; one search page can yield fewer. Each scraped thread and its returned comments are billed separately.
2407
+ * @default 20
2408
+ */
2409
+ maxThreads: number;
2410
+ /**
2411
+ * @description Open selected threads to verify post dates and collect comments; false returns search candidates for your own selection, without per-thread charges or verified post dates.
2412
+ * @default true
2413
+ */
2414
+ includeComments: boolean;
2415
+ /**
2416
+ * @description Comments captured (and billed) per scraped thread when includeComments is true.
2417
+ * @default 50
2418
+ */
2419
+ maxCommentsPerThread: number;
2420
+ };
2421
+ RedditTrendingResponse: {
2422
+ topic?: string;
2423
+ subreddit?: string | null;
2424
+ /** @description Resolved publication window: "7d", "30d", "365d" or "all". */
2425
+ window?: string;
2426
+ totals?: {
2427
+ threads?: number;
2428
+ upvotes?: number;
2429
+ comments?: number;
2430
+ };
2431
+ rankedThreads?: {
2432
+ title?: string;
2433
+ url?: string;
2434
+ subreddit?: string;
2435
+ score?: number;
2436
+ commentCount?: number;
2437
+ engagementScore?: number;
2438
+ ageText?: string;
2439
+ /**
2440
+ * Format: date-time
2441
+ * @description Observed publication timestamp when available.
2442
+ */
2443
+ publishedAt?: string | null;
2444
+ /** @description Text comments actually returned for this thread. */
2445
+ capturedCommentCount?: number;
2446
+ /** @description Requested per-thread comment cap. */
2447
+ requestedCommentLimit?: number;
2448
+ commentCoverage?: {
2449
+ requestedLimit: number;
2450
+ returnedCount: number;
2451
+ declaredCount: number;
2452
+ status: components["schemas"]["RedditCommentCoverageStatus"];
2453
+ reason: components["schemas"]["RedditCommentCoverageReason"];
2454
+ };
2455
+ topQuestions?: string[];
2456
+ }[];
2457
+ questions?: {
2458
+ question?: string;
2459
+ threadUrl?: string;
2460
+ }[];
2461
+ threadsScraped?: number;
2462
+ candidatesFound?: number;
2463
+ /** @description true if scraping stopped early at the time limit. */
2464
+ partial?: boolean;
2465
+ /** @description The Google site:reddit.com query used for discovery. */
2466
+ searchQuery?: string;
2467
+ };
2468
+ /** @enum {string} */
2469
+ RedditCommentCoverageStatus: "complete" | "partial";
2470
+ /** @enum {string} */
2471
+ RedditCommentCoverageReason: "requested_limit_reached" | "declared_count_reached" | "stable_visible_shortfall" | "capture_shortfall" | "funding_limited";
2366
2472
  MapsSearchRequest: {
2367
2473
  query: string;
2368
2474
  location?: string;
@@ -3588,11 +3694,7 @@ interface operations {
3588
3694
  };
3589
3695
  requestBody: {
3590
3696
  content: {
3591
- "application/json": {
3592
- /** @description A reddit.com or redd.it thread URL. */
3593
- url: string;
3594
- maxComments?: number;
3595
- };
3697
+ "application/json": components["schemas"]["RedditThreadRequest"];
3596
3698
  };
3597
3699
  };
3598
3700
  responses: {
@@ -3602,20 +3704,7 @@ interface operations {
3602
3704
  [name: string]: unknown;
3603
3705
  };
3604
3706
  content: {
3605
- "application/json": {
3606
- title?: string;
3607
- author?: string | null;
3608
- score?: string | null;
3609
- postBody?: string;
3610
- numComments?: number;
3611
- comments?: {
3612
- author?: string | null;
3613
- score?: string;
3614
- depth?: number;
3615
- body?: string;
3616
- }[];
3617
- sourceUrl?: string;
3618
- };
3707
+ "application/json": components["schemas"]["RedditThreadResponse"];
3619
3708
  };
3620
3709
  };
3621
3710
  400: components["responses"]["BadRequest"];
@@ -3640,33 +3729,7 @@ interface operations {
3640
3729
  };
3641
3730
  requestBody: {
3642
3731
  content: {
3643
- "application/json": {
3644
- /** @description Topic in plain words, e.g. "crm for small business". Not a URL. */
3645
- topic: string;
3646
- /** @description Bare subreddit name to scope the scan, e.g. "SEO" (no r/ prefix). Omit to scan all of Reddit. */
3647
- subreddit?: string;
3648
- /**
3649
- * @description How recent the threads must be.
3650
- * @default month
3651
- * @enum {string}
3652
- */
3653
- window?: "week" | "month";
3654
- /**
3655
- * @description How many discovered threads to scrape and rank (scrape-all default). Lower to cap cost.
3656
- * @default 20
3657
- */
3658
- maxThreads?: number;
3659
- /**
3660
- * @description true = scrape each thread for engagement + questions and rank; false = cheap discovery-only list.
3661
- * @default true
3662
- */
3663
- includeComments?: boolean;
3664
- /**
3665
- * @description Comments captured (and billed) per scraped thread when includeComments is true.
3666
- * @default 50
3667
- */
3668
- maxCommentsPerThread?: number;
3669
- };
3732
+ "application/json": components["schemas"]["RedditTrendingRequest"];
3670
3733
  };
3671
3734
  };
3672
3735
  responses: {
@@ -3676,37 +3739,7 @@ interface operations {
3676
3739
  [name: string]: unknown;
3677
3740
  };
3678
3741
  content: {
3679
- "application/json": {
3680
- topic?: string;
3681
- subreddit?: string | null;
3682
- /** @description Resolved window, e.g. "7d" or "30d". */
3683
- window?: string;
3684
- totals?: {
3685
- threads?: number;
3686
- upvotes?: number;
3687
- comments?: number;
3688
- };
3689
- rankedThreads?: {
3690
- title?: string;
3691
- url?: string;
3692
- subreddit?: string;
3693
- score?: number;
3694
- commentCount?: number;
3695
- engagementScore?: number;
3696
- ageText?: string;
3697
- topQuestions?: string[];
3698
- }[];
3699
- questions?: {
3700
- question?: string;
3701
- threadUrl?: string;
3702
- }[];
3703
- threadsScraped?: number;
3704
- candidatesFound?: number;
3705
- /** @description true if scraping stopped early at the time limit. */
3706
- partial?: boolean;
3707
- /** @description The Google site:reddit.com query used for discovery. */
3708
- searchQuery?: string;
3709
- };
3742
+ "application/json": components["schemas"]["RedditTrendingResponse"];
3710
3743
  };
3711
3744
  };
3712
3745
  400: components["responses"]["BadRequest"];
@@ -4902,6 +4935,7 @@ declare class RedditNamespace {
4902
4935
  author?: string | null;
4903
4936
  score?: string | null;
4904
4937
  postBody?: string;
4938
+ publishedAt?: string | null;
4905
4939
  numComments?: number;
4906
4940
  comments?: {
4907
4941
  author?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpscraper-sdk",
3
- "version": "0.54.1",
3
+ "version": "0.56.0",
4
4
  "description": "Official Node.js client for all 347 mcpscraper.dev MCP tools and the REST API",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,7 +32,7 @@
32
32
  "seo-api"
33
33
  ],
34
34
  "dependencies": {
35
- "mcpscraper-memory-sdk": "^0.53.1"
35
+ "mcpscraper-memory-sdk": "^0.55.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "openapi-typescript": "^7.13.0"