mcpscraper-sdk 0.55.0 → 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
@@ -193,7 +193,7 @@ 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.55.0 release notes](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.55.0).
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
 
@@ -206,3 +206,23 @@ export artifact ID with `artifact_download`, `artifact_read` or `artifact_descri
206
206
  to generate Markdown from retained JSON without repeating acquisition. The
207
207
  [on-demand export example](https://github.com/VilovietaSEO/mcpscraper-sdk/blob/v0.55.0/examples/serp-on-demand-export.mjs)
208
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
@@ -562,7 +562,7 @@ interface paths {
562
562
  put?: never;
563
563
  /**
564
564
  * Capture a Reddit post and its comment tree
565
- * @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.
566
566
  */
567
567
  post: operations["redditThread"];
568
568
  delete?: never;
@@ -582,13 +582,14 @@ interface paths {
582
582
  put?: never;
583
583
  /**
584
584
  * Discover and rank the top recent Reddit threads for a topic
585
- * @description Finds relevant recent Reddit threads via a Google site:reddit.com search over a week/month window,
586
- * then (by default) scrapes them all in parallel for real upvotes, comments, and the questions people
587
- * asked, and ranks by engagement (upvotes + 2x comments). Billing: one discovery debit plus, when
588
- * includeComments is true, 30 credits per scraped thread and 2 credits per captured comment, each
589
- * refunded on failure. Set includeComments:false for a cheap discovery-only sweep (thread list, no
590
- * engagement stats, no per-thread billing). Scraping respects a soft deadline and returns partial:true
591
- * 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.
592
593
  */
593
594
  post: operations["redditTrending"];
594
595
  delete?: never;
@@ -2366,6 +2367,108 @@ interface components {
2366
2367
  } & {
2367
2368
  [key: string]: unknown;
2368
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";
2369
2472
  MapsSearchRequest: {
2370
2473
  query: string;
2371
2474
  location?: string;
@@ -3591,11 +3694,7 @@ interface operations {
3591
3694
  };
3592
3695
  requestBody: {
3593
3696
  content: {
3594
- "application/json": {
3595
- /** @description A reddit.com or redd.it thread URL. */
3596
- url: string;
3597
- maxComments?: number;
3598
- };
3697
+ "application/json": components["schemas"]["RedditThreadRequest"];
3599
3698
  };
3600
3699
  };
3601
3700
  responses: {
@@ -3605,20 +3704,7 @@ interface operations {
3605
3704
  [name: string]: unknown;
3606
3705
  };
3607
3706
  content: {
3608
- "application/json": {
3609
- title?: string;
3610
- author?: string | null;
3611
- score?: string | null;
3612
- postBody?: string;
3613
- numComments?: number;
3614
- comments?: {
3615
- author?: string | null;
3616
- score?: string;
3617
- depth?: number;
3618
- body?: string;
3619
- }[];
3620
- sourceUrl?: string;
3621
- };
3707
+ "application/json": components["schemas"]["RedditThreadResponse"];
3622
3708
  };
3623
3709
  };
3624
3710
  400: components["responses"]["BadRequest"];
@@ -3643,33 +3729,7 @@ interface operations {
3643
3729
  };
3644
3730
  requestBody: {
3645
3731
  content: {
3646
- "application/json": {
3647
- /** @description Topic in plain words, e.g. "crm for small business". Not a URL. */
3648
- topic: string;
3649
- /** @description Bare subreddit name to scope the scan, e.g. "SEO" (no r/ prefix). Omit to scan all of Reddit. */
3650
- subreddit?: string;
3651
- /**
3652
- * @description How recent the threads must be.
3653
- * @default month
3654
- * @enum {string}
3655
- */
3656
- window?: "week" | "month";
3657
- /**
3658
- * @description How many discovered threads to scrape and rank (scrape-all default). Lower to cap cost.
3659
- * @default 20
3660
- */
3661
- maxThreads?: number;
3662
- /**
3663
- * @description true = scrape each thread for engagement + questions and rank; false = cheap discovery-only list.
3664
- * @default true
3665
- */
3666
- includeComments?: boolean;
3667
- /**
3668
- * @description Comments captured (and billed) per scraped thread when includeComments is true.
3669
- * @default 50
3670
- */
3671
- maxCommentsPerThread?: number;
3672
- };
3732
+ "application/json": components["schemas"]["RedditTrendingRequest"];
3673
3733
  };
3674
3734
  };
3675
3735
  responses: {
@@ -3679,37 +3739,7 @@ interface operations {
3679
3739
  [name: string]: unknown;
3680
3740
  };
3681
3741
  content: {
3682
- "application/json": {
3683
- topic?: string;
3684
- subreddit?: string | null;
3685
- /** @description Resolved window, e.g. "7d" or "30d". */
3686
- window?: string;
3687
- totals?: {
3688
- threads?: number;
3689
- upvotes?: number;
3690
- comments?: number;
3691
- };
3692
- rankedThreads?: {
3693
- title?: string;
3694
- url?: string;
3695
- subreddit?: string;
3696
- score?: number;
3697
- commentCount?: number;
3698
- engagementScore?: number;
3699
- ageText?: string;
3700
- topQuestions?: string[];
3701
- }[];
3702
- questions?: {
3703
- question?: string;
3704
- threadUrl?: string;
3705
- }[];
3706
- threadsScraped?: number;
3707
- candidatesFound?: number;
3708
- /** @description true if scraping stopped early at the time limit. */
3709
- partial?: boolean;
3710
- /** @description The Google site:reddit.com query used for discovery. */
3711
- searchQuery?: string;
3712
- };
3742
+ "application/json": components["schemas"]["RedditTrendingResponse"];
3713
3743
  };
3714
3744
  };
3715
3745
  400: components["responses"]["BadRequest"];
@@ -4905,6 +4935,7 @@ declare class RedditNamespace {
4905
4935
  author?: string | null;
4906
4936
  score?: string | null;
4907
4937
  postBody?: string;
4938
+ publishedAt?: string | null;
4908
4939
  numComments?: number;
4909
4940
  comments?: {
4910
4941
  author?: string | null;
package/dist/index.d.ts CHANGED
@@ -562,7 +562,7 @@ interface paths {
562
562
  put?: never;
563
563
  /**
564
564
  * Capture a Reddit post and its comment tree
565
- * @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.
566
566
  */
567
567
  post: operations["redditThread"];
568
568
  delete?: never;
@@ -582,13 +582,14 @@ interface paths {
582
582
  put?: never;
583
583
  /**
584
584
  * Discover and rank the top recent Reddit threads for a topic
585
- * @description Finds relevant recent Reddit threads via a Google site:reddit.com search over a week/month window,
586
- * then (by default) scrapes them all in parallel for real upvotes, comments, and the questions people
587
- * asked, and ranks by engagement (upvotes + 2x comments). Billing: one discovery debit plus, when
588
- * includeComments is true, 30 credits per scraped thread and 2 credits per captured comment, each
589
- * refunded on failure. Set includeComments:false for a cheap discovery-only sweep (thread list, no
590
- * engagement stats, no per-thread billing). Scraping respects a soft deadline and returns partial:true
591
- * 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.
592
593
  */
593
594
  post: operations["redditTrending"];
594
595
  delete?: never;
@@ -2366,6 +2367,108 @@ interface components {
2366
2367
  } & {
2367
2368
  [key: string]: unknown;
2368
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";
2369
2472
  MapsSearchRequest: {
2370
2473
  query: string;
2371
2474
  location?: string;
@@ -3591,11 +3694,7 @@ interface operations {
3591
3694
  };
3592
3695
  requestBody: {
3593
3696
  content: {
3594
- "application/json": {
3595
- /** @description A reddit.com or redd.it thread URL. */
3596
- url: string;
3597
- maxComments?: number;
3598
- };
3697
+ "application/json": components["schemas"]["RedditThreadRequest"];
3599
3698
  };
3600
3699
  };
3601
3700
  responses: {
@@ -3605,20 +3704,7 @@ interface operations {
3605
3704
  [name: string]: unknown;
3606
3705
  };
3607
3706
  content: {
3608
- "application/json": {
3609
- title?: string;
3610
- author?: string | null;
3611
- score?: string | null;
3612
- postBody?: string;
3613
- numComments?: number;
3614
- comments?: {
3615
- author?: string | null;
3616
- score?: string;
3617
- depth?: number;
3618
- body?: string;
3619
- }[];
3620
- sourceUrl?: string;
3621
- };
3707
+ "application/json": components["schemas"]["RedditThreadResponse"];
3622
3708
  };
3623
3709
  };
3624
3710
  400: components["responses"]["BadRequest"];
@@ -3643,33 +3729,7 @@ interface operations {
3643
3729
  };
3644
3730
  requestBody: {
3645
3731
  content: {
3646
- "application/json": {
3647
- /** @description Topic in plain words, e.g. "crm for small business". Not a URL. */
3648
- topic: string;
3649
- /** @description Bare subreddit name to scope the scan, e.g. "SEO" (no r/ prefix). Omit to scan all of Reddit. */
3650
- subreddit?: string;
3651
- /**
3652
- * @description How recent the threads must be.
3653
- * @default month
3654
- * @enum {string}
3655
- */
3656
- window?: "week" | "month";
3657
- /**
3658
- * @description How many discovered threads to scrape and rank (scrape-all default). Lower to cap cost.
3659
- * @default 20
3660
- */
3661
- maxThreads?: number;
3662
- /**
3663
- * @description true = scrape each thread for engagement + questions and rank; false = cheap discovery-only list.
3664
- * @default true
3665
- */
3666
- includeComments?: boolean;
3667
- /**
3668
- * @description Comments captured (and billed) per scraped thread when includeComments is true.
3669
- * @default 50
3670
- */
3671
- maxCommentsPerThread?: number;
3672
- };
3732
+ "application/json": components["schemas"]["RedditTrendingRequest"];
3673
3733
  };
3674
3734
  };
3675
3735
  responses: {
@@ -3679,37 +3739,7 @@ interface operations {
3679
3739
  [name: string]: unknown;
3680
3740
  };
3681
3741
  content: {
3682
- "application/json": {
3683
- topic?: string;
3684
- subreddit?: string | null;
3685
- /** @description Resolved window, e.g. "7d" or "30d". */
3686
- window?: string;
3687
- totals?: {
3688
- threads?: number;
3689
- upvotes?: number;
3690
- comments?: number;
3691
- };
3692
- rankedThreads?: {
3693
- title?: string;
3694
- url?: string;
3695
- subreddit?: string;
3696
- score?: number;
3697
- commentCount?: number;
3698
- engagementScore?: number;
3699
- ageText?: string;
3700
- topQuestions?: string[];
3701
- }[];
3702
- questions?: {
3703
- question?: string;
3704
- threadUrl?: string;
3705
- }[];
3706
- threadsScraped?: number;
3707
- candidatesFound?: number;
3708
- /** @description true if scraping stopped early at the time limit. */
3709
- partial?: boolean;
3710
- /** @description The Google site:reddit.com query used for discovery. */
3711
- searchQuery?: string;
3712
- };
3742
+ "application/json": components["schemas"]["RedditTrendingResponse"];
3713
3743
  };
3714
3744
  };
3715
3745
  400: components["responses"]["BadRequest"];
@@ -4905,6 +4935,7 @@ declare class RedditNamespace {
4905
4935
  author?: string | null;
4906
4936
  score?: string | null;
4907
4937
  postBody?: string;
4938
+ publishedAt?: string | null;
4908
4939
  numComments?: number;
4909
4940
  comments?: {
4910
4941
  author?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpscraper-sdk",
3
- "version": "0.55.0",
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.54.0"
35
+ "mcpscraper-memory-sdk": "^0.55.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "openapi-typescript": "^7.13.0"