mcpscraper-sdk 0.50.1 → 0.52.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
@@ -4,7 +4,7 @@ Official TypeScript/JavaScript client for the [mcpscraper.dev](https://mcpscrape
4
4
 
5
5
  [Release history](https://github.com/VilovietaSEO/mcpscraper-sdk/blob/main/CHANGELOG.md)
6
6
 
7
- This is a thin HTTP client generated against [`../../contracts/scraper.openapi.yaml`](../../contracts/scraper.openapi.yaml), the public contract for the hosted API. It contains no scraping, proxy, or billing logic — only typed request/response plumbing.
7
+ This is a thin HTTP client generated against [`../../contracts/scraper.openapi.generated.json`](../../contracts/scraper.openapi.generated.json), the complete public REST contract for the hosted API. It contains no scraping, proxy, or billing logic — only typed request/response plumbing.
8
8
 
9
9
  ## Install
10
10
 
@@ -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; request two pages explicitly for organic results only at 40 Credits. 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 use a managed browser for organic results at 35 Credits per delivered page, and unfiltered searches use it only as the final backup. 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
 
@@ -181,14 +181,15 @@ Use `mcpscraper-memory-sdk`'s `MemoryClient` when you prefer its Memory-first na
181
181
 
182
182
  ## Regenerating types
183
183
 
184
- `src/schema.ts` is generated from the OpenAPI spec and checked in. After editing `../../contracts/scraper.openapi.yaml`, regenerate with:
184
+ `src/schema.ts` is generated from the complete OpenAPI projection and checked in. For server-owned Maps search and directory routes, update `contracts/server-rest.v1.json` from the server artifact. Other public routes remain in the curated `contracts/scraper.openapi.yaml` base. Regenerate both language models from the repository root:
185
185
 
186
186
  ```bash
187
- npm run generate
187
+ npm run generate:rest
188
+ npm run verify:rest-contract
188
189
  ```
189
190
 
190
191
  ## See also
191
192
 
192
193
  [Repo README](../../README.md) (multi-language examples with real sample output) · [`mcpscraper-memory-sdk`](../memory) (Node, full 121-tool direct-memory surface) · [`mcpscraper-sdk` on PyPI](https://pypi.org/project/mcpscraper-sdk/) · [`mcpscraper-cli`](../cli)
193
194
 
194
- Release changes: [SDK 0.50.1 release notes](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.50.1).
195
+ Release changes: [SDK 0.52.0 release notes](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.52.0).
package/dist/index.cjs CHANGED
@@ -340,7 +340,8 @@ var MapsNamespace = class {
340
340
  }
341
341
  r;
342
342
  search(params, options = {}) {
343
- return this.r.call("POST", "/maps/search", params, {}, options);
343
+ const headers = options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {};
344
+ return this.r.call("POST", "/maps/search", params, headers, options);
344
345
  }
345
346
  place(params, options = {}) {
346
347
  const headers = {
@@ -386,8 +387,17 @@ var DirectoryNamespace = class {
386
387
  this.r = r;
387
388
  }
388
389
  r;
389
- run(params) {
390
- return this.r.call("POST", "/directory/run", params);
390
+ run(params, options = {}) {
391
+ return this.r.call(
392
+ "POST",
393
+ "/directory/run",
394
+ params,
395
+ options.idempotencyKey ? { "Idempotency-Key": options.idempotencyKey } : {},
396
+ options
397
+ );
398
+ }
399
+ status(jobId, options = {}) {
400
+ return this.r.call("GET", `/directory/jobs/${encodeURIComponent(jobId)}`, void 0, {}, options);
391
401
  }
392
402
  };
393
403
  var SerpIntelligenceNamespace = class {