mcp-scraper 0.95.2 → 0.96.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 (121) hide show
  1. package/CHANGELOG.md +67 -1
  2. package/README.md +21 -3
  3. package/dist/actions-R4EJDLRO.js +1 -0
  4. package/dist/artifacts-4ZDNP2JW.js +1 -0
  5. package/dist/artifacts-N62OPIT5.js +1 -0
  6. package/dist/artifacts-PSADD5OC.js +1 -0
  7. package/dist/artifacts-RUR3OHAK.js +1 -0
  8. package/dist/bin/api-server.js +1 -1
  9. package/dist/bin/mcp-scraper-cli.js +22 -22
  10. package/dist/bin/mcp-scraper-core.js +1 -1
  11. package/dist/bin/mcp-scraper-install.js +1 -1
  12. package/dist/bin/mcp-stdio-server.js +1 -1
  13. package/dist/bin/paa-harvest.js +1 -1
  14. package/dist/blob-store-GIH26EDO.js +1 -0
  15. package/dist/bundle-FCXZMIRB.js +1 -0
  16. package/dist/chunk-24YDQ3EO.js +5 -0
  17. package/dist/chunk-3F7AFM53.js +1 -0
  18. package/dist/chunk-4HZXATHB.js +27 -0
  19. package/dist/chunk-55ZANTHL.js +3 -0
  20. package/dist/chunk-5BKSKLHX.js +1 -0
  21. package/dist/chunk-5LYINW7Z.js +8 -0
  22. package/dist/chunk-63VWBMYR.js +3 -0
  23. package/dist/chunk-6BD75VKS.js +218 -0
  24. package/dist/chunk-6N5EC7ZO.js +1 -0
  25. package/dist/chunk-7POHNTVW.js +1 -0
  26. package/dist/chunk-7SR7MEU5.js +62 -0
  27. package/dist/chunk-7WPCGRD7.js +182 -0
  28. package/dist/chunk-B3JRL45T.js +1 -0
  29. package/dist/chunk-B4ZKPLSP.js +1 -0
  30. package/dist/chunk-BPKTUCV7.js +12 -0
  31. package/dist/chunk-C7MGJUTU.js +1 -0
  32. package/dist/{chunk-W2BVJ7S2.js → chunk-CNSVZTTT.js} +4 -4
  33. package/dist/chunk-CORWWDHL.js +1 -0
  34. package/dist/chunk-CVQUHVHX.js +1 -0
  35. package/dist/chunk-FB4KBB5W.js +16 -0
  36. package/dist/{chunk-Y3Q4FIKK.js → chunk-H6MODA7W.js} +199 -84
  37. package/dist/chunk-HCK6PLM3.js +3 -0
  38. package/dist/chunk-HNNYXMSI.js +1 -0
  39. package/dist/chunk-HUNSEGUN.js +57 -0
  40. package/dist/{chunk-MC4W6TZT.js → chunk-HVQZRQRJ.js} +41 -8
  41. package/dist/chunk-IFPION5D.js +121 -0
  42. package/dist/chunk-IY6ZUUY7.js +173 -0
  43. package/dist/chunk-JHT6A4U6.js +11 -0
  44. package/dist/chunk-JMZIDHYQ.js +2 -0
  45. package/dist/chunk-KXJCGV3H.js +1 -0
  46. package/dist/chunk-MVMWPKRC.js +2 -0
  47. package/dist/chunk-NALXKTUU.js +1 -0
  48. package/dist/chunk-NNOX3FYG.js +198 -0
  49. package/dist/chunk-OILOHQNL.js +2 -0
  50. package/dist/chunk-OLYPLX5C.js +1 -0
  51. package/dist/chunk-QER2ELZP.js +1 -0
  52. package/dist/chunk-RDHGQ2WZ.js +1 -0
  53. package/dist/chunk-RIHI3KH7.js +955 -0
  54. package/dist/chunk-RN4VG3VH.js +4 -0
  55. package/dist/chunk-RYX4FJVH.js +1 -0
  56. package/dist/chunk-SDQW7IJN.js +1 -0
  57. package/dist/{chunk-ENZUJEIM.js → chunk-SE4VKLEC.js} +1 -1
  58. package/dist/chunk-SEZETSB3.js +1 -0
  59. package/dist/chunk-SFUOSJ3A.js +159 -0
  60. package/dist/chunk-UIOSADPB.js +1718 -0
  61. package/dist/{chunk-ZH75KWBI.js → chunk-UNEJYZ4T.js} +1 -1
  62. package/dist/chunk-UXNR3K6I.js +1 -0
  63. package/dist/{chunk-VREXSMC6.js → chunk-VVSHZV5S.js} +5 -5
  64. package/dist/chunk-WNUXMPVX.js +1 -0
  65. package/dist/chunk-WP3QS4CJ.js +1 -0
  66. package/dist/chunk-ZTMQEDIB.js +41 -0
  67. package/dist/contracts-GUXGFCVV.js +1 -0
  68. package/dist/core-schema-423BSTE6.js +936 -0
  69. package/dist/dispatch-P7IY75LH.js +1 -0
  70. package/dist/index.cjs +103 -213
  71. package/dist/index.d.cts +184 -169
  72. package/dist/index.d.ts +184 -169
  73. package/dist/index.js +1 -1
  74. package/dist/media-artifacts-67CJWI7O.js +1 -0
  75. package/dist/metering-ZH2P62IC.js +1 -0
  76. package/dist/migrations-3AKEC5QE.js +1 -0
  77. package/dist/queue-AC4XKD6Z.js +1 -0
  78. package/dist/reconciliation-UZUZ6B74.js +1 -0
  79. package/dist/report-artifact-offload-6OOY2PTM.js +1 -0
  80. package/dist/repository-4EC5EXVN.js +1 -0
  81. package/dist/{location-data-repository-A2QZVP7O.js → repository-CYXVMYAI.js} +1 -1
  82. package/dist/server-DXZ27KQO.js +5825 -0
  83. package/dist/settlement-6CS4JZTY.js +1 -0
  84. package/dist/worker-ATRD6VKM.js +1 -0
  85. package/package.json +2 -2
  86. package/dist/analytics-repository-DZZKDZL6.js +0 -1
  87. package/dist/chunk-6DRKDSXY.js +0 -182
  88. package/dist/chunk-6ND5AFV5.js +0 -27
  89. package/dist/chunk-7XDBGQDY.js +0 -6
  90. package/dist/chunk-7YOXSMHG.js +0 -1565
  91. package/dist/chunk-BLVBUMH5.js +0 -21
  92. package/dist/chunk-EDQ57S4P.js +0 -1
  93. package/dist/chunk-GLTECY3U.js +0 -1282
  94. package/dist/chunk-GPSPSJBJ.js +0 -1
  95. package/dist/chunk-HE45FFBU.js +0 -1
  96. package/dist/chunk-HUV2WTRW.js +0 -1
  97. package/dist/chunk-IXJQHXDC.js +0 -2595
  98. package/dist/chunk-K3D2S36Q.js +0 -16
  99. package/dist/chunk-KFOFU3LA.js +0 -1
  100. package/dist/chunk-LMWU7VPZ.js +0 -63
  101. package/dist/chunk-O4LUUIYG.js +0 -4
  102. package/dist/chunk-OLSW4AN4.js +0 -19
  103. package/dist/chunk-RLFCJGHA.js +0 -100
  104. package/dist/chunk-T4VTJNDZ.js +0 -84
  105. package/dist/chunk-TMB56NCA.js +0 -1
  106. package/dist/chunk-VXOXB3IB.js +0 -1
  107. package/dist/chunk-WO3N5FH2.js +0 -5
  108. package/dist/chunk-WO46LTBW.js +0 -1
  109. package/dist/chunk-XPEJB4BZ.js +0 -1
  110. package/dist/db-CDEZHBRN.js +0 -1
  111. package/dist/extract-bundle-SXC6EWJR.js +0 -26
  112. package/dist/gmail-service-EWR76XE7.js +0 -1
  113. package/dist/lead-list-enrichment-repository-SIWGXWQV.js +0 -1
  114. package/dist/operation-metering-UJ53YX7S.js +0 -1
  115. package/dist/server-QVEKDIDQ.js +0 -5014
  116. package/dist/site-extract-repository-23ND4N77.js +0 -1
  117. package/dist/stripe-event-worker-LPXTITVC.js +0 -1
  118. package/dist/worker-EDN2TJH3.js +0 -1
  119. /package/dist/{chunk-YGBTTW5D.js → chunk-2IATUJO6.js} +0 -0
  120. /package/dist/{chunk-6DTXIZY2.js → chunk-4ZVO6GX4.js} +0 -0
  121. /package/dist/{chunk-XG6GCEUE.js → chunk-U4WIJZCX.js} +0 -0
