mcpscraper-sdk 0.49.1 → 0.50.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
@@ -45,7 +45,7 @@ Google Search light mode returns organic positions, URLs, titles, and descriptio
45
45
 
46
46
  ## API surface
47
47
 
48
- `client.tools` is the generated, typed 362-tool MCP surface from `contracts/mcp.tools.json`, including provider-neutral X-Ray surveys, attribution-impact reporting, and truthful evidence-status operations.
48
+ `client.tools` is the generated, typed 364-tool MCP surface from `contracts/mcp.tools.json`, including provider-neutral X-Ray surveys, attribution-impact reporting, and truthful evidence-status operations.
49
49
 
50
50
  For multimodal results such as `meta_ad_creative_media`, call `client.tools.callToolResult(...)` to preserve native MCP image/audio/resource blocks. `callTool(...)` remains backward-compatible and returns the parsed structured or text value.
51
51
 
package/dist/index.cjs CHANGED
@@ -342,8 +342,43 @@ var MapsNamespace = class {
342
342
  search(params, options = {}) {
343
343
  return this.r.call("POST", "/maps/search", params, {}, options);
344
344
  }
345
- place(params) {
346
- return this.r.call("POST", "/maps/place", params);
345
+ place(params, options = {}) {
346
+ const headers = {
347
+ ...options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {},
348
+ ...options.runId ? { "X-Maps-Run-Id": options.runId } : {}
349
+ };
350
+ return this.r.call("POST", "/maps/place", params, headers, options);
351
+ }
352
+ placeStatus(runId, options = {}) {
353
+ const query = new URLSearchParams();
354
+ if (options.reviewsCursor) query.set("reviewsCursor", options.reviewsCursor);
355
+ if (options.imagesCursor) query.set("imagesCursor", options.imagesCursor);
356
+ if (options.limit != null) query.set("limit", String(options.limit));
357
+ const suffix = query.size ? `?${query.toString()}` : "";
358
+ return this.r.call("GET", `/maps/place/runs/${encodeURIComponent(runId)}${suffix}`);
359
+ }
360
+ placeReviews(runId, cursor, limit) {
361
+ const query = new URLSearchParams();
362
+ if (cursor) query.set("cursor", cursor);
363
+ if (limit != null) query.set("limit", String(limit));
364
+ const suffix = query.size ? `?${query.toString()}` : "";
365
+ return this.r.call("GET", `/maps/place/runs/${encodeURIComponent(runId)}/reviews${suffix}`);
366
+ }
367
+ placeImages(runId, cursor, limit) {
368
+ const query = new URLSearchParams();
369
+ if (cursor) query.set("cursor", cursor);
370
+ if (limit != null) query.set("limit", String(limit));
371
+ const suffix = query.size ? `?${query.toString()}` : "";
372
+ return this.r.call("GET", `/maps/place/runs/${encodeURIComponent(runId)}/images${suffix}`);
373
+ }
374
+ placeResume(runId, resumeIdempotencyKey, options = {}) {
375
+ return this.r.call(
376
+ "POST",
377
+ `/maps/place/runs/${encodeURIComponent(runId)}/resume`,
378
+ void 0,
379
+ { "Idempotency-Key": resumeIdempotencyKey },
380
+ options
381
+ );
347
382
  }
348
383
  };
349
384
  var DirectoryNamespace = class {
package/dist/index.d.cts CHANGED
@@ -42,9 +42,12 @@ interface paths {
42
42
  put?: never;
43
43
  /**
44
44
  * Run a Google SERP search, or a full People-Also-Ask harvest
45
- * @description Set `serpOnly: true` for a pure organic-results/SERP call (20 Credits per
46
- * delivered page, or 35 Credits per delivered page if the backup supplies
47
- * the result). A 35-Credit-per-requested-page hold is settled after delivery.
45
+ * @description Set `serpOnly: true` for a Google search. Light mode returns organic
46
+ * positions, URLs, titles, and descriptions for 20 Credits per delivered
47
+ * page, or 35 Credits when the backup supplies the result. Full mode adds
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.
50
+ * A 35-Credit-per-requested-page hold is settled after delivery.
48
51
  * Omit or set `false` for a full People-Also-Ask harvest, which also returns SERP data
49
52
  * (400 Credit base + 10 Credits per question actually returned; unused estimate is
50
53
  * refunded). Runs synchronously and returns the result inline.
@@ -663,8 +666,8 @@ interface paths {
663
666
  get?: never;
664
667
  put?: never;
665
668
  /**
666
- * Deep-dive one Google Maps business by name and location, with reviews
667
- * @description 60 credits base; +1 credit per review card when `includeReviews` is true.
669
+ * Start a recoverable Google Maps business profile lookup
670
+ * @description Provide an Idempotency-Key and X-Maps-Run-Id to recover an unknown transport outcome. A maximum declared charge is held before browsing; completed work settles at 60 credits plus 1 credit per saved review card.
668
671
  */
669
672
  post: operations["mapsPlaceIntel"];
670
673
  delete?: never;
@@ -673,6 +676,74 @@ interface paths {
673
676
  patch?: never;
674
677
  trace?: never;
675
678
  };
679
+ "/maps/place/runs/{runId}": {
680
+ parameters: {
681
+ query?: never;
682
+ header?: never;
683
+ path?: never;
684
+ cookie?: never;
685
+ };
686
+ /** Read an owner-scoped saved Maps place run */
687
+ get: operations["mapsPlaceStatus"];
688
+ put?: never;
689
+ post?: never;
690
+ delete?: never;
691
+ options?: never;
692
+ head?: never;
693
+ patch?: never;
694
+ trace?: never;
695
+ };
696
+ "/maps/place/runs/{runId}/reviews": {
697
+ parameters: {
698
+ query?: never;
699
+ header?: never;
700
+ path?: never;
701
+ cookie?: never;
702
+ };
703
+ /** Page through saved review cards */
704
+ get: operations["mapsPlaceReviews"];
705
+ put?: never;
706
+ post?: never;
707
+ delete?: never;
708
+ options?: never;
709
+ head?: never;
710
+ patch?: never;
711
+ trace?: never;
712
+ };
713
+ "/maps/place/runs/{runId}/images": {
714
+ parameters: {
715
+ query?: never;
716
+ header?: never;
717
+ path?: never;
718
+ cookie?: never;
719
+ };
720
+ /** Page through saved image references */
721
+ get: operations["mapsPlaceImages"];
722
+ put?: never;
723
+ post?: never;
724
+ delete?: never;
725
+ options?: never;
726
+ head?: never;
727
+ patch?: never;
728
+ trace?: never;
729
+ };
730
+ "/maps/place/runs/{runId}/resume": {
731
+ parameters: {
732
+ query?: never;
733
+ header?: never;
734
+ path?: never;
735
+ cookie?: never;
736
+ };
737
+ get?: never;
738
+ put?: never;
739
+ /** Explicitly resume a partial or reconciled interrupted Maps place run */
740
+ post: operations["mapsPlaceResume"];
741
+ delete?: never;
742
+ options?: never;
743
+ head?: never;
744
+ patch?: never;
745
+ trace?: never;
746
+ };
676
747
  "/directory/run": {
677
748
  parameters: {
678
749
  query?: never;
@@ -1219,10 +1290,16 @@ interface components {
1219
1290
  /** @description Optional US ZIP override. */
1220
1291
  proxyZip?: string;
1221
1292
  /**
1222
- * @description Organic result pages to fetch.
1293
+ * @description Google result pages to fetch. Full mode alone does not request page 2.
1223
1294
  * @default 1
1224
1295
  */
1225
1296
  pages: number;
1297
+ /**
1298
+ * @description For serpOnly searches: light returns organic results; full adds available same-page SERP features.
1299
+ * @default light
1300
+ * @enum {string}
1301
+ */
1302
+ mode: "light" | "full";
1226
1303
  /**
1227
1304
  * @description true = pure SERP call (search_serp); false = full PAA harvest.
1228
1305
  * @default false
@@ -1697,6 +1774,48 @@ interface components {
1697
1774
  includeReviews: boolean;
1698
1775
  /** @default 50 */
1699
1776
  maxReviews: number;
1777
+ /** @default false */
1778
+ includeServices: boolean;
1779
+ /** @default false */
1780
+ includeImages: boolean;
1781
+ include?: ("core" | "hours" | "services" | "areasServed" | "reviews" | "images" | "all")[];
1782
+ /**
1783
+ * @default all
1784
+ * @enum {string}
1785
+ */
1786
+ imageScope: "owner" | "all";
1787
+ /** @default 100 */
1788
+ maxImages: number;
1789
+ /** @default 3 */
1790
+ maxInlineImages: number;
1791
+ };
1792
+ MapsPlaceRunResponse: {
1793
+ /** Format: uuid */
1794
+ runId: string;
1795
+ /** @enum {string} */
1796
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
1797
+ verified: boolean;
1798
+ checkpointRevision: number;
1799
+ billingState: string;
1800
+ name?: string | null;
1801
+ placeUrl?: string | null;
1802
+ completedFields?: string[];
1803
+ pendingFields?: string[];
1804
+ unavailableFields?: string[];
1805
+ reviewsCollected?: number;
1806
+ imagesCollected?: number;
1807
+ reviewsNextCursor?: string | null;
1808
+ imagesNextCursor?: string | null;
1809
+ } & {
1810
+ [key: string]: unknown;
1811
+ };
1812
+ MapsPlaceItemPage: {
1813
+ /** Format: uuid */
1814
+ runId: string;
1815
+ items: {
1816
+ [key: string]: unknown;
1817
+ }[];
1818
+ nextCursor: string | null;
1700
1819
  };
1701
1820
  SerpIntelligenceCaptureRequest: {
1702
1821
  query: string;
@@ -3360,7 +3479,12 @@ interface operations {
3360
3479
  mapsPlaceIntel: {
3361
3480
  parameters: {
3362
3481
  query?: never;
3363
- header?: never;
3482
+ header?: {
3483
+ /** @description Caller-generated key for same-request replay. */
3484
+ "Idempotency-Key"?: string;
3485
+ /** @description Caller-generated run ID for status recovery after response loss. */
3486
+ "X-Maps-Run-Id"?: string;
3487
+ };
3364
3488
  path?: never;
3365
3489
  cookie?: never;
3366
3490
  };
@@ -3370,23 +3494,178 @@ interface operations {
3370
3494
  };
3371
3495
  };
3372
3496
  responses: {
3373
- /** @description Place detail with optional reviews. */
3497
+ /** @description Complete or partial saved place result. */
3374
3498
  200: {
3375
3499
  headers: {
3376
3500
  [name: string]: unknown;
3377
3501
  };
3378
3502
  content: {
3379
- "application/json": {
3380
- [key: string]: unknown;
3381
- };
3503
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3504
+ };
3505
+ };
3506
+ /** @description Running or interrupted place run with any verified checkpoints saved so far. */
3507
+ 202: {
3508
+ headers: {
3509
+ [name: string]: unknown;
3510
+ };
3511
+ content: {
3512
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3382
3513
  };
3383
3514
  };
3384
3515
  400: components["responses"]["BadRequest"];
3385
3516
  402: components["responses"]["InsufficientBalance"];
3386
3517
  429: components["responses"]["ConcurrencyLimitExceeded"];
3387
3518
  500: components["responses"]["ServerError"];
3388
- /** @description Temporarily blocked — retryable. */
3389
- 503: {
3519
+ };
3520
+ };
3521
+ mapsPlaceStatus: {
3522
+ parameters: {
3523
+ query?: {
3524
+ /** @description Opaque saved-review cursor. */
3525
+ reviewsCursor?: string;
3526
+ /** @description Opaque saved-image cursor. */
3527
+ imagesCursor?: string;
3528
+ limit?: number;
3529
+ };
3530
+ header?: never;
3531
+ path: {
3532
+ runId: string;
3533
+ };
3534
+ cookie?: never;
3535
+ };
3536
+ requestBody?: never;
3537
+ responses: {
3538
+ /** @description Saved terminal run */
3539
+ 200: {
3540
+ headers: {
3541
+ [name: string]: unknown;
3542
+ };
3543
+ content: {
3544
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3545
+ };
3546
+ };
3547
+ /** @description Saved running or interrupted run */
3548
+ 202: {
3549
+ headers: {
3550
+ [name: string]: unknown;
3551
+ };
3552
+ content: {
3553
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3554
+ };
3555
+ };
3556
+ /** @description Run not found for this owner. */
3557
+ 404: {
3558
+ headers: {
3559
+ [name: string]: unknown;
3560
+ };
3561
+ content?: never;
3562
+ };
3563
+ };
3564
+ };
3565
+ mapsPlaceReviews: {
3566
+ parameters: {
3567
+ query?: {
3568
+ cursor?: string;
3569
+ limit?: number;
3570
+ };
3571
+ header?: never;
3572
+ path: {
3573
+ runId: string;
3574
+ };
3575
+ cookie?: never;
3576
+ };
3577
+ requestBody?: never;
3578
+ responses: {
3579
+ /** @description Saved review page with items and nextCursor. */
3580
+ 200: {
3581
+ headers: {
3582
+ [name: string]: unknown;
3583
+ };
3584
+ content: {
3585
+ "application/json": components["schemas"]["MapsPlaceItemPage"];
3586
+ };
3587
+ };
3588
+ /** @description Run not found for this owner. */
3589
+ 404: {
3590
+ headers: {
3591
+ [name: string]: unknown;
3592
+ };
3593
+ content?: never;
3594
+ };
3595
+ };
3596
+ };
3597
+ mapsPlaceImages: {
3598
+ parameters: {
3599
+ query?: {
3600
+ cursor?: string;
3601
+ limit?: number;
3602
+ };
3603
+ header?: never;
3604
+ path: {
3605
+ runId: string;
3606
+ };
3607
+ cookie?: never;
3608
+ };
3609
+ requestBody?: never;
3610
+ responses: {
3611
+ /** @description Saved image page with items and nextCursor. */
3612
+ 200: {
3613
+ headers: {
3614
+ [name: string]: unknown;
3615
+ };
3616
+ content: {
3617
+ "application/json": components["schemas"]["MapsPlaceItemPage"];
3618
+ };
3619
+ };
3620
+ /** @description Run not found for this owner. */
3621
+ 404: {
3622
+ headers: {
3623
+ [name: string]: unknown;
3624
+ };
3625
+ content?: never;
3626
+ };
3627
+ };
3628
+ };
3629
+ mapsPlaceResume: {
3630
+ parameters: {
3631
+ query?: never;
3632
+ header: {
3633
+ "Idempotency-Key": string;
3634
+ };
3635
+ path: {
3636
+ runId: string;
3637
+ };
3638
+ cookie?: never;
3639
+ };
3640
+ requestBody?: never;
3641
+ responses: {
3642
+ /** @description Saved terminal run. */
3643
+ 200: {
3644
+ headers: {
3645
+ [name: string]: unknown;
3646
+ };
3647
+ content: {
3648
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3649
+ };
3650
+ };
3651
+ /** @description Resumed attempt in progress. */
3652
+ 202: {
3653
+ headers: {
3654
+ [name: string]: unknown;
3655
+ };
3656
+ content: {
3657
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3658
+ };
3659
+ };
3660
+ /** @description Run not found for this owner. */
3661
+ 404: {
3662
+ headers: {
3663
+ [name: string]: unknown;
3664
+ };
3665
+ content?: never;
3666
+ };
3667
+ /** @description Run or previous billing state cannot resume. */
3668
+ 409: {
3390
3669
  headers: {
3391
3670
  [name: string]: unknown;
3392
3671
  };
@@ -4390,7 +4669,79 @@ declare class MapsNamespace {
4390
4669
  search(params: RequestBodyOf<'mapsSearch'>, options?: ScraperRequestOptions): Promise<{
4391
4670
  [key: string]: unknown;
4392
4671
  }>;
4393
- place(params: RequestBodyOf<'mapsPlaceIntel'>): Promise<{
4672
+ place(params: RequestBodyOf<'mapsPlaceIntel'>, options?: ScraperRequestOptions & {
4673
+ idempotencyKey?: string;
4674
+ runId?: string;
4675
+ }): Promise<{
4676
+ runId: string;
4677
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
4678
+ verified: boolean;
4679
+ checkpointRevision: number;
4680
+ billingState: string;
4681
+ name?: string | null;
4682
+ placeUrl?: string | null;
4683
+ completedFields?: string[];
4684
+ pendingFields?: string[];
4685
+ unavailableFields?: string[];
4686
+ reviewsCollected?: number;
4687
+ imagesCollected?: number;
4688
+ reviewsNextCursor?: string | null;
4689
+ imagesNextCursor?: string | null;
4690
+ } & {
4691
+ [key: string]: unknown;
4692
+ }>;
4693
+ placeStatus(runId: string, options?: {
4694
+ reviewsCursor?: string;
4695
+ imagesCursor?: string;
4696
+ limit?: number;
4697
+ }): Promise<{
4698
+ runId: string;
4699
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
4700
+ verified: boolean;
4701
+ checkpointRevision: number;
4702
+ billingState: string;
4703
+ name?: string | null;
4704
+ placeUrl?: string | null;
4705
+ completedFields?: string[];
4706
+ pendingFields?: string[];
4707
+ unavailableFields?: string[];
4708
+ reviewsCollected?: number;
4709
+ imagesCollected?: number;
4710
+ reviewsNextCursor?: string | null;
4711
+ imagesNextCursor?: string | null;
4712
+ } & {
4713
+ [key: string]: unknown;
4714
+ }>;
4715
+ placeReviews(runId: string, cursor?: string, limit?: number): Promise<{
4716
+ runId: string;
4717
+ items: {
4718
+ [key: string]: unknown;
4719
+ }[];
4720
+ nextCursor: string | null;
4721
+ }>;
4722
+ placeImages(runId: string, cursor?: string, limit?: number): Promise<{
4723
+ runId: string;
4724
+ items: {
4725
+ [key: string]: unknown;
4726
+ }[];
4727
+ nextCursor: string | null;
4728
+ }>;
4729
+ placeResume(runId: string, resumeIdempotencyKey: string, options?: ScraperRequestOptions): Promise<{
4730
+ runId: string;
4731
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
4732
+ verified: boolean;
4733
+ checkpointRevision: number;
4734
+ billingState: string;
4735
+ name?: string | null;
4736
+ placeUrl?: string | null;
4737
+ completedFields?: string[];
4738
+ pendingFields?: string[];
4739
+ unavailableFields?: string[];
4740
+ reviewsCollected?: number;
4741
+ imagesCollected?: number;
4742
+ reviewsNextCursor?: string | null;
4743
+ imagesNextCursor?: string | null;
4744
+ } & {
4394
4745
  [key: string]: unknown;
4395
4746
  }>;
4396
4747
  }
package/dist/index.d.ts CHANGED
@@ -42,9 +42,12 @@ interface paths {
42
42
  put?: never;
43
43
  /**
44
44
  * Run a Google SERP search, or a full People-Also-Ask harvest
45
- * @description Set `serpOnly: true` for a pure organic-results/SERP call (20 Credits per
46
- * delivered page, or 35 Credits per delivered page if the backup supplies
47
- * the result). A 35-Credit-per-requested-page hold is settled after delivery.
45
+ * @description Set `serpOnly: true` for a Google search. Light mode returns organic
46
+ * positions, URLs, titles, and descriptions for 20 Credits per delivered
47
+ * page, or 35 Credits when the backup supplies the result. Full mode adds
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.
50
+ * A 35-Credit-per-requested-page hold is settled after delivery.
48
51
  * Omit or set `false` for a full People-Also-Ask harvest, which also returns SERP data
49
52
  * (400 Credit base + 10 Credits per question actually returned; unused estimate is
50
53
  * refunded). Runs synchronously and returns the result inline.
@@ -663,8 +666,8 @@ interface paths {
663
666
  get?: never;
664
667
  put?: never;
665
668
  /**
666
- * Deep-dive one Google Maps business by name and location, with reviews
667
- * @description 60 credits base; +1 credit per review card when `includeReviews` is true.
669
+ * Start a recoverable Google Maps business profile lookup
670
+ * @description Provide an Idempotency-Key and X-Maps-Run-Id to recover an unknown transport outcome. A maximum declared charge is held before browsing; completed work settles at 60 credits plus 1 credit per saved review card.
668
671
  */
669
672
  post: operations["mapsPlaceIntel"];
670
673
  delete?: never;
@@ -673,6 +676,74 @@ interface paths {
673
676
  patch?: never;
674
677
  trace?: never;
675
678
  };
679
+ "/maps/place/runs/{runId}": {
680
+ parameters: {
681
+ query?: never;
682
+ header?: never;
683
+ path?: never;
684
+ cookie?: never;
685
+ };
686
+ /** Read an owner-scoped saved Maps place run */
687
+ get: operations["mapsPlaceStatus"];
688
+ put?: never;
689
+ post?: never;
690
+ delete?: never;
691
+ options?: never;
692
+ head?: never;
693
+ patch?: never;
694
+ trace?: never;
695
+ };
696
+ "/maps/place/runs/{runId}/reviews": {
697
+ parameters: {
698
+ query?: never;
699
+ header?: never;
700
+ path?: never;
701
+ cookie?: never;
702
+ };
703
+ /** Page through saved review cards */
704
+ get: operations["mapsPlaceReviews"];
705
+ put?: never;
706
+ post?: never;
707
+ delete?: never;
708
+ options?: never;
709
+ head?: never;
710
+ patch?: never;
711
+ trace?: never;
712
+ };
713
+ "/maps/place/runs/{runId}/images": {
714
+ parameters: {
715
+ query?: never;
716
+ header?: never;
717
+ path?: never;
718
+ cookie?: never;
719
+ };
720
+ /** Page through saved image references */
721
+ get: operations["mapsPlaceImages"];
722
+ put?: never;
723
+ post?: never;
724
+ delete?: never;
725
+ options?: never;
726
+ head?: never;
727
+ patch?: never;
728
+ trace?: never;
729
+ };
730
+ "/maps/place/runs/{runId}/resume": {
731
+ parameters: {
732
+ query?: never;
733
+ header?: never;
734
+ path?: never;
735
+ cookie?: never;
736
+ };
737
+ get?: never;
738
+ put?: never;
739
+ /** Explicitly resume a partial or reconciled interrupted Maps place run */
740
+ post: operations["mapsPlaceResume"];
741
+ delete?: never;
742
+ options?: never;
743
+ head?: never;
744
+ patch?: never;
745
+ trace?: never;
746
+ };
676
747
  "/directory/run": {
677
748
  parameters: {
678
749
  query?: never;
@@ -1219,10 +1290,16 @@ interface components {
1219
1290
  /** @description Optional US ZIP override. */
1220
1291
  proxyZip?: string;
1221
1292
  /**
1222
- * @description Organic result pages to fetch.
1293
+ * @description Google result pages to fetch. Full mode alone does not request page 2.
1223
1294
  * @default 1
1224
1295
  */
1225
1296
  pages: number;
1297
+ /**
1298
+ * @description For serpOnly searches: light returns organic results; full adds available same-page SERP features.
1299
+ * @default light
1300
+ * @enum {string}
1301
+ */
1302
+ mode: "light" | "full";
1226
1303
  /**
1227
1304
  * @description true = pure SERP call (search_serp); false = full PAA harvest.
1228
1305
  * @default false
@@ -1697,6 +1774,48 @@ interface components {
1697
1774
  includeReviews: boolean;
1698
1775
  /** @default 50 */
1699
1776
  maxReviews: number;
1777
+ /** @default false */
1778
+ includeServices: boolean;
1779
+ /** @default false */
1780
+ includeImages: boolean;
1781
+ include?: ("core" | "hours" | "services" | "areasServed" | "reviews" | "images" | "all")[];
1782
+ /**
1783
+ * @default all
1784
+ * @enum {string}
1785
+ */
1786
+ imageScope: "owner" | "all";
1787
+ /** @default 100 */
1788
+ maxImages: number;
1789
+ /** @default 3 */
1790
+ maxInlineImages: number;
1791
+ };
1792
+ MapsPlaceRunResponse: {
1793
+ /** Format: uuid */
1794
+ runId: string;
1795
+ /** @enum {string} */
1796
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
1797
+ verified: boolean;
1798
+ checkpointRevision: number;
1799
+ billingState: string;
1800
+ name?: string | null;
1801
+ placeUrl?: string | null;
1802
+ completedFields?: string[];
1803
+ pendingFields?: string[];
1804
+ unavailableFields?: string[];
1805
+ reviewsCollected?: number;
1806
+ imagesCollected?: number;
1807
+ reviewsNextCursor?: string | null;
1808
+ imagesNextCursor?: string | null;
1809
+ } & {
1810
+ [key: string]: unknown;
1811
+ };
1812
+ MapsPlaceItemPage: {
1813
+ /** Format: uuid */
1814
+ runId: string;
1815
+ items: {
1816
+ [key: string]: unknown;
1817
+ }[];
1818
+ nextCursor: string | null;
1700
1819
  };
1701
1820
  SerpIntelligenceCaptureRequest: {
1702
1821
  query: string;
@@ -3360,7 +3479,12 @@ interface operations {
3360
3479
  mapsPlaceIntel: {
3361
3480
  parameters: {
3362
3481
  query?: never;
3363
- header?: never;
3482
+ header?: {
3483
+ /** @description Caller-generated key for same-request replay. */
3484
+ "Idempotency-Key"?: string;
3485
+ /** @description Caller-generated run ID for status recovery after response loss. */
3486
+ "X-Maps-Run-Id"?: string;
3487
+ };
3364
3488
  path?: never;
3365
3489
  cookie?: never;
3366
3490
  };
@@ -3370,23 +3494,178 @@ interface operations {
3370
3494
  };
3371
3495
  };
3372
3496
  responses: {
3373
- /** @description Place detail with optional reviews. */
3497
+ /** @description Complete or partial saved place result. */
3374
3498
  200: {
3375
3499
  headers: {
3376
3500
  [name: string]: unknown;
3377
3501
  };
3378
3502
  content: {
3379
- "application/json": {
3380
- [key: string]: unknown;
3381
- };
3503
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3504
+ };
3505
+ };
3506
+ /** @description Running or interrupted place run with any verified checkpoints saved so far. */
3507
+ 202: {
3508
+ headers: {
3509
+ [name: string]: unknown;
3510
+ };
3511
+ content: {
3512
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3382
3513
  };
3383
3514
  };
3384
3515
  400: components["responses"]["BadRequest"];
3385
3516
  402: components["responses"]["InsufficientBalance"];
3386
3517
  429: components["responses"]["ConcurrencyLimitExceeded"];
3387
3518
  500: components["responses"]["ServerError"];
3388
- /** @description Temporarily blocked — retryable. */
3389
- 503: {
3519
+ };
3520
+ };
3521
+ mapsPlaceStatus: {
3522
+ parameters: {
3523
+ query?: {
3524
+ /** @description Opaque saved-review cursor. */
3525
+ reviewsCursor?: string;
3526
+ /** @description Opaque saved-image cursor. */
3527
+ imagesCursor?: string;
3528
+ limit?: number;
3529
+ };
3530
+ header?: never;
3531
+ path: {
3532
+ runId: string;
3533
+ };
3534
+ cookie?: never;
3535
+ };
3536
+ requestBody?: never;
3537
+ responses: {
3538
+ /** @description Saved terminal run */
3539
+ 200: {
3540
+ headers: {
3541
+ [name: string]: unknown;
3542
+ };
3543
+ content: {
3544
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3545
+ };
3546
+ };
3547
+ /** @description Saved running or interrupted run */
3548
+ 202: {
3549
+ headers: {
3550
+ [name: string]: unknown;
3551
+ };
3552
+ content: {
3553
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3554
+ };
3555
+ };
3556
+ /** @description Run not found for this owner. */
3557
+ 404: {
3558
+ headers: {
3559
+ [name: string]: unknown;
3560
+ };
3561
+ content?: never;
3562
+ };
3563
+ };
3564
+ };
3565
+ mapsPlaceReviews: {
3566
+ parameters: {
3567
+ query?: {
3568
+ cursor?: string;
3569
+ limit?: number;
3570
+ };
3571
+ header?: never;
3572
+ path: {
3573
+ runId: string;
3574
+ };
3575
+ cookie?: never;
3576
+ };
3577
+ requestBody?: never;
3578
+ responses: {
3579
+ /** @description Saved review page with items and nextCursor. */
3580
+ 200: {
3581
+ headers: {
3582
+ [name: string]: unknown;
3583
+ };
3584
+ content: {
3585
+ "application/json": components["schemas"]["MapsPlaceItemPage"];
3586
+ };
3587
+ };
3588
+ /** @description Run not found for this owner. */
3589
+ 404: {
3590
+ headers: {
3591
+ [name: string]: unknown;
3592
+ };
3593
+ content?: never;
3594
+ };
3595
+ };
3596
+ };
3597
+ mapsPlaceImages: {
3598
+ parameters: {
3599
+ query?: {
3600
+ cursor?: string;
3601
+ limit?: number;
3602
+ };
3603
+ header?: never;
3604
+ path: {
3605
+ runId: string;
3606
+ };
3607
+ cookie?: never;
3608
+ };
3609
+ requestBody?: never;
3610
+ responses: {
3611
+ /** @description Saved image page with items and nextCursor. */
3612
+ 200: {
3613
+ headers: {
3614
+ [name: string]: unknown;
3615
+ };
3616
+ content: {
3617
+ "application/json": components["schemas"]["MapsPlaceItemPage"];
3618
+ };
3619
+ };
3620
+ /** @description Run not found for this owner. */
3621
+ 404: {
3622
+ headers: {
3623
+ [name: string]: unknown;
3624
+ };
3625
+ content?: never;
3626
+ };
3627
+ };
3628
+ };
3629
+ mapsPlaceResume: {
3630
+ parameters: {
3631
+ query?: never;
3632
+ header: {
3633
+ "Idempotency-Key": string;
3634
+ };
3635
+ path: {
3636
+ runId: string;
3637
+ };
3638
+ cookie?: never;
3639
+ };
3640
+ requestBody?: never;
3641
+ responses: {
3642
+ /** @description Saved terminal run. */
3643
+ 200: {
3644
+ headers: {
3645
+ [name: string]: unknown;
3646
+ };
3647
+ content: {
3648
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3649
+ };
3650
+ };
3651
+ /** @description Resumed attempt in progress. */
3652
+ 202: {
3653
+ headers: {
3654
+ [name: string]: unknown;
3655
+ };
3656
+ content: {
3657
+ "application/json": components["schemas"]["MapsPlaceRunResponse"];
3658
+ };
3659
+ };
3660
+ /** @description Run not found for this owner. */
3661
+ 404: {
3662
+ headers: {
3663
+ [name: string]: unknown;
3664
+ };
3665
+ content?: never;
3666
+ };
3667
+ /** @description Run or previous billing state cannot resume. */
3668
+ 409: {
3390
3669
  headers: {
3391
3670
  [name: string]: unknown;
3392
3671
  };
@@ -4390,7 +4669,79 @@ declare class MapsNamespace {
4390
4669
  search(params: RequestBodyOf<'mapsSearch'>, options?: ScraperRequestOptions): Promise<{
4391
4670
  [key: string]: unknown;
4392
4671
  }>;
4393
- place(params: RequestBodyOf<'mapsPlaceIntel'>): Promise<{
4672
+ place(params: RequestBodyOf<'mapsPlaceIntel'>, options?: ScraperRequestOptions & {
4673
+ idempotencyKey?: string;
4674
+ runId?: string;
4675
+ }): Promise<{
4676
+ runId: string;
4677
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
4678
+ verified: boolean;
4679
+ checkpointRevision: number;
4680
+ billingState: string;
4681
+ name?: string | null;
4682
+ placeUrl?: string | null;
4683
+ completedFields?: string[];
4684
+ pendingFields?: string[];
4685
+ unavailableFields?: string[];
4686
+ reviewsCollected?: number;
4687
+ imagesCollected?: number;
4688
+ reviewsNextCursor?: string | null;
4689
+ imagesNextCursor?: string | null;
4690
+ } & {
4691
+ [key: string]: unknown;
4692
+ }>;
4693
+ placeStatus(runId: string, options?: {
4694
+ reviewsCursor?: string;
4695
+ imagesCursor?: string;
4696
+ limit?: number;
4697
+ }): Promise<{
4698
+ runId: string;
4699
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
4700
+ verified: boolean;
4701
+ checkpointRevision: number;
4702
+ billingState: string;
4703
+ name?: string | null;
4704
+ placeUrl?: string | null;
4705
+ completedFields?: string[];
4706
+ pendingFields?: string[];
4707
+ unavailableFields?: string[];
4708
+ reviewsCollected?: number;
4709
+ imagesCollected?: number;
4710
+ reviewsNextCursor?: string | null;
4711
+ imagesNextCursor?: string | null;
4712
+ } & {
4713
+ [key: string]: unknown;
4714
+ }>;
4715
+ placeReviews(runId: string, cursor?: string, limit?: number): Promise<{
4716
+ runId: string;
4717
+ items: {
4718
+ [key: string]: unknown;
4719
+ }[];
4720
+ nextCursor: string | null;
4721
+ }>;
4722
+ placeImages(runId: string, cursor?: string, limit?: number): Promise<{
4723
+ runId: string;
4724
+ items: {
4725
+ [key: string]: unknown;
4726
+ }[];
4727
+ nextCursor: string | null;
4728
+ }>;
4729
+ placeResume(runId: string, resumeIdempotencyKey: string, options?: ScraperRequestOptions): Promise<{
4730
+ runId: string;
4731
+ runStatus: "queued" | "running" | "interrupted" | "complete" | "partial" | "failed" | "cancelled";
4732
+ verified: boolean;
4733
+ checkpointRevision: number;
4734
+ billingState: string;
4735
+ name?: string | null;
4736
+ placeUrl?: string | null;
4737
+ completedFields?: string[];
4738
+ pendingFields?: string[];
4739
+ unavailableFields?: string[];
4740
+ reviewsCollected?: number;
4741
+ imagesCollected?: number;
4742
+ reviewsNextCursor?: string | null;
4743
+ imagesNextCursor?: string | null;
4744
+ } & {
4394
4745
  [key: string]: unknown;
4395
4746
  }>;
4396
4747
  }
package/dist/index.js CHANGED
@@ -328,8 +328,43 @@ var MapsNamespace = class {
328
328
  search(params, options = {}) {
329
329
  return this.r.call("POST", "/maps/search", params, {}, options);
330
330
  }
331
- place(params) {
332
- return this.r.call("POST", "/maps/place", params);
331
+ place(params, options = {}) {
332
+ const headers = {
333
+ ...options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {},
334
+ ...options.runId ? { "X-Maps-Run-Id": options.runId } : {}
335
+ };
336
+ return this.r.call("POST", "/maps/place", params, headers, options);
337
+ }
338
+ placeStatus(runId, options = {}) {
339
+ const query = new URLSearchParams();
340
+ if (options.reviewsCursor) query.set("reviewsCursor", options.reviewsCursor);
341
+ if (options.imagesCursor) query.set("imagesCursor", options.imagesCursor);
342
+ if (options.limit != null) query.set("limit", String(options.limit));
343
+ const suffix = query.size ? `?${query.toString()}` : "";
344
+ return this.r.call("GET", `/maps/place/runs/${encodeURIComponent(runId)}${suffix}`);
345
+ }
346
+ placeReviews(runId, cursor, limit) {
347
+ const query = new URLSearchParams();
348
+ if (cursor) query.set("cursor", cursor);
349
+ if (limit != null) query.set("limit", String(limit));
350
+ const suffix = query.size ? `?${query.toString()}` : "";
351
+ return this.r.call("GET", `/maps/place/runs/${encodeURIComponent(runId)}/reviews${suffix}`);
352
+ }
353
+ placeImages(runId, cursor, limit) {
354
+ const query = new URLSearchParams();
355
+ if (cursor) query.set("cursor", cursor);
356
+ if (limit != null) query.set("limit", String(limit));
357
+ const suffix = query.size ? `?${query.toString()}` : "";
358
+ return this.r.call("GET", `/maps/place/runs/${encodeURIComponent(runId)}/images${suffix}`);
359
+ }
360
+ placeResume(runId, resumeIdempotencyKey, options = {}) {
361
+ return this.r.call(
362
+ "POST",
363
+ `/maps/place/runs/${encodeURIComponent(runId)}/resume`,
364
+ void 0,
365
+ { "Idempotency-Key": resumeIdempotencyKey },
366
+ options
367
+ );
333
368
  }
334
369
  };
335
370
  var DirectoryNamespace = class {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mcpscraper-sdk",
3
- "version": "0.49.1",
4
- "description": "Official Node.js client for all 362 mcpscraper.dev MCP tools and the REST API",
3
+ "version": "0.50.0",
4
+ "description": "Official Node.js client for all 364 mcpscraper.dev MCP tools and the REST API",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
@@ -31,7 +31,7 @@
31
31
  "seo-api"
32
32
  ],
33
33
  "dependencies": {
34
- "mcpscraper-memory-sdk": "^0.49.1"
34
+ "mcpscraper-memory-sdk": "^0.50.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "openapi-typescript": "^7.13.0"