mcpscraper-sdk 0.29.0 → 0.30.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.
- package/README.md +16 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Current Google search pricing is 60 Credits per SERP search and 400 Credits plus
|
|
|
45
45
|
|
|
46
46
|
## API surface
|
|
47
47
|
|
|
48
|
-
`client.tools` is the generated, typed
|
|
48
|
+
`client.tools` is the generated, typed 259-tool MCP surface. It includes 158 MCP Scraper tools and all 101 mirrored Memory tools from `contracts/mcp.tools.json`.
|
|
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
|
|
|
@@ -66,6 +66,21 @@ const inbox = await client.tools.schedule.listScheduledRuns({ view: 'inbox' })
|
|
|
66
66
|
const templates = await client.tools.schedule.listArtifactTemplates({ status: 'active' })
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
Lead enrichment is available through the same generated surface. Supply mapped rows directly, or call `client.tools.leads.import(...)` first for CSV/TSV/XLSX input:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
const job = await client.tools.leads.enrich({
|
|
73
|
+
idempotencyKey: crypto.randomUUID(),
|
|
74
|
+
source: { kind: 'rows', rows: [{ Business: 'White Rock Roofing', City: 'Dallas', Website: 'https://roofwhiterock.com' }] },
|
|
75
|
+
columnMap: { name: 'Business', city: 'City', websiteUrl: 'Website' },
|
|
76
|
+
defaultEntityType: 'business',
|
|
77
|
+
emailSearchFallback: 'serp_snippets',
|
|
78
|
+
peopleDiscovery: 'owners',
|
|
79
|
+
peopleQueryTemplates: ['{business} owner of company {city}', '{business} founder {city}'],
|
|
80
|
+
outputFormats: ['csv', 'xlsx'],
|
|
81
|
+
})
|
|
82
|
+
```
|
|
83
|
+
|
|
69
84
|
The connected-data export performs bounded Gmail, Calendar, Google Search Console, Zoom, Meta Marketing, or Resend pagination server-side and returns small results inline or a private seven-day JSONL artifact. Use `exportConnectedServiceData({ dataset: 'search_console_performance' })` for a fresh Search Console API extract. A scheduled `connection_sync` maintains a typed `gsc_performance_*` table exposed as `listServiceConnections().tableName`; use `exportSearchConsoleTableData` for a server-filtered download from that persisted table. Use `meta_ads_insights` for daily account, campaign, ad-set, and ad reporting across connected Meta ad accounts. Resend can aggregate sent/received mail, logs, contacts, broadcasts, and templates with `resend_data`. Resume partial exports with the returned `continuation` object; renew an expired signed URL with `client.tools.connections.renewConnectedDataDownload({ artifactId })`. Use `listServiceConnections` for verified grants and per-tool permission blockers, then `describeServiceConnectionTool` for the exact provider-native schema before calling through the generic connection bridges.
|
|
70
85
|
|
|
71
86
|
Search Console also provides six API-only batches through those connection bridges: reads `inspect-urls` and `query-search-analytics-batch`, and gated actions `add-sites-batch`, `submit-sitemaps-batch`, `delete-sites-batch`, and `delete-sitemaps-batch`. They require no database, return per-item receipts, and can be bound to scheduled agent runs. Delete batches default to dry-run and require the live schema's exact confirmation token for execution; all actions require the connection's action switch.
|
package/dist/index.cjs
CHANGED
|
@@ -189,7 +189,7 @@ var Requester = class {
|
|
|
189
189
|
error: "mcp_request_timeout",
|
|
190
190
|
error_code: "mcp_request_timeout",
|
|
191
191
|
error_type: "timeout",
|
|
192
|
-
message: `
|
|
192
|
+
message: `The client stopped waiting after ${Math.round(this.timeoutMs / 1e3)}s. This does not prove server-side work stopped; use the same Idempotency-Key or poll a returned job before starting a new paid run.`,
|
|
193
193
|
retryable: true
|
|
194
194
|
});
|
|
195
195
|
}
|
|
@@ -457,7 +457,7 @@ var ScraperClient = class {
|
|
|
457
457
|
memoryTools;
|
|
458
458
|
tools;
|
|
459
459
|
constructor(options) {
|
|
460
|
-
const requestTimeoutMs = options.requestTimeoutMs ??
|
|
460
|
+
const requestTimeoutMs = options.requestTimeoutMs ?? 59e4;
|
|
461
461
|
if (!Number.isFinite(requestTimeoutMs) || requestTimeoutMs <= 0) throw new TypeError("requestTimeoutMs must be a positive number");
|
|
462
462
|
this.r = new Requester(options.apiKey, options.baseUrl ?? "https://mcpscraper.dev", options.fetch ?? globalThis.fetch, requestTimeoutMs);
|
|
463
463
|
this.youtube = new YoutubeNamespace(this.r);
|
package/dist/index.d.cts
CHANGED
|
@@ -3484,7 +3484,7 @@ interface ScraperClientOptions {
|
|
|
3484
3484
|
apiKey: string;
|
|
3485
3485
|
baseUrl?: string;
|
|
3486
3486
|
fetch?: typeof globalThis.fetch;
|
|
3487
|
-
/** Bounded HTTP
|
|
3487
|
+
/** Bounded HTTP wait window for every request. Defaults to 590 seconds. */
|
|
3488
3488
|
requestTimeoutMs?: number;
|
|
3489
3489
|
}
|
|
3490
3490
|
interface IdempotentRequestOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -3484,7 +3484,7 @@ interface ScraperClientOptions {
|
|
|
3484
3484
|
apiKey: string;
|
|
3485
3485
|
baseUrl?: string;
|
|
3486
3486
|
fetch?: typeof globalThis.fetch;
|
|
3487
|
-
/** Bounded HTTP
|
|
3487
|
+
/** Bounded HTTP wait window for every request. Defaults to 590 seconds. */
|
|
3488
3488
|
requestTimeoutMs?: number;
|
|
3489
3489
|
}
|
|
3490
3490
|
interface IdempotentRequestOptions {
|
package/dist/index.js
CHANGED
|
@@ -174,7 +174,7 @@ var Requester = class {
|
|
|
174
174
|
error: "mcp_request_timeout",
|
|
175
175
|
error_code: "mcp_request_timeout",
|
|
176
176
|
error_type: "timeout",
|
|
177
|
-
message: `
|
|
177
|
+
message: `The client stopped waiting after ${Math.round(this.timeoutMs / 1e3)}s. This does not prove server-side work stopped; use the same Idempotency-Key or poll a returned job before starting a new paid run.`,
|
|
178
178
|
retryable: true
|
|
179
179
|
});
|
|
180
180
|
}
|
|
@@ -442,7 +442,7 @@ var ScraperClient = class {
|
|
|
442
442
|
memoryTools;
|
|
443
443
|
tools;
|
|
444
444
|
constructor(options) {
|
|
445
|
-
const requestTimeoutMs = options.requestTimeoutMs ??
|
|
445
|
+
const requestTimeoutMs = options.requestTimeoutMs ?? 59e4;
|
|
446
446
|
if (!Number.isFinite(requestTimeoutMs) || requestTimeoutMs <= 0) throw new TypeError("requestTimeoutMs must be a positive number");
|
|
447
447
|
this.r = new Requester(options.apiKey, options.baseUrl ?? "https://mcpscraper.dev", options.fetch ?? globalThis.fetch, requestTimeoutMs);
|
|
448
448
|
this.youtube = new YoutubeNamespace(this.r);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpscraper-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Official Node.js client for all
|
|
3
|
+
"version": "0.30.1",
|
|
4
|
+
"description": "Official Node.js client for all 259 mcpscraper.dev MCP tools and the REST API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"seo-api"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"mcpscraper-memory-sdk": "^0.
|
|
35
|
+
"mcpscraper-memory-sdk": "^0.31.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"openapi-typescript": "^7.13.0"
|