package/dist/index.d.cts CHANGED
@@ -3,10 +3,110 @@ import { z } from 'zod';
3
3
  declare const SERP_FEATURE_COMPLETENESS_STATES: readonly ["observed_present", "observed_absent", "incomplete", "not_requested", "unknown", "unsupported"];
4
4
  type SerpFeatureCompletenessState = typeof SERP_FEATURE_COMPLETENESS_STATES[number];
5
5
 
6
+ type SerpLinkType = 'plain' | 'google_url_redirect' | 'google_goto_redirect';
7
+ type SerpLinkResolutionStatus = 'not_needed' | 'resolved' | 'unresolved' | 'rejected';
8
+ interface SerpOutboundLink {
9
+ url: string;
10
+ rawUrl: string;
11
+ resolvedUrl: string | null;
12
+ linkType: SerpLinkType;
13
+ resolutionStatus: SerpLinkResolutionStatus;
14
+ }
15
+ interface VideoResult {
16
+ type: 'video' | 'short_video';
17
+ title: string;
18
+ channel: string;
19
+ platform: string;
20
+ duration: string;
21
+ url: string;
22
+ }
23
+ interface ForumResult {
24
+ title: string;
25
+ source: string;
26
+ url: string;
27
+ }
28
+ interface WhatPeopleSayingCard {
29
+ type: 'reddit' | 'facebook' | 'instagram' | 'tiktok' | 'youtube' | 'news' | 'unknown';
30
+ title: string;
31
+ url: string;
32
+ source: string;
33
+ platform: string;
34
+ popularComment: string | null;
35
+ engagement: string;
36
+ date: string;
37
+ duration: string | null;
38
+ authorNote: string | null;
39
+ }
40
+ interface AICitation {
41
+ text: string;
42
+ href: string;
43
+ rawUrl: string;
44
+ resolvedUrl: string | null;
45
+ linkType: SerpLinkType;
46
+ resolutionStatus: SerpLinkResolutionStatus;
47
+ }
48
+ interface AIOverviewResult {
49
+ detected: boolean;
50
+ text: string | null;
51
+ citations: AICitation[];
52
+ expanded?: boolean;
53
+ fullyExpanded?: boolean;
54
+ sections?: string[];
55
+ shareUrl?: string | null;
56
+ }
57
+ interface AIModeResult {
58
+ detected: boolean;
59
+ text: string | null;
60
+ citations: AICitation[];
61
+ }
62
+ type GoogleSurface = 'web' | 'aim' | 'unknown';
63
+ interface OrganicResult {
64
+ position: number;
65
+ title: string;
66
+ url: string;
67
+ rawUrl: string;
68
+ resolvedUrl: string | null;
69
+ linkType: SerpLinkType;
70
+ resolutionStatus: SerpLinkResolutionStatus;
71
+ domain: string;
72
+ cite: string | null;
73
+ snippet: string | null;
74
+ isRedditStyle: boolean;
75
+ inlineRating: {
76
+ value: string;
77
+ count: string;
78
+ } | null;
79
+ }
80
+ interface LocalPackBusiness {
81
+ position: number;
82
+ name: string;
83
+ cid: string | null;
84
+ rating: string | null;
85
+ reviewCount: string | null;
86
+ metadata: string[];
87
+ websiteUrl: string | null;
88
+ directionsUrl: string | null;
89
+ }
90
+ interface EntityRecord {
91
+ name: string;
92
+ kgId: string | null;
93
+ cid: string | null;
94
+ gcid: string | null;
95
+ }
96
+ interface EntityIds {
97
+ entities: EntityRecord[];
98
+ kgIds: string[];
99
+ cids: string[];
100
+ gcids: string[];
101
+ }
102
+
6
103
  interface SerpPreviewQuestion {
7
104
  question: string;
8
105
  answer: string | null;
9
106
  url: string | null;
107
+ sourceTitle?: string | null;
108
+ sourceName?: string | null;
109
+ displayLink?: string | null;
10
110
  }
