mcpscraper-sdk 0.56.0 → 0.58.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 +9 -1
- package/dist/index.cjs +11 -0
- package/dist/index.d.cts +304 -0
- package/dist/index.d.ts +304 -0
- package/dist/index.js +11 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Official TypeScript/JavaScript client for the [mcpscraper.dev](https://mcpscraper.dev) REST API — SERP search, People-Also-Ask harvesting, single-page and whole-site extraction, YouTube, Facebook/Google Ads Transparency, Instagram, Reddit, video breakdown, Google Maps, and directory/rank-tracking workflows.
|
|
4
4
|
|
|
5
|
-
[Release history](https://github.com/VilovietaSEO/mcpscraper-sdk/
|
|
5
|
+
[Release history](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.58.0)
|
|
6
6
|
|
|
7
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
|
|
|
@@ -226,3 +226,11 @@ shows both paths.
|
|
|
226
226
|
## Saved Maps reviews
|
|
227
227
|
|
|
228
228
|
Server 0.100.1 improves Maps discovery, review text and list collection through the existing interfaces. Use the exact name and location returned by discovery. Read the saved run and its review pages before considering a new acquisition. An explicit resume uses a fresh browser and reopens the profile and reviews; it retains saved review IDs. A new resume key authorizes a separately billed attempt, while repeating that key reads the same run.
|
|
229
|
+
|
|
230
|
+
## Bug Reporting
|
|
231
|
+
|
|
232
|
+
Use `bug_reporting` to prepare a redacted draft from observed calls and errors. Review the returned report, then submit its exact `reportId` and `reviewToken` only when the user requests submission. Status returns the private receipt. The support team receives the report and verified account email. Drafts expire after one day; submitted reports after 365 days. See [the complete workflow](https://github.com/VilovietaSEO/mcpscraper-sdk/blob/v0.57.0/examples/bug-reporting.mjs) and [release history](https://github.com/VilovietaSEO/mcpscraper-sdk/releases/tag/v0.57.0).
|
|
233
|
+
|
|
234
|
+
## Consistent hosted MCP protocol
|
|
235
|
+
|
|
236
|
+
This release targets MCP Scraper 0.102.0 with 349 tools. Calls use protocol `2026-07-28` with matching routing headers and request metadata. Poll the returned job/run ID through its dedicated status tool; MCP Task handles are no longer supported. Lead enrichment cancellation uses `lead_list_enrich_cancel`. Update the SDK packages together.
|
package/dist/index.cjs
CHANGED
|
@@ -673,6 +673,17 @@ var ScraperClient = class {
|
|
|
673
673
|
options
|
|
674
674
|
);
|
|
675
675
|
}
|
|
676
|
+
async bugReporting(params, options = {}) {
|
|
677
|
+
try {
|
|
678
|
+
return await this.r.call("POST", "/bugs/report", params, {}, options);
|
|
679
|
+
} catch (error) {
|
|
680
|
+
if (error instanceof ScraperApiError && error.code === "mcp_request_timeout") {
|
|
681
|
+
const message = params.action === "prepare" || params.action === void 0 ? "Draft preparation was not confirmed. An unreturned draft expires after one day; prepare never submits a report." : "Submission was not confirmed. Read status with the same reportId, then retry submit with the same reportId and reviewToken if needed. Bug Reporting is free.";
|
|
682
|
+
throw new ScraperApiError(408, { error_code: "mcp_request_timeout", error_type: "timeout", message, retryable: true, charge_status: "not_charged" }, { requestId: error.requestId });
|
|
683
|
+
}
|
|
684
|
+
throw error;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
676
687
|
searchSerp(params, options = {}) {
|
|
677
688
|
return this.r.call("POST", "/harvest/sync", { ...params, serpOnly: true }, {}, options);
|
|
678
689
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,26 @@ export { ArtifactDelivery, ClientAttribution, ClientMetadataOptions, DeliveredNa
|
|
|
6
6
|
* Do not make direct changes to the file.
|
|
7
7
|
*/
|
|
8
8
|
interface paths {
|
|
9
|
+
"/bugs/report": {
|
|
10
|
+
parameters: {
|
|
11
|
+
query?: never;
|
|
12
|
+
header?: never;
|
|
13
|
+
path?: never;
|
|
14
|
+
cookie?: never;
|
|
15
|
+
};
|
|
16
|
+
get?: never;
|
|
17
|
+
put?: never;
|
|
18
|
+
/**
|
|
19
|
+
* Prepare, submit or read a private bug report
|
|
20
|
+
* @description Prepare a redacted one-day draft from observed evidence. Submit its exact reportId and reviewToken only at the user’s request. Submitted reports and verified account email are shared with private support for 365 days. Free; status and repeated submit are safe.
|
|
21
|
+
*/
|
|
22
|
+
post: operations["bugReporting"];
|
|
23
|
+
delete?: never;
|
|
24
|
+
options?: never;
|
|
25
|
+
head?: never;
|
|
26
|
+
patch?: never;
|
|
27
|
+
trace?: never;
|
|
28
|
+
};
|
|
9
29
|
"/harvest": {
|
|
10
30
|
parameters: {
|
|
11
31
|
query?: never;
|
|
@@ -2469,6 +2489,158 @@ interface components {
|
|
|
2469
2489
|
RedditCommentCoverageStatus: "complete" | "partial";
|
|
2470
2490
|
/** @enum {string} */
|
|
2471
2491
|
RedditCommentCoverageReason: "requested_limit_reached" | "declared_count_reached" | "stable_visible_shortfall" | "capture_shortfall" | "funding_limited";
|
|
2492
|
+
BugReportingRequest: {
|
|
2493
|
+
/**
|
|
2494
|
+
* @description prepare saves a private one-day draft for review; submit sends that exact draft to support; status reads your report receipt.
|
|
2495
|
+
* @default prepare
|
|
2496
|
+
* @enum {string}
|
|
2497
|
+
*/
|
|
2498
|
+
action: "prepare" | "submit" | "status";
|
|
2499
|
+
/** @description Required for prepare. Collect known evidence from the conversation before asking the user for missing details. */
|
|
2500
|
+
report?: {
|
|
2501
|
+
/** @description Short description of the problem in plain language. */
|
|
2502
|
+
title: string;
|
|
2503
|
+
/** @description What the user was trying to accomplish, using their words. */
|
|
2504
|
+
goal: string;
|
|
2505
|
+
/** @description What should have happened. */
|
|
2506
|
+
expected: string;
|
|
2507
|
+
/** @description What actually happened. Separate observations from suspected causes. */
|
|
2508
|
+
actual: string;
|
|
2509
|
+
/** @description Ordered reproduction steps, including retries and what changed. */
|
|
2510
|
+
steps: string[];
|
|
2511
|
+
/** @description Calls in the order made. Include successful calls that explain the failure. */
|
|
2512
|
+
attempts: {
|
|
2513
|
+
/** @description Exact tool name or REST method and path. */
|
|
2514
|
+
tool: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* Format: date-time
|
|
2517
|
+
* @description Observed call time with timezone; omit if unknown.
|
|
2518
|
+
*/
|
|
2519
|
+
submittedAt?: string;
|
|
2520
|
+
/** @description Exact submitted arguments as JSON or text. Remove credentials, cookies and unrelated private content first. Do not reconstruct unknown arguments. */
|
|
2521
|
+
arguments: string;
|
|
2522
|
+
/** @description Observed response or error text, including error codes and retry outcome. Remove secrets. */
|
|
2523
|
+
result: string;
|
|
2524
|
+
/** @description Returned request ID, when available. */
|
|
2525
|
+
requestId?: string;
|
|
2526
|
+
/** @description Returned job or run ID, when available. */
|
|
2527
|
+
jobId?: string;
|
|
2528
|
+
}[];
|
|
2529
|
+
/** @description Observed client environment; use unknown rather than guessing. */
|
|
2530
|
+
client: {
|
|
2531
|
+
/** @description Observed application or SDK name. */
|
|
2532
|
+
name: string;
|
|
2533
|
+
/** @description Observed application or package version; omit if unknown. */
|
|
2534
|
+
version?: string;
|
|
2535
|
+
/**
|
|
2536
|
+
* @description Connection or install route used for the failed calls.
|
|
2537
|
+
* @enum {string}
|
|
2538
|
+
*/
|
|
2539
|
+
transport: "oauth" | "api-key" | "npx" | "npm" | "sdk" | "mcpb" | "rest" | "unknown";
|
|
2540
|
+
/** @description Observed operating system; omit if unknown. */
|
|
2541
|
+
operatingSystem?: string;
|
|
2542
|
+
/** @description Observed AI model; omit if unknown. */
|
|
2543
|
+
model?: string;
|
|
2544
|
+
};
|
|
2545
|
+
/** @description Impact, frequency, useful prior context, and suspected cause clearly labeled as a guess. No full conversation dump. */
|
|
2546
|
+
context?: string;
|
|
2547
|
+
/**
|
|
2548
|
+
* @description Evidence that is unknown or unavailable; do not invent it.
|
|
2549
|
+
* @default []
|
|
2550
|
+
*/
|
|
2551
|
+
missing: string[];
|
|
2552
|
+
};
|
|
2553
|
+
/**
|
|
2554
|
+
* Format: uuid
|
|
2555
|
+
* @description ID returned by prepare; required for submit or status.
|
|
2556
|
+
*/
|
|
2557
|
+
reportId?: string;
|
|
2558
|
+
/** @description Exact token returned by prepare; required for submit. A changed report requires a new prepare. */
|
|
2559
|
+
reviewToken?: string;
|
|
2560
|
+
/** @description Set true only when the user has asked to submit this bug or approved the reviewed draft. Repeated errors alone do not authorize submission. */
|
|
2561
|
+
userApproved?: boolean;
|
|
2562
|
+
};
|
|
2563
|
+
BugReportingResponse: {
|
|
2564
|
+
/** @enum {boolean} */
|
|
2565
|
+
ok: true;
|
|
2566
|
+
accountEmail: string;
|
|
2567
|
+
/** Format: uuid */
|
|
2568
|
+
reportId: string;
|
|
2569
|
+
/** @enum {string} */
|
|
2570
|
+
status: "draft" | "submitted";
|
|
2571
|
+
receivedAt: string;
|
|
2572
|
+
submittedAt: string | null;
|
|
2573
|
+
expiresAt: string;
|
|
2574
|
+
report: {
|
|
2575
|
+
/** @description Short description of the problem in plain language. */
|
|
2576
|
+
title: string;
|
|
2577
|
+
/** @description What the user was trying to accomplish, using their words. */
|
|
2578
|
+
goal: string;
|
|
2579
|
+
/** @description What should have happened. */
|
|
2580
|
+
expected: string;
|
|
2581
|
+
/** @description What actually happened. Separate observations from suspected causes. */
|
|
2582
|
+
actual: string;
|
|
2583
|
+
/** @description Ordered reproduction steps, including retries and what changed. */
|
|
2584
|
+
steps: string[];
|
|
2585
|
+
/** @description Calls in the order made. Include successful calls that explain the failure. */
|
|
2586
|
+
attempts: {
|
|
2587
|
+
/** @description Exact tool name or REST method and path. */
|
|
2588
|
+
tool: string;
|
|
2589
|
+
/**
|
|
2590
|
+
* Format: date-time
|
|
2591
|
+
* @description Observed call time with timezone; omit if unknown.
|
|
2592
|
+
*/
|
|
2593
|
+
submittedAt?: string;
|
|
2594
|
+
/** @description Exact submitted arguments as JSON or text. Remove credentials, cookies and unrelated private content first. Do not reconstruct unknown arguments. */
|
|
2595
|
+
arguments: string;
|
|
2596
|
+
/** @description Observed response or error text, including error codes and retry outcome. Remove secrets. */
|
|
2597
|
+
result: string;
|
|
2598
|
+
/** @description Returned request ID, when available. */
|
|
2599
|
+
requestId?: string;
|
|
2600
|
+
/** @description Returned job or run ID, when available. */
|
|
2601
|
+
jobId?: string;
|
|
2602
|
+
}[];
|
|
2603
|
+
/** @description Observed client environment; use unknown rather than guessing. */
|
|
2604
|
+
client: {
|
|
2605
|
+
/** @description Observed application or SDK name. */
|
|
2606
|
+
name: string;
|
|
2607
|
+
/** @description Observed application or package version; omit if unknown. */
|
|
2608
|
+
version?: string;
|
|
2609
|
+
/**
|
|
2610
|
+
* @description Connection or install route used for the failed calls.
|
|
2611
|
+
* @enum {string}
|
|
2612
|
+
*/
|
|
2613
|
+
transport: "oauth" | "api-key" | "npx" | "npm" | "sdk" | "mcpb" | "rest" | "unknown";
|
|
2614
|
+
/** @description Observed operating system; omit if unknown. */
|
|
2615
|
+
operatingSystem?: string;
|
|
2616
|
+
/** @description Observed AI model; omit if unknown. */
|
|
2617
|
+
model?: string;
|
|
2618
|
+
};
|
|
2619
|
+
/** @description Impact, frequency, useful prior context, and suspected cause clearly labeled as a guess. No full conversation dump. */
|
|
2620
|
+
context?: string;
|
|
2621
|
+
/**
|
|
2622
|
+
* @description Evidence that is unknown or unavailable; do not invent it.
|
|
2623
|
+
* @default []
|
|
2624
|
+
*/
|
|
2625
|
+
missing: string[];
|
|
2626
|
+
};
|
|
2627
|
+
reviewToken?: string;
|
|
2628
|
+
redacted: boolean;
|
|
2629
|
+
message: string;
|
|
2630
|
+
};
|
|
2631
|
+
BugReportingError: {
|
|
2632
|
+
error?: string;
|
|
2633
|
+
/** @enum {string} */
|
|
2634
|
+
error_code: "request_aborted" | "captcha_exhausted" | "captcha_or_blocked" | "location_mismatch" | "proxy_tunnel_failed" | "proxy_unavailable" | "harvest_timeout" | "mcp_request_timeout" | "mcp_http_error" | "extraction_failed" | "concurrency_limit_exceeded" | "unauthorized" | "forbidden" | "invalid_request" | "rate_limited" | "upstream_rate_limited" | "insufficient_balance" | "service_unavailable" | "response_lost" | "vendor_unavailable" | "page_not_found" | "page_forbidden" | "page_rate_limited" | "page_server_error" | "page_http_error" | "bot_check_unresolved" | "page_too_large" | "page_unreachable" | "browser_session_interrupted" | "site_export_not_found" | "directory_job_not_found" | "site_export_format_unavailable" | "site_export_read_failed" | "site_export_image_not_found" | "image_url_invalid" | "image_url_not_https" | "image_host_unresolvable" | "image_host_blocked" | "image_redirect_invalid" | "image_source_unavailable" | "image_too_large" | "image_redirect_limit" | "image_base64_invalid" | "image_source_missing" | "image_source_ambiguous" | "image_source_type_invalid" | "image_artifact_not_found" | "image_page_too_large" | "page_image_not_found" | "page_image_candidates_unusable" | "image_format_unsupported" | "image_storage_unconfigured" | "featured_image_unhostable";
|
|
2635
|
+
/** @enum {string} */
|
|
2636
|
+
error_type: "request_aborted" | "captcha" | "location_mismatch" | "connection" | "timeout" | "extraction" | "concurrency_limit" | "unauthorized" | "forbidden" | "invalid_request" | "not_found" | "rate_limit" | "billing" | "service_unavailable";
|
|
2637
|
+
message: string;
|
|
2638
|
+
retryable: boolean;
|
|
2639
|
+
/** @enum {string} */
|
|
2640
|
+
charge_status: "not_charged";
|
|
2641
|
+
} & {
|
|
2642
|
+
[key: string]: unknown;
|
|
2643
|
+
};
|
|
2472
2644
|
MapsSearchRequest: {
|
|
2473
2645
|
query: string;
|
|
2474
2646
|
location?: string;
|
|
@@ -2748,6 +2920,102 @@ interface components {
|
|
|
2748
2920
|
pathItems: never;
|
|
2749
2921
|
}
|
|
2750
2922
|
interface operations {
|
|
2923
|
+
bugReporting: {
|
|
2924
|
+
parameters: {
|
|
2925
|
+
query?: never;
|
|
2926
|
+
header?: never;
|
|
2927
|
+
path?: never;
|
|
2928
|
+
cookie?: never;
|
|
2929
|
+
};
|
|
2930
|
+
requestBody: {
|
|
2931
|
+
content: {
|
|
2932
|
+
"application/json": components["schemas"]["BugReportingRequest"];
|
|
2933
|
+
};
|
|
2934
|
+
};
|
|
2935
|
+
responses: {
|
|
2936
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2937
|
+
200: {
|
|
2938
|
+
headers: {
|
|
2939
|
+
[name: string]: unknown;
|
|
2940
|
+
};
|
|
2941
|
+
content: {
|
|
2942
|
+
"application/json": components["schemas"]["BugReportingResponse"];
|
|
2943
|
+
};
|
|
2944
|
+
};
|
|
2945
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2946
|
+
400: {
|
|
2947
|
+
headers: {
|
|
2948
|
+
[name: string]: unknown;
|
|
2949
|
+
};
|
|
2950
|
+
content: {
|
|
2951
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2955
|
+
401: {
|
|
2956
|
+
headers: {
|
|
2957
|
+
[name: string]: unknown;
|
|
2958
|
+
};
|
|
2959
|
+
content: {
|
|
2960
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2964
|
+
403: {
|
|
2965
|
+
headers: {
|
|
2966
|
+
[name: string]: unknown;
|
|
2967
|
+
};
|
|
2968
|
+
content: {
|
|
2969
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2970
|
+
};
|
|
2971
|
+
};
|
|
2972
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2973
|
+
404: {
|
|
2974
|
+
headers: {
|
|
2975
|
+
[name: string]: unknown;
|
|
2976
|
+
};
|
|
2977
|
+
content: {
|
|
2978
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2979
|
+
};
|
|
2980
|
+
};
|
|
2981
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2982
|
+
409: {
|
|
2983
|
+
headers: {
|
|
2984
|
+
[name: string]: unknown;
|
|
2985
|
+
};
|
|
2986
|
+
content: {
|
|
2987
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2988
|
+
};
|
|
2989
|
+
};
|
|
2990
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2991
|
+
413: {
|
|
2992
|
+
headers: {
|
|
2993
|
+
[name: string]: unknown;
|
|
2994
|
+
};
|
|
2995
|
+
content: {
|
|
2996
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2997
|
+
};
|
|
2998
|
+
};
|
|
2999
|
+
/** @description Prepare, submit or read a private bug report */
|
|
3000
|
+
429: {
|
|
3001
|
+
headers: {
|
|
3002
|
+
[name: string]: unknown;
|
|
3003
|
+
};
|
|
3004
|
+
content: {
|
|
3005
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
3006
|
+
};
|
|
3007
|
+
};
|
|
3008
|
+
/** @description Prepare, submit or read a private bug report */
|
|
3009
|
+
503: {
|
|
3010
|
+
headers: {
|
|
3011
|
+
[name: string]: unknown;
|
|
3012
|
+
};
|
|
3013
|
+
content: {
|
|
3014
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
3015
|
+
};
|
|
3016
|
+
};
|
|
3017
|
+
};
|
|
3018
|
+
};
|
|
2751
3019
|
startHarvest: {
|
|
2752
3020
|
parameters: {
|
|
2753
3021
|
query?: never;
|
|
@@ -5446,6 +5714,42 @@ declare class ScraperClient {
|
|
|
5446
5714
|
job_id: string;
|
|
5447
5715
|
status: "pending";
|
|
5448
5716
|
}>;
|
|
5717
|
+
bugReporting(params: RequestBodyOf<'bugReporting'>, options?: ScraperRequestOptions): Promise<{
|
|
5718
|
+
ok: true;
|
|
5719
|
+
accountEmail: string;
|
|
5720
|
+
reportId: string;
|
|
5721
|
+
status: "draft" | "submitted";
|
|
5722
|
+
receivedAt: string;
|
|
5723
|
+
submittedAt: string | null;
|
|
5724
|
+
expiresAt: string;
|
|
5725
|
+
report: {
|
|
5726
|
+
title: string;
|
|
5727
|
+
goal: string;
|
|
5728
|
+
expected: string;
|
|
5729
|
+
actual: string;
|
|
5730
|
+
steps: string[];
|
|
5731
|
+
attempts: {
|
|
5732
|
+
tool: string;
|
|
5733
|
+
submittedAt?: string;
|
|
5734
|
+
arguments: string;
|
|
5735
|
+
result: string;
|
|
5736
|
+
requestId?: string;
|
|
5737
|
+
jobId?: string;
|
|
5738
|
+
}[];
|
|
5739
|
+
client: {
|
|
5740
|
+
name: string;
|
|
5741
|
+
version?: string;
|
|
5742
|
+
transport: "oauth" | "api-key" | "npx" | "npm" | "sdk" | "mcpb" | "rest" | "unknown";
|
|
5743
|
+
operatingSystem?: string;
|
|
5744
|
+
model?: string;
|
|
5745
|
+
};
|
|
5746
|
+
context?: string;
|
|
5747
|
+
missing: string[];
|
|
5748
|
+
};
|
|
5749
|
+
reviewToken?: string;
|
|
5750
|
+
redacted: boolean;
|
|
5751
|
+
message: string;
|
|
5752
|
+
}>;
|
|
5449
5753
|
searchSerp(params: SearchSerpParams, options?: ScraperRequestOptions): Promise<{
|
|
5450
5754
|
job_id: string;
|
|
5451
5755
|
status: "done" | "cancelled" | "failed";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,26 @@ export { ArtifactDelivery, ClientAttribution, ClientMetadataOptions, DeliveredNa
|
|
|
6
6
|
* Do not make direct changes to the file.
|
|
7
7
|
*/
|
|
8
8
|
interface paths {
|
|
9
|
+
"/bugs/report": {
|
|
10
|
+
parameters: {
|
|
11
|
+
query?: never;
|
|
12
|
+
header?: never;
|
|
13
|
+
path?: never;
|
|
14
|
+
cookie?: never;
|
|
15
|
+
};
|
|
16
|
+
get?: never;
|
|
17
|
+
put?: never;
|
|
18
|
+
/**
|
|
19
|
+
* Prepare, submit or read a private bug report
|
|
20
|
+
* @description Prepare a redacted one-day draft from observed evidence. Submit its exact reportId and reviewToken only at the user’s request. Submitted reports and verified account email are shared with private support for 365 days. Free; status and repeated submit are safe.
|
|
21
|
+
*/
|
|
22
|
+
post: operations["bugReporting"];
|
|
23
|
+
delete?: never;
|
|
24
|
+
options?: never;
|
|
25
|
+
head?: never;
|
|
26
|
+
patch?: never;
|
|
27
|
+
trace?: never;
|
|
28
|
+
};
|
|
9
29
|
"/harvest": {
|
|
10
30
|
parameters: {
|
|
11
31
|
query?: never;
|
|
@@ -2469,6 +2489,158 @@ interface components {
|
|
|
2469
2489
|
RedditCommentCoverageStatus: "complete" | "partial";
|
|
2470
2490
|
/** @enum {string} */
|
|
2471
2491
|
RedditCommentCoverageReason: "requested_limit_reached" | "declared_count_reached" | "stable_visible_shortfall" | "capture_shortfall" | "funding_limited";
|
|
2492
|
+
BugReportingRequest: {
|
|
2493
|
+
/**
|
|
2494
|
+
* @description prepare saves a private one-day draft for review; submit sends that exact draft to support; status reads your report receipt.
|
|
2495
|
+
* @default prepare
|
|
2496
|
+
* @enum {string}
|
|
2497
|
+
*/
|
|
2498
|
+
action: "prepare" | "submit" | "status";
|
|
2499
|
+
/** @description Required for prepare. Collect known evidence from the conversation before asking the user for missing details. */
|
|
2500
|
+
report?: {
|
|
2501
|
+
/** @description Short description of the problem in plain language. */
|
|
2502
|
+
title: string;
|
|
2503
|
+
/** @description What the user was trying to accomplish, using their words. */
|
|
2504
|
+
goal: string;
|
|
2505
|
+
/** @description What should have happened. */
|
|
2506
|
+
expected: string;
|
|
2507
|
+
/** @description What actually happened. Separate observations from suspected causes. */
|
|
2508
|
+
actual: string;
|
|
2509
|
+
/** @description Ordered reproduction steps, including retries and what changed. */
|
|
2510
|
+
steps: string[];
|
|
2511
|
+
/** @description Calls in the order made. Include successful calls that explain the failure. */
|
|
2512
|
+
attempts: {
|
|
2513
|
+
/** @description Exact tool name or REST method and path. */
|
|
2514
|
+
tool: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* Format: date-time
|
|
2517
|
+
* @description Observed call time with timezone; omit if unknown.
|
|
2518
|
+
*/
|
|
2519
|
+
submittedAt?: string;
|
|
2520
|
+
/** @description Exact submitted arguments as JSON or text. Remove credentials, cookies and unrelated private content first. Do not reconstruct unknown arguments. */
|
|
2521
|
+
arguments: string;
|
|
2522
|
+
/** @description Observed response or error text, including error codes and retry outcome. Remove secrets. */
|
|
2523
|
+
result: string;
|
|
2524
|
+
/** @description Returned request ID, when available. */
|
|
2525
|
+
requestId?: string;
|
|
2526
|
+
/** @description Returned job or run ID, when available. */
|
|
2527
|
+
jobId?: string;
|
|
2528
|
+
}[];
|
|
2529
|
+
/** @description Observed client environment; use unknown rather than guessing. */
|
|
2530
|
+
client: {
|
|
2531
|
+
/** @description Observed application or SDK name. */
|
|
2532
|
+
name: string;
|
|
2533
|
+
/** @description Observed application or package version; omit if unknown. */
|
|
2534
|
+
version?: string;
|
|
2535
|
+
/**
|
|
2536
|
+
* @description Connection or install route used for the failed calls.
|
|
2537
|
+
* @enum {string}
|
|
2538
|
+
*/
|
|
2539
|
+
transport: "oauth" | "api-key" | "npx" | "npm" | "sdk" | "mcpb" | "rest" | "unknown";
|
|
2540
|
+
/** @description Observed operating system; omit if unknown. */
|
|
2541
|
+
operatingSystem?: string;
|
|
2542
|
+
/** @description Observed AI model; omit if unknown. */
|
|
2543
|
+
model?: string;
|
|
2544
|
+
};
|
|
2545
|
+
/** @description Impact, frequency, useful prior context, and suspected cause clearly labeled as a guess. No full conversation dump. */
|
|
2546
|
+
context?: string;
|
|
2547
|
+
/**
|
|
2548
|
+
* @description Evidence that is unknown or unavailable; do not invent it.
|
|
2549
|
+
* @default []
|
|
2550
|
+
*/
|
|
2551
|
+
missing: string[];
|
|
2552
|
+
};
|
|
2553
|
+
/**
|
|
2554
|
+
* Format: uuid
|
|
2555
|
+
* @description ID returned by prepare; required for submit or status.
|
|
2556
|
+
*/
|
|
2557
|
+
reportId?: string;
|
|
2558
|
+
/** @description Exact token returned by prepare; required for submit. A changed report requires a new prepare. */
|
|
2559
|
+
reviewToken?: string;
|
|
2560
|
+
/** @description Set true only when the user has asked to submit this bug or approved the reviewed draft. Repeated errors alone do not authorize submission. */
|
|
2561
|
+
userApproved?: boolean;
|
|
2562
|
+
};
|
|
2563
|
+
BugReportingResponse: {
|
|
2564
|
+
/** @enum {boolean} */
|
|
2565
|
+
ok: true;
|
|
2566
|
+
accountEmail: string;
|
|
2567
|
+
/** Format: uuid */
|
|
2568
|
+
reportId: string;
|
|
2569
|
+
/** @enum {string} */
|
|
2570
|
+
status: "draft" | "submitted";
|
|
2571
|
+
receivedAt: string;
|
|
2572
|
+
submittedAt: string | null;
|
|
2573
|
+
expiresAt: string;
|
|
2574
|
+
report: {
|
|
2575
|
+
/** @description Short description of the problem in plain language. */
|
|
2576
|
+
title: string;
|
|
2577
|
+
/** @description What the user was trying to accomplish, using their words. */
|
|
2578
|
+
goal: string;
|
|
2579
|
+
/** @description What should have happened. */
|
|
2580
|
+
expected: string;
|
|
2581
|
+
/** @description What actually happened. Separate observations from suspected causes. */
|
|
2582
|
+
actual: string;
|
|
2583
|
+
/** @description Ordered reproduction steps, including retries and what changed. */
|
|
2584
|
+
steps: string[];
|
|
2585
|
+
/** @description Calls in the order made. Include successful calls that explain the failure. */
|
|
2586
|
+
attempts: {
|
|
2587
|
+
/** @description Exact tool name or REST method and path. */
|
|
2588
|
+
tool: string;
|
|
2589
|
+
/**
|
|
2590
|
+
* Format: date-time
|
|
2591
|
+
* @description Observed call time with timezone; omit if unknown.
|
|
2592
|
+
*/
|
|
2593
|
+
submittedAt?: string;
|
|
2594
|
+
/** @description Exact submitted arguments as JSON or text. Remove credentials, cookies and unrelated private content first. Do not reconstruct unknown arguments. */
|
|
2595
|
+
arguments: string;
|
|
2596
|
+
/** @description Observed response or error text, including error codes and retry outcome. Remove secrets. */
|
|
2597
|
+
result: string;
|
|
2598
|
+
/** @description Returned request ID, when available. */
|
|
2599
|
+
requestId?: string;
|
|
2600
|
+
/** @description Returned job or run ID, when available. */
|
|
2601
|
+
jobId?: string;
|
|
2602
|
+
}[];
|
|
2603
|
+
/** @description Observed client environment; use unknown rather than guessing. */
|
|
2604
|
+
client: {
|
|
2605
|
+
/** @description Observed application or SDK name. */
|
|
2606
|
+
name: string;
|
|
2607
|
+
/** @description Observed application or package version; omit if unknown. */
|
|
2608
|
+
version?: string;
|
|
2609
|
+
/**
|
|
2610
|
+
* @description Connection or install route used for the failed calls.
|
|
2611
|
+
* @enum {string}
|
|
2612
|
+
*/
|
|
2613
|
+
transport: "oauth" | "api-key" | "npx" | "npm" | "sdk" | "mcpb" | "rest" | "unknown";
|
|
2614
|
+
/** @description Observed operating system; omit if unknown. */
|
|
2615
|
+
operatingSystem?: string;
|
|
2616
|
+
/** @description Observed AI model; omit if unknown. */
|
|
2617
|
+
model?: string;
|
|
2618
|
+
};
|
|
2619
|
+
/** @description Impact, frequency, useful prior context, and suspected cause clearly labeled as a guess. No full conversation dump. */
|
|
2620
|
+
context?: string;
|
|
2621
|
+
/**
|
|
2622
|
+
* @description Evidence that is unknown or unavailable; do not invent it.
|
|
2623
|
+
* @default []
|
|
2624
|
+
*/
|
|
2625
|
+
missing: string[];
|
|
2626
|
+
};
|
|
2627
|
+
reviewToken?: string;
|
|
2628
|
+
redacted: boolean;
|
|
2629
|
+
message: string;
|
|
2630
|
+
};
|
|
2631
|
+
BugReportingError: {
|
|
2632
|
+
error?: string;
|
|
2633
|
+
/** @enum {string} */
|
|
2634
|
+
error_code: "request_aborted" | "captcha_exhausted" | "captcha_or_blocked" | "location_mismatch" | "proxy_tunnel_failed" | "proxy_unavailable" | "harvest_timeout" | "mcp_request_timeout" | "mcp_http_error" | "extraction_failed" | "concurrency_limit_exceeded" | "unauthorized" | "forbidden" | "invalid_request" | "rate_limited" | "upstream_rate_limited" | "insufficient_balance" | "service_unavailable" | "response_lost" | "vendor_unavailable" | "page_not_found" | "page_forbidden" | "page_rate_limited" | "page_server_error" | "page_http_error" | "bot_check_unresolved" | "page_too_large" | "page_unreachable" | "browser_session_interrupted" | "site_export_not_found" | "directory_job_not_found" | "site_export_format_unavailable" | "site_export_read_failed" | "site_export_image_not_found" | "image_url_invalid" | "image_url_not_https" | "image_host_unresolvable" | "image_host_blocked" | "image_redirect_invalid" | "image_source_unavailable" | "image_too_large" | "image_redirect_limit" | "image_base64_invalid" | "image_source_missing" | "image_source_ambiguous" | "image_source_type_invalid" | "image_artifact_not_found" | "image_page_too_large" | "page_image_not_found" | "page_image_candidates_unusable" | "image_format_unsupported" | "image_storage_unconfigured" | "featured_image_unhostable";
|
|
2635
|
+
/** @enum {string} */
|
|
2636
|
+
error_type: "request_aborted" | "captcha" | "location_mismatch" | "connection" | "timeout" | "extraction" | "concurrency_limit" | "unauthorized" | "forbidden" | "invalid_request" | "not_found" | "rate_limit" | "billing" | "service_unavailable";
|
|
2637
|
+
message: string;
|
|
2638
|
+
retryable: boolean;
|
|
2639
|
+
/** @enum {string} */
|
|
2640
|
+
charge_status: "not_charged";
|
|
2641
|
+
} & {
|
|
2642
|
+
[key: string]: unknown;
|
|
2643
|
+
};
|
|
2472
2644
|
MapsSearchRequest: {
|
|
2473
2645
|
query: string;
|
|
2474
2646
|
location?: string;
|
|
@@ -2748,6 +2920,102 @@ interface components {
|
|
|
2748
2920
|
pathItems: never;
|
|
2749
2921
|
}
|
|
2750
2922
|
interface operations {
|
|
2923
|
+
bugReporting: {
|
|
2924
|
+
parameters: {
|
|
2925
|
+
query?: never;
|
|
2926
|
+
header?: never;
|
|
2927
|
+
path?: never;
|
|
2928
|
+
cookie?: never;
|
|
2929
|
+
};
|
|
2930
|
+
requestBody: {
|
|
2931
|
+
content: {
|
|
2932
|
+
"application/json": components["schemas"]["BugReportingRequest"];
|
|
2933
|
+
};
|
|
2934
|
+
};
|
|
2935
|
+
responses: {
|
|
2936
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2937
|
+
200: {
|
|
2938
|
+
headers: {
|
|
2939
|
+
[name: string]: unknown;
|
|
2940
|
+
};
|
|
2941
|
+
content: {
|
|
2942
|
+
"application/json": components["schemas"]["BugReportingResponse"];
|
|
2943
|
+
};
|
|
2944
|
+
};
|
|
2945
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2946
|
+
400: {
|
|
2947
|
+
headers: {
|
|
2948
|
+
[name: string]: unknown;
|
|
2949
|
+
};
|
|
2950
|
+
content: {
|
|
2951
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2955
|
+
401: {
|
|
2956
|
+
headers: {
|
|
2957
|
+
[name: string]: unknown;
|
|
2958
|
+
};
|
|
2959
|
+
content: {
|
|
2960
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2964
|
+
403: {
|
|
2965
|
+
headers: {
|
|
2966
|
+
[name: string]: unknown;
|
|
2967
|
+
};
|
|
2968
|
+
content: {
|
|
2969
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2970
|
+
};
|
|
2971
|
+
};
|
|
2972
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2973
|
+
404: {
|
|
2974
|
+
headers: {
|
|
2975
|
+
[name: string]: unknown;
|
|
2976
|
+
};
|
|
2977
|
+
content: {
|
|
2978
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2979
|
+
};
|
|
2980
|
+
};
|
|
2981
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2982
|
+
409: {
|
|
2983
|
+
headers: {
|
|
2984
|
+
[name: string]: unknown;
|
|
2985
|
+
};
|
|
2986
|
+
content: {
|
|
2987
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2988
|
+
};
|
|
2989
|
+
};
|
|
2990
|
+
/** @description Prepare, submit or read a private bug report */
|
|
2991
|
+
413: {
|
|
2992
|
+
headers: {
|
|
2993
|
+
[name: string]: unknown;
|
|
2994
|
+
};
|
|
2995
|
+
content: {
|
|
2996
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
2997
|
+
};
|
|
2998
|
+
};
|
|
2999
|
+
/** @description Prepare, submit or read a private bug report */
|
|
3000
|
+
429: {
|
|
3001
|
+
headers: {
|
|
3002
|
+
[name: string]: unknown;
|
|
3003
|
+
};
|
|
3004
|
+
content: {
|
|
3005
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
3006
|
+
};
|
|
3007
|
+
};
|
|
3008
|
+
/** @description Prepare, submit or read a private bug report */
|
|
3009
|
+
503: {
|
|
3010
|
+
headers: {
|
|
3011
|
+
[name: string]: unknown;
|
|
3012
|
+
};
|
|
3013
|
+
content: {
|
|
3014
|
+
"application/json": components["schemas"]["BugReportingError"];
|
|
3015
|
+
};
|
|
3016
|
+
};
|
|
3017
|
+
};
|
|
3018
|
+
};
|
|
2751
3019
|
startHarvest: {
|
|
2752
3020
|
parameters: {
|
|
2753
3021
|
query?: never;
|
|
@@ -5446,6 +5714,42 @@ declare class ScraperClient {
|
|
|
5446
5714
|
job_id: string;
|
|
5447
5715
|
status: "pending";
|
|
5448
5716
|
}>;
|
|
5717
|
+
bugReporting(params: RequestBodyOf<'bugReporting'>, options?: ScraperRequestOptions): Promise<{
|
|
5718
|
+
ok: true;
|
|
5719
|
+
accountEmail: string;
|
|
5720
|
+
reportId: string;
|
|
5721
|
+
status: "draft" | "submitted";
|
|
5722
|
+
receivedAt: string;
|
|
5723
|
+
submittedAt: string | null;
|
|
5724
|
+
expiresAt: string;
|
|
5725
|
+
report: {
|
|
5726
|
+
title: string;
|
|
5727
|
+
goal: string;
|
|
5728
|
+
expected: string;
|
|
5729
|
+
actual: string;
|
|
5730
|
+
steps: string[];
|
|
5731
|
+
attempts: {
|
|
5732
|
+
tool: string;
|
|
5733
|
+
submittedAt?: string;
|
|
5734
|
+
arguments: string;
|
|
5735
|
+
result: string;
|
|
5736
|
+
requestId?: string;
|
|
5737
|
+
jobId?: string;
|
|
5738
|
+
}[];
|
|
5739
|
+
client: {
|
|
5740
|
+
name: string;
|
|
5741
|
+
version?: string;
|
|
5742
|
+
transport: "oauth" | "api-key" | "npx" | "npm" | "sdk" | "mcpb" | "rest" | "unknown";
|
|
5743
|
+
operatingSystem?: string;
|
|
5744
|
+
model?: string;
|
|
5745
|
+
};
|
|
5746
|
+
context?: string;
|
|
5747
|
+
missing: string[];
|
|
5748
|
+
};
|
|
5749
|
+
reviewToken?: string;
|
|
5750
|
+
redacted: boolean;
|
|
5751
|
+
message: string;
|
|
5752
|
+
}>;
|
|
5449
5753
|
searchSerp(params: SearchSerpParams, options?: ScraperRequestOptions): Promise<{
|
|
5450
5754
|
job_id: string;
|
|
5451
5755
|
status: "done" | "cancelled" | "failed";
|
package/dist/index.js
CHANGED
|
@@ -662,6 +662,17 @@ var ScraperClient = class {
|
|
|
662
662
|
options
|
|
663
663
|
);
|
|
664
664
|
}
|
|
665
|
+
async bugReporting(params, options = {}) {
|
|
666
|
+
try {
|
|
667
|
+
return await this.r.call("POST", "/bugs/report", params, {}, options);
|
|
668
|
+
} catch (error) {
|
|
669
|
+
if (error instanceof ScraperApiError && error.code === "mcp_request_timeout") {
|
|
670
|
+
const message = params.action === "prepare" || params.action === void 0 ? "Draft preparation was not confirmed. An unreturned draft expires after one day; prepare never submits a report." : "Submission was not confirmed. Read status with the same reportId, then retry submit with the same reportId and reviewToken if needed. Bug Reporting is free.";
|
|
671
|
+
throw new ScraperApiError(408, { error_code: "mcp_request_timeout", error_type: "timeout", message, retryable: true, charge_status: "not_charged" }, { requestId: error.requestId });
|
|
672
|
+
}
|
|
673
|
+
throw error;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
665
676
|
searchSerp(params, options = {}) {
|
|
666
677
|
return this.r.call("POST", "/harvest/sync", { ...params, serpOnly: true }, {}, options);
|
|
667
678
|
}
|
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.58.0",
|
|
4
|
+
"description": "Official Node.js client for all 349 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.57.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"openapi-typescript": "^7.13.0"
|