mcpscraper-sdk 0.23.0 → 0.24.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 +4 -2
- package/dist/index.cjs +16 -3
- package/dist/index.js +16 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ Every non-2xx response throws a `ScraperApiError` with `status`, `code`, and the
|
|
|
40
40
|
|
|
41
41
|
## API surface
|
|
42
42
|
|
|
43
|
-
`client.tools` is the generated, typed
|
|
43
|
+
`client.tools` is the generated, typed 188-tool MCP surface. It includes 87 MCP Scraper tools and all 101 mirrored Memory tools from `contracts/mcp.tools.json`.
|
|
44
44
|
|
|
45
45
|
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.
|
|
46
46
|
|
|
@@ -57,6 +57,8 @@ await client.tools.connections.exportConnectedServiceData({
|
|
|
57
57
|
dataset: 'resend_data',
|
|
58
58
|
lastDays: 7,
|
|
59
59
|
})
|
|
60
|
+
const inbox = await client.tools.schedule.listScheduledRuns({ view: 'inbox' })
|
|
61
|
+
const templates = await client.tools.schedule.listArtifactTemplates({ status: 'active' })
|
|
60
62
|
```
|
|
61
63
|
|
|
62
64
|
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.
|
|
@@ -115,4 +117,4 @@ npm run generate
|
|
|
115
117
|
|
|
116
118
|
## See also
|
|
117
119
|
|
|
118
|
-
[Repo README](../../README.md) (multi-language examples with real sample output) · [`mcpscraper-memory-sdk`](../memory) (Node, full
|
|
120
|
+
[Repo README](../../README.md) (multi-language examples with real sample output) · [`mcpscraper-memory-sdk`](../memory) (Node, full 102-tool direct-memory surface) · [`mcpscraper-sdk` on PyPI](https://pypi.org/project/mcpscraper-sdk/) · [`mcpscraper-cli`](../cli)
|
package/dist/index.cjs
CHANGED
|
@@ -38,16 +38,29 @@ function readString(body, key) {
|
|
|
38
38
|
}
|
|
39
39
|
return void 0;
|
|
40
40
|
}
|
|
41
|
+
var PUBLIC_SERVICE_UNAVAILABLE_MESSAGE = "This operation is temporarily unavailable. Please retry later.";
|
|
42
|
+
function publicErrorBody(status, body) {
|
|
43
|
+
if (status < 500) return body;
|
|
44
|
+
return {
|
|
45
|
+
error: "service_unavailable",
|
|
46
|
+
error_code: "service_unavailable",
|
|
47
|
+
error_type: "service_unavailable",
|
|
48
|
+
retryable: true,
|
|
49
|
+
status,
|
|
50
|
+
message: PUBLIC_SERVICE_UNAVAILABLE_MESSAGE
|
|
51
|
+
};
|
|
52
|
+
}
|
|
41
53
|
var ScraperApiError = class extends Error {
|
|
42
54
|
status;
|
|
43
55
|
code;
|
|
44
56
|
body;
|
|
45
57
|
constructor(status, body) {
|
|
46
|
-
|
|
58
|
+
const safeBody = publicErrorBody(status, body);
|
|
59
|
+
super(readString(safeBody, "message") ?? `mcpscraper.dev API request failed with status ${status}`);
|
|
47
60
|
this.name = "ScraperApiError";
|
|
48
61
|
this.status = status;
|
|
49
|
-
this.code = readString(
|
|
50
|
-
this.body =
|
|
62
|
+
this.code = readString(safeBody, "error_code") ?? readString(safeBody, "error");
|
|
63
|
+
this.body = safeBody;
|
|
51
64
|
}
|
|
52
65
|
isInsufficientBalance() {
|
|
53
66
|
return this.code === "insufficient_balance";
|
package/dist/index.js
CHANGED
|
@@ -6,16 +6,29 @@ function readString(body, key) {
|
|
|
6
6
|
}
|
|
7
7
|
return void 0;
|
|
8
8
|
}
|
|
9
|
+
var PUBLIC_SERVICE_UNAVAILABLE_MESSAGE = "This operation is temporarily unavailable. Please retry later.";
|
|
10
|
+
function publicErrorBody(status, body) {
|
|
11
|
+
if (status < 500) return body;
|
|
12
|
+
return {
|
|
13
|
+
error: "service_unavailable",
|
|
14
|
+
error_code: "service_unavailable",
|
|
15
|
+
error_type: "service_unavailable",
|
|
16
|
+
retryable: true,
|
|
17
|
+
status,
|
|
18
|
+
message: PUBLIC_SERVICE_UNAVAILABLE_MESSAGE
|
|
19
|
+
};
|
|
20
|
+
}
|
|
9
21
|
var ScraperApiError = class extends Error {
|
|
10
22
|
status;
|
|
11
23
|
code;
|
|
12
24
|
body;
|
|
13
25
|
constructor(status, body) {
|
|
14
|
-
|
|
26
|
+
const safeBody = publicErrorBody(status, body);
|
|
27
|
+
super(readString(safeBody, "message") ?? `mcpscraper.dev API request failed with status ${status}`);
|
|
15
28
|
this.name = "ScraperApiError";
|
|
16
29
|
this.status = status;
|
|
17
|
-
this.code = readString(
|
|
18
|
-
this.body =
|
|
30
|
+
this.code = readString(safeBody, "error_code") ?? readString(safeBody, "error");
|
|
31
|
+
this.body = safeBody;
|
|
19
32
|
}
|
|
20
33
|
isInsufficientBalance() {
|
|
21
34
|
return this.code === "insufficient_balance";
|
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.24.0",
|
|
4
|
+
"description": "Official Node.js client for all 188 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.25.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"openapi-typescript": "^7.13.0"
|