11
111
  interface SerpFeatureItem {
12
112
  title: string | null;
@@ -49,9 +149,9 @@ declare const HarvestOptionsSchema: z.ZodObject<{
49
149
  mobile: "mobile";
50
150
  }>>;
51
151
  proxyMode: z.ZodDefault<z.ZodEnum<{
52
- none: "none";
53
152
  location: "location";
54
153
  configured: "configured";
154
+ none: "none";
55
155
  }>>;
56
156
  proxyZip: z.ZodOptional<z.ZodString>;
57
157
  keepDefaultProxy: z.ZodOptional<z.ZodBoolean>;
@@ -182,6 +282,8 @@ interface PaaProgressSnapshot {
182
282
  interface PaaSource extends SerpOutboundLink {
183
283
  title: string | null;
184
284
  site: string | null;
285
+ /** Description displayed in the Google source card, when observed. */
286
+ description?: string | null;
185
287
  }
186
288
  interface PAANode {
187
289
  questionId: string;
@@ -189,6 +291,8 @@ interface PAANode {
189
291
  googleEvidenceId: string | null;
190
292
  question: string;
191
293
  answer: string | null;
294
+ /** A remaining inner answer control could not be expanded within the capture budget. */
295
+ answerExpansionIncomplete?: boolean;
192
296
  sourceTitle: string | null;
193
297
  sourceSite: string | null;
194
298
  sourceCite: string | null;
@@ -204,6 +308,7 @@ interface FlatRow {
204
308
  google_evidence_id: string;
205
309
  question: string;
206
310
  answer: string;
311
+ answerExpansionIncomplete?: boolean;
207
312
  source_title: string;
208
313
  source_site: string;
209
314
  source_cite: string;
@@ -217,6 +322,7 @@ type HarvestOptions = z.infer<typeof HarvestOptionsSchema>;
217
322
  type CanonicalLocationName = string;
218
323
  type SerpDevice = 'desktop' | 'mobile';
219
324
  type ProxyMode = 'location' | 'configured' | 'none';
325
+
220
326
  interface \u004b\u0065\u0072\u006e\u0065\u006cLocationProxyTarget {
221
327
  canonicalLocation: CanonicalLocationName;
222
328
  level: 'zip' | 'city' | 'state';
@@ -244,6 +350,82 @@ interface \u004b\u0065\u0072\u006e\u0065\u006cProxyResolutionDebug {
244
350
  error: string | null;
245
351
  disposable?: boolean;
246
352
  }
353
+
354
+ interface BrowserNetworkLocationDebug {
355
+ source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
356
+ ip: string | null;
357
+ city: string | null;
358
+ region: string | null;
359
+ country: string | null;
360
+ org: string | null;
361
+ timezone: string | null;
362
+ error: string | null;
363
+ }
364
+ interface \u004b\u0065\u0072\u006e\u0065\u006cSessionDebug {
365
+ sessionId: string | null;
366
+ proxyMode: ProxyMode;
367
+ requestedProxyIdPresent: boolean;
368
+ requestedProxyIdSuffix: string | null;
369
+ createdProxyIdPresent: boolean | null;
370
+ createdProxyIdSuffix: string | null;
371
+ retrievedProxyIdPresent: boolean | null;
372
+ retrievedProxyIdSuffix: string | null;
373
+ retrievedProxyIdMatchesRequested: boolean | null;
374
+ defaultProxyDisabled: boolean | null;
375
+ defaultProxyDisableError: string | null;
376
+ proxyResolution: \u004b\u0065\u0072\u006e\u0065\u006cProxyResolutionDebug | null;
377
+ timeoutSeconds: number | null;
378
+ stealth: boolean | null;
379
+ profilePresent: boolean | null;
380
+ poolPresent: boolean | null;
381
+ retrieveError: string | null;
382
+ }
383
+ interface BrowserContextDebug {
384
+ viewport: {
385
+ width: number;
386
+ height: number;
387
+ } | null;
388
+ locale: string | null;
389
+ device: SerpDevice;
390
+ requestedDevice?: SerpDevice;
391
+ userAgent: string | null;
392
+ deviceScaleFactor: number | null;
393
+ isMobile: boolean;
394
+ hasTouch: boolean;
395
+ }
396
+ interface SerpNavigationDebug {
397
+ requestedUrl: string;
398
+ finalUrl: string | null;
399
+ title: string | null;
400
+ bodySnippet: string | null;
401
+ hasPaa: boolean | null;
402
+ captchaDetected: boolean | null;
403
+ googleSorryUrl: boolean | null;
404
+ redirected: boolean | null;
405
+ }
406
+ interface BrowserDebugSnapshot {
407
+ \u006b\u0065\u0072\u006e\u0065\u006c: \u004b\u0065\u0072\u006e\u0065\u006cSessionDebug | null;
408
+ context: BrowserContextDebug | null;
409
+ networkLocation: BrowserNetworkLocationDebug | null;
410
+ serpNavigation: SerpNavigationDebug | null;
411
+ }
412
+
413
+ interface SerpLocationCandidate {
414
+ city: string;
415
+ regionCode: string;
416
+ count: number;
417
+ examples: string[];
418
+ }
419
+ interface SerpLocationEvidence {
420
+ status: 'not_requested' | 'matched' | 'mismatch' | 'unknown';
421
+ expected: {
422
+ city: string;
423
+ regionCode: string | null;
424
+ canonicalLocation: string;
425
+ } | null;
426
+ candidates: SerpLocationCandidate[];
427
+ }
428
+
247
429
  interface HarvestStats {
248
430
  seed: string;
249
431
  totalQuestions: number;
@@ -270,6 +452,7 @@ interface HarvestDiagnosticWarning {
270
452
  interface HarvestCompleteness {
271
453
  paaWithoutAnswer: number;
272
454
  paaWithoutSource: number;
455
+ paaIncompleteAnswers?: number;
273
456
  paaAnswersRecovered: number;
274
457
  aioShareCaptured: boolean | null;
275
458
  paaRequested?: number;
@@ -329,78 +512,6 @@ interface HarvestLinkDiagnostics {
329
512
  paaSourcesPreserved: number;
330
513
  aiOverviewLabelValidated: boolean;
331
514
  }
332
- interface BrowserNetworkLocationDebug {
333
- source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
334
- ip: string | null;
335
- city: string | null;
336
- region: string | null;
337
- country: string | null;
338
- org: string | null;
339
- timezone: string | null;
340
- error: string | null;
341
- }
342
- interface \u004b\u0065\u0072\u006e\u0065\u006cSessionDebug {
343
- sessionId: string | null;
344
- proxyMode: ProxyMode;
345
- requestedProxyIdPresent: boolean;
346
- requestedProxyIdSuffix: string | null;
347
- createdProxyIdPresent: boolean | null;
348
- createdProxyIdSuffix: string | null;
349
- retrievedProxyIdPresent: boolean | null;
350
- retrievedProxyIdSuffix: string | null;
351
- retrievedProxyIdMatchesRequested: boolean | null;
352
- defaultProxyDisabled: boolean | null;
353
- defaultProxyDisableError: string | null;
354
- proxyResolution: \u004b\u0065\u0072\u006e\u0065\u006cProxyResolutionDebug | null;
355
- timeoutSeconds: number | null;
356
- stealth: boolean | null;
357
- profilePresent: boolean | null;
358
- poolPresent: boolean | null;
359
- retrieveError: string | null;
360
- }
361
- interface BrowserContextDebug {
362
- viewport: {
363
- width: number;
364
- height: number;
365
- };
366
- locale: string;
367
- device: SerpDevice;
368
- userAgent: string | null;
369
- deviceScaleFactor: number | null;
370
- isMobile: boolean;
371
- hasTouch: boolean;
372
- }
373
- interface SerpNavigationDebug {
374
- requestedUrl: string;
375
- finalUrl: string | null;
376
- title: string | null;
377
- bodySnippet: string | null;
378
- hasPaa: boolean | null;
379
- captchaDetected: boolean | null;
380
- googleSorryUrl: boolean | null;
381
- redirected: boolean | null;
382
- }
383
- interface BrowserDebugSnapshot {
384
- \u006b\u0065\u0072\u006e\u0065\u006c: \u004b\u0065\u0072\u006e\u0065\u006cSessionDebug | null;
385
- context: BrowserContextDebug | null;
386
- networkLocation: BrowserNetworkLocationDebug | null;
387
- serpNavigation: SerpNavigationDebug | null;
388
- }
389
- interface SerpLocationCandidate {
390
- city: string;
391
- regionCode: string;
392
- count: number;
393
- examples: string[];
394
- }
395
- interface SerpLocationEvidence {
396
- status: 'not_requested' | 'matched' | 'mismatch' | 'unknown';
397
- expected: {
398
- city: string;
399
- regionCode: string | null;
400
- canonicalLocation: string;
401
- } | null;
402
- candidates: SerpLocationCandidate[];
403
- }
404
515
  interface HarvestDebugSnapshot {
405
516
  enabled: true;
406
517
  request: {
@@ -423,102 +534,6 @@ interface HarvestDebugSnapshot {
423
534
  browser: BrowserDebugSnapshot;
424
535
  locationEvidence?: SerpLocationEvidence;
425
536
  }
426
- type SerpLinkType = 'plain' | 'google_url_redirect' | 'google_goto_redirect';
427
- type SerpLinkResolutionStatus = 'not_needed' | 'resolved' | 'unresolved' | 'rejected';
428
- interface SerpOutboundLink {
429
- url: string;
430
- rawUrl: string;
431
- resolvedUrl: string | null;
432
- linkType: SerpLinkType;
433
- resolutionStatus: SerpLinkResolutionStatus;
434
- }
435
- interface VideoResult {
436
- type: 'video' | 'short_video';
437
- title: string;
438
- channel: string;
439
- platform: string;
440
- duration: string;
441
- url: string;
442
- }
443
- interface ForumResult {
444
- title: string;
445
- source: string;
446
- url: string;
447
- }
448
- interface WhatPeopleSayingCard {
449
- type: 'reddit' | 'facebook' | 'instagram' | 'tiktok' | 'youtube' | 'news' | 'unknown';
450
- title: string;
451
- url: string;
452
- source: string;
453
- platform: string;
454
- popularComment: string | null;
455
- engagement: string;
456
- date: string;
457
- duration: string | null;
458
- authorNote: string | null;
459
- }
460
- interface AICitation {
461
- text: string;
462
- href: string;
463
- rawUrl: string;
464
- resolvedUrl: string | null;
465
- linkType: SerpLinkType;
466
- resolutionStatus: SerpLinkResolutionStatus;
467
- }
468
- interface AIOverviewResult {
469
- detected: boolean;
470
- text: string | null;
471
- citations: AICitation[];
472
- expanded?: boolean;
473
- fullyExpanded?: boolean;
474
- sections?: string[];
475
- shareUrl?: string | null;
476
- }
477
- interface AIModeResult {
478
- detected: boolean;
479
- text: string | null;
480
- citations: AICitation[];
481
- }
482
- type GoogleSurface = 'web' | 'aim' | 'unknown';
483
- interface OrganicResult {
484
- position: number;
485
- title: string;
486
- url: string;
487
- rawUrl: string;
488
- resolvedUrl: string | null;
489
- linkType: SerpLinkType;
490
- resolutionStatus: SerpLinkResolutionStatus;
491
- domain: string;
492
- cite: string | null;
493
- snippet: string | null;
494
- isRedditStyle: boolean;
495
- inlineRating: {
496
- value: string;
497
- count: string;
498
- } | null;
499
- }
500
- interface LocalPackBusiness {
501
- position: number;
502
- name: string;
503
- cid: string | null;
504
- rating: string | null;
505
- reviewCount: string | null;
506
- metadata: string[];
507
- websiteUrl: string | null;
508
- directionsUrl: string | null;
509
- }
510
- interface EntityRecord {
511
- name: string;
512
- kgId: string | null;
513
- cid: string | null;
514
- gcid: string | null;
515
- }
516
- interface EntityIds {
517
- entities: EntityRecord[];
518
- kgIds: string[];
519
- cids: string[];
520
- gcids: string[];
521
- }
522
537
  interface HarvestResult {
523
538
  seed: string;
524
539
  location: string | null;