mcpscraper-sdk 0.51.0 → 0.53.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 +13 -6
- package/dist/index.cjs +119 -24
- package/dist/index.d.cts +875 -166
- package/dist/index.d.ts +875 -166
- package/dist/index.js +123 -25
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AccessNamespace, CaptureNamespace, ChannelsNamespace, FactsNamespace, FilesNamespace, GraphNamespace, LibraryNamespace, MemoryNamespace, RecallNamespace, ScheduleNamespace, StorageNamespace, TablesNamespace, TagsNamespace, VaultsNamespace, VideoNamespace as VideoNamespace$1, WebhooksNamespace, CallToolFn, McpToolsClient } from 'mcpscraper-memory-sdk';
|
|
2
|
-
export { GeneratedMcpToolsClient, MCP_TOOL_BINDINGS, MCP_TOOL_COUNT, McpContentBlock, McpToolCallResult, McpToolDescriptor, McpToolError, McpToolErrorDetails, McpToolsClient, McpToolsClientOptions } from 'mcpscraper-memory-sdk';
|
|
1
|
+
import { ClientMetadataOptions, AccessNamespace, CaptureNamespace, ChannelsNamespace, FactsNamespace, FilesNamespace, GraphNamespace, LibraryNamespace, MemoryNamespace, RecallNamespace, ScheduleNamespace, StorageNamespace, TablesNamespace, TagsNamespace, VaultsNamespace, VideoNamespace as VideoNamespace$1, WebhooksNamespace, CallToolFn, McpToolsClient } from 'mcpscraper-memory-sdk';
|
|
2
|
+
export { ArtifactDelivery, ClientAttribution, ClientMetadataOptions, DeliveredNamespace, GeneratedMcpToolsClient, MCP_TOOL_BINDINGS, MCP_TOOL_COUNT, McpContentBlock, McpToolCallResult, McpToolDescriptor, McpToolError, McpToolErrorDetails, McpToolsClient, McpToolsClientOptions, ResponseMetadata } from 'mcpscraper-memory-sdk';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This file was auto-generated by openapi-typescript.
|
|
@@ -646,8 +646,8 @@ interface paths {
|
|
|
646
646
|
get?: never;
|
|
647
647
|
put?: never;
|
|
648
648
|
/**
|
|
649
|
-
* Search Google Maps for
|
|
650
|
-
* @description Costs 5
|
|
649
|
+
* Search Google Maps for business candidates
|
|
650
|
+
* @description Costs 5 Credits. Returns up to 50 candidates. websiteUrl can be null and ordinary search does not open every profile; use /maps/place selectively for complete profile fields.
|
|
651
651
|
*/
|
|
652
652
|
post: operations["mapsSearch"];
|
|
653
653
|
delete?: never;
|
|
@@ -754,8 +754,8 @@ interface paths {
|
|
|
754
754
|
get?: never;
|
|
755
755
|
put?: never;
|
|
756
756
|
/**
|
|
757
|
-
*
|
|
758
|
-
* @description
|
|
757
|
+
* Start a directory search across selected US cities
|
|
758
|
+
* @description Defaults to a durable background job. Poll its statusUrl without starting another search. background:false runs synchronously. Each failed city is refunded.
|
|
759
759
|
*/
|
|
760
760
|
post: operations["directoryWorkflow"];
|
|
761
761
|
delete?: never;
|
|
@@ -764,6 +764,26 @@ interface paths {
|
|
|
764
764
|
patch?: never;
|
|
765
765
|
trace?: never;
|
|
766
766
|
};
|
|
767
|
+
"/directory/jobs/{jobId}": {
|
|
768
|
+
parameters: {
|
|
769
|
+
query?: never;
|
|
770
|
+
header?: never;
|
|
771
|
+
path?: never;
|
|
772
|
+
cookie?: never;
|
|
773
|
+
};
|
|
774
|
+
/**
|
|
775
|
+
* Poll an owner-scoped directory job
|
|
776
|
+
* @description Returns progress, terminal city results, billing settlement, and any CSV artifact without starting or billing another search.
|
|
777
|
+
*/
|
|
778
|
+
get: operations["directoryJobStatus"];
|
|
779
|
+
put?: never;
|
|
780
|
+
post?: never;
|
|
781
|
+
delete?: never;
|
|
782
|
+
options?: never;
|
|
783
|
+
head?: never;
|
|
784
|
+
patch?: never;
|
|
785
|
+
trace?: never;
|
|
786
|
+
};
|
|
767
787
|
"/serp-intelligence/capture": {
|
|
768
788
|
parameters: {
|
|
769
789
|
query?: never;
|
|
@@ -1183,9 +1203,9 @@ interface components {
|
|
|
1183
1203
|
/** @description Stable public failure envelope shared across REST and MCP operations. */
|
|
1184
1204
|
PublicErrorEnvelope: {
|
|
1185
1205
|
/** @enum {string} */
|
|
1186
|
-
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" | "site_export_format_unavailable" | "site_export_read_failed" | "site_export_image_not_found";
|
|
1206
|
+
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";
|
|
1187
1207
|
/** @enum {string} */
|
|
1188
|
-
error_type: "request_aborted" | "captcha" | "location_mismatch" | "connection" | "timeout" | "extraction" | "concurrency_limit" | "unauthorized" | "forbidden" | "invalid_request" | "rate_limit" | "billing" | "service_unavailable";
|
|
1208
|
+
error_type: "request_aborted" | "captcha" | "location_mismatch" | "connection" | "timeout" | "extraction" | "concurrency_limit" | "unauthorized" | "forbidden" | "invalid_request" | "not_found" | "rate_limit" | "billing" | "service_unavailable";
|
|
1189
1209
|
message: string;
|
|
1190
1210
|
retryable: boolean;
|
|
1191
1211
|
retry_after_seconds?: number;
|
|
@@ -1743,26 +1763,6 @@ interface components {
|
|
|
1743
1763
|
markdown?: string;
|
|
1744
1764
|
html?: string;
|
|
1745
1765
|
};
|
|
1746
|
-
MapsSearchRequest: {
|
|
1747
|
-
query: string;
|
|
1748
|
-
location?: string;
|
|
1749
|
-
/** @default us */
|
|
1750
|
-
gl: string;
|
|
1751
|
-
/** @default en */
|
|
1752
|
-
hl: string;
|
|
1753
|
-
/** @default 10 */
|
|
1754
|
-
maxResults: number;
|
|
1755
|
-
/** @default false */
|
|
1756
|
-
includeServices: boolean;
|
|
1757
|
-
/**
|
|
1758
|
-
* @default none
|
|
1759
|
-
* @enum {string}
|
|
1760
|
-
*/
|
|
1761
|
-
proxyMode: "configured" | "none";
|
|
1762
|
-
proxyZip?: string;
|
|
1763
|
-
/** @default false */
|
|
1764
|
-
debug: boolean;
|
|
1765
|
-
};
|
|
1766
1766
|
MapsPlaceRequest: {
|
|
1767
1767
|
businessName: string;
|
|
1768
1768
|
location: string;
|
|
@@ -1877,115 +1877,396 @@ interface components {
|
|
|
1877
1877
|
debug: boolean;
|
|
1878
1878
|
};
|
|
1879
1879
|
SerpIntelligenceOrganicResult: {
|
|
1880
|
-
position
|
|
1881
|
-
title
|
|
1882
|
-
url
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1880
|
+
position: number;
|
|
1881
|
+
title: string;
|
|
1882
|
+
url: string;
|
|
1883
|
+
rawUrl?: string;
|
|
1884
|
+
resolvedUrl?: string | null;
|
|
1885
|
+
/** @enum {string} */
|
|
1886
|
+
linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
|
|
1887
|
+
/** @enum {string} */
|
|
1888
|
+
resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
|
|
1889
|
+
sourcePage?: 1 | 2;
|
|
1890
|
+
domain: string;
|
|
1891
|
+
cite: string | null;
|
|
1892
|
+
snippet: string | null;
|
|
1893
|
+
isRedditStyle: boolean;
|
|
1894
|
+
inlineRating: {
|
|
1895
|
+
value: string;
|
|
1896
|
+
count: string;
|
|
1890
1897
|
} | null;
|
|
1891
1898
|
};
|
|
1892
1899
|
SerpIntelligenceHarvestResult: {
|
|
1893
|
-
seed
|
|
1894
|
-
location
|
|
1895
|
-
extractedAt
|
|
1896
|
-
totalQuestions
|
|
1900
|
+
seed: string;
|
|
1901
|
+
location: string | null;
|
|
1902
|
+
extractedAt: string;
|
|
1903
|
+
totalQuestions: number;
|
|
1897
1904
|
/** @enum {string} */
|
|
1898
|
-
surface
|
|
1899
|
-
aiOverview
|
|
1900
|
-
detected
|
|
1901
|
-
text
|
|
1902
|
-
citations
|
|
1903
|
-
text
|
|
1904
|
-
href
|
|
1905
|
+
surface: "web" | "aim" | "unknown";
|
|
1906
|
+
aiOverview: {
|
|
1907
|
+
detected: boolean;
|
|
1908
|
+
text: string | null;
|
|
1909
|
+
citations: {
|
|
1910
|
+
text: string;
|
|
1911
|
+
href: string;
|
|
1912
|
+
rawUrl?: string;
|
|
1913
|
+
resolvedUrl?: string | null;
|
|
1914
|
+
/** @enum {string} */
|
|
1915
|
+
linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
|
|
1916
|
+
/** @enum {string} */
|
|
1917
|
+
resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
|
|
1905
1918
|
}[];
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1919
|
+
expanded?: boolean;
|
|
1920
|
+
fullyExpanded?: boolean;
|
|
1921
|
+
sections?: string[];
|
|
1922
|
+
shareUrl?: string | null;
|
|
1923
|
+
};
|
|
1924
|
+
aiMode: {
|
|
1925
|
+
detected: boolean;
|
|
1926
|
+
text: string | null;
|
|
1927
|
+
citations: {
|
|
1928
|
+
text: string;
|
|
1929
|
+
href: string;
|
|
1930
|
+
rawUrl?: string;
|
|
1931
|
+
resolvedUrl?: string | null;
|
|
1932
|
+
/** @enum {string} */
|
|
1933
|
+
linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
|
|
1934
|
+
/** @enum {string} */
|
|
1935
|
+
resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
|
|
1913
1936
|
}[];
|
|
1914
1937
|
};
|
|
1915
|
-
tree
|
|
1916
|
-
flat
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1938
|
+
tree: components["schemas"]["SerpIntelligencePaaNode"][];
|
|
1939
|
+
flat: {
|
|
1940
|
+
seed_query: string;
|
|
1941
|
+
question_id: string;
|
|
1942
|
+
google_link_id: string;
|
|
1943
|
+
google_evidence_id: string;
|
|
1944
|
+
question: string;
|
|
1945
|
+
answer: string;
|
|
1946
|
+
answerExpansionIncomplete?: boolean;
|
|
1947
|
+
source_title: string;
|
|
1948
|
+
source_site: string;
|
|
1949
|
+
source_cite: string;
|
|
1950
|
+
sources: {
|
|
1951
|
+
url: string;
|
|
1952
|
+
rawUrl?: string;
|
|
1953
|
+
resolvedUrl?: string | null;
|
|
1954
|
+
/** @enum {string} */
|
|
1955
|
+
linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
|
|
1956
|
+
/** @enum {string} */
|
|
1957
|
+
resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
|
|
1958
|
+
title: string | null;
|
|
1959
|
+
site: string | null;
|
|
1960
|
+
description?: string | null;
|
|
1927
1961
|
}[];
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1962
|
+
depth: number;
|
|
1963
|
+
parent_question: string;
|
|
1964
|
+
extracted_at: string;
|
|
1965
|
+
}[];
|
|
1966
|
+
videos: {
|
|
1967
|
+
/** @enum {string} */
|
|
1968
|
+
type: "video" | "short_video";
|
|
1969
|
+
title: string;
|
|
1970
|
+
channel: string;
|
|
1971
|
+
platform: string;
|
|
1972
|
+
duration: string;
|
|
1973
|
+
url: string;
|
|
1974
|
+
}[];
|
|
1975
|
+
forums: {
|
|
1976
|
+
title: string;
|
|
1977
|
+
source: string;
|
|
1978
|
+
url: string;
|
|
1979
|
+
}[];
|
|
1980
|
+
organicResults: components["schemas"]["SerpIntelligenceOrganicResult"][];
|
|
1981
|
+
localPack: {
|
|
1982
|
+
position: number;
|
|
1983
|
+
name: string;
|
|
1984
|
+
cid?: string | null;
|
|
1985
|
+
rating?: string | null;
|
|
1986
|
+
reviewCount?: string | null;
|
|
1987
|
+
metadata?: string[];
|
|
1988
|
+
websiteUrl?: string | null;
|
|
1989
|
+
directionsUrl?: string | null;
|
|
1990
|
+
}[];
|
|
1991
|
+
entityIds: {
|
|
1992
|
+
entities: {
|
|
1993
|
+
name: string;
|
|
1994
|
+
kgId: string | null;
|
|
1995
|
+
cid: string | null;
|
|
1996
|
+
gcid: string | null;
|
|
1997
|
+
}[];
|
|
1998
|
+
kgIds: string[];
|
|
1999
|
+
cids: string[];
|
|
2000
|
+
gcids: string[];
|
|
2001
|
+
};
|
|
2002
|
+
stats: {
|
|
2003
|
+
seed: string;
|
|
2004
|
+
totalQuestions: number;
|
|
2005
|
+
maxDepthReached: number;
|
|
2006
|
+
durationMs: number;
|
|
2007
|
+
errorCount: number;
|
|
2008
|
+
};
|
|
2009
|
+
diagnostics: components["schemas"]["SerpIntelligenceHarvestDiagnostics"];
|
|
2010
|
+
whatPeopleSaying: {
|
|
2011
|
+
/** @enum {string} */
|
|
2012
|
+
type: "reddit" | "facebook" | "instagram" | "tiktok" | "youtube" | "news" | "unknown";
|
|
2013
|
+
title: string;
|
|
2014
|
+
url: string;
|
|
2015
|
+
source: string;
|
|
2016
|
+
platform: string;
|
|
2017
|
+
popularComment: string | null;
|
|
2018
|
+
engagement: string;
|
|
2019
|
+
date: string;
|
|
2020
|
+
duration: string | null;
|
|
2021
|
+
authorNote: string | null;
|
|
2022
|
+
}[];
|
|
2023
|
+
};
|
|
2024
|
+
SerpIntelligenceHarvestDiagnostics: {
|
|
2025
|
+
/** @enum {string} */
|
|
2026
|
+
completionStatus: "paa_found" | "no_paa" | "serp_only";
|
|
2027
|
+
/** @enum {string|null} */
|
|
2028
|
+
problem?: null;
|
|
2029
|
+
/** @enum {string} */
|
|
2030
|
+
resultQuality?: "complete" | "partial" | "degraded";
|
|
2031
|
+
degradedResult?: boolean;
|
|
2032
|
+
degradationReasons?: ("empty_primary_serp" | "page_two_missing")[];
|
|
2033
|
+
retryRecommended?: boolean;
|
|
2034
|
+
noPaaObserved?: boolean;
|
|
2035
|
+
phaseTimings?: {
|
|
2036
|
+
providerConnectMs?: number;
|
|
2037
|
+
navigationMs?: number;
|
|
2038
|
+
serpParseMs?: number;
|
|
2039
|
+
paaExpansionMs?: number;
|
|
2040
|
+
linkResolutionMs?: number;
|
|
2041
|
+
totalServerMs: number;
|
|
2042
|
+
};
|
|
2043
|
+
pagination?: {
|
|
2044
|
+
requestedPages: 1 | 2;
|
|
2045
|
+
capturedPages: 1 | 2;
|
|
2046
|
+
/** @enum {string} */
|
|
2047
|
+
page2Status: "not_requested" | "not_attempted" | "captured" | "unavailable" | "failed";
|
|
2048
|
+
page1OrganicCount: number;
|
|
2049
|
+
page2OrganicCount: number;
|
|
2050
|
+
/** @enum {string} */
|
|
2051
|
+
failureCode?: "missing_next" | "invalid_next" | "empty_page" | "captcha" | "timeout" | "navigation_error" | "unsupported_driver";
|
|
2052
|
+
};
|
|
2053
|
+
completeness?: {
|
|
2054
|
+
paaWithoutAnswer: number;
|
|
2055
|
+
paaWithoutSource: number;
|
|
2056
|
+
paaIncompleteAnswers?: number;
|
|
2057
|
+
paaAnswersRecovered: number;
|
|
2058
|
+
aioShareCaptured: boolean | null;
|
|
2059
|
+
paaRequested?: number;
|
|
2060
|
+
paaReturned?: number;
|
|
2061
|
+
paaUnique?: number;
|
|
2062
|
+
};
|
|
2063
|
+
interruption?: {
|
|
2064
|
+
/** @enum {string} */
|
|
2065
|
+
code: "browser_session_interrupted" | "request_aborted" | "timeout";
|
|
1941
2066
|
};
|
|
1942
|
-
|
|
2067
|
+
warnings?: {
|
|
2068
|
+
/** @enum {string} */
|
|
2069
|
+
code: "short_videos_captcha_skipped" | "paa_partial";
|
|
2070
|
+
/** @enum {string} */
|
|
2071
|
+
surface: "short_videos" | "paa";
|
|
2072
|
+
retryable: boolean;
|
|
2073
|
+
}[];
|
|
2074
|
+
links?: {
|
|
2075
|
+
linkCandidatesObserved: number;
|
|
2076
|
+
plainLinksObserved: number;
|
|
2077
|
+
googleUrlRedirectsObserved: number;
|
|
2078
|
+
googleGotoRedirectsObserved: number;
|
|
2079
|
+
redirectsResolved: number;
|
|
2080
|
+
redirectsUnresolved: number;
|
|
2081
|
+
redirectsRejected: number;
|
|
2082
|
+
resolverNonGoogleRequestsObserved: number;
|
|
2083
|
+
paaSourcesPreserved: number;
|
|
2084
|
+
aiOverviewLabelValidated: boolean;
|
|
2085
|
+
};
|
|
2086
|
+
paaLifecycle?: {
|
|
2087
|
+
requestedQuestions: number;
|
|
2088
|
+
questionsFound: number;
|
|
2089
|
+
/** @enum {string} */
|
|
2090
|
+
targetStatus: "met" | "not_met";
|
|
2091
|
+
/** @enum {string} */
|
|
2092
|
+
discoveryStatus: "in_progress" | "target_reached" | "frontier_exhausted" | "no_paa_observed" | "interrupted" | "recovery_exhausted";
|
|
2093
|
+
/** @enum {string} */
|
|
2094
|
+
materialStatus: "complete" | "partial";
|
|
2095
|
+
automaticRetries: number;
|
|
2096
|
+
retryBreakdown: {
|
|
2097
|
+
controlRetries: number;
|
|
2098
|
+
browserRetries: number;
|
|
2099
|
+
providerFallbacks: number;
|
|
2100
|
+
runtimeRecoveries: number;
|
|
2101
|
+
idempotentReplays: number;
|
|
2102
|
+
};
|
|
2103
|
+
knownQuestions: number;
|
|
2104
|
+
processedQuestions: number;
|
|
2105
|
+
failedInteractions: number;
|
|
2106
|
+
noGrowthConfirmations: number;
|
|
2107
|
+
visibleControls?: number;
|
|
2108
|
+
eligibleControls?: number;
|
|
2109
|
+
dispatchedInteractions?: number;
|
|
2110
|
+
confirmedInteractions?: number;
|
|
2111
|
+
unconfirmedInteractions?: number;
|
|
2112
|
+
};
|
|
2113
|
+
};
|
|
2114
|
+
SerpIntelligenceLocationEvidence: {
|
|
2115
|
+
/** @enum {string} */
|
|
2116
|
+
status: "not_requested" | "matched" | "mismatch" | "unknown";
|
|
2117
|
+
expected: {
|
|
2118
|
+
city: string;
|
|
2119
|
+
regionCode: string | null;
|
|
2120
|
+
canonicalLocation: string;
|
|
2121
|
+
} | null;
|
|
2122
|
+
candidates: {
|
|
2123
|
+
city: string;
|
|
2124
|
+
regionCode: string;
|
|
2125
|
+
count: number;
|
|
2126
|
+
examples: string[];
|
|
2127
|
+
}[];
|
|
2128
|
+
};
|
|
2129
|
+
SerpIntelligenceCaptureAttempt: {
|
|
2130
|
+
attemptNumber: number;
|
|
2131
|
+
/** @enum {string} */
|
|
2132
|
+
outcome: "paa_found" | "paa_partial" | "no_paa" | "serp_only" | "degraded_result" | "captcha" | "request_aborted" | "timeout" | "location_mismatch" | "proxy_tunnel_failed" | "proxy_unavailable" | "browser_session_interrupted" | "mcp_unavailable" | "error" | "page_captured" | "page_failed";
|
|
2133
|
+
startedAt?: string;
|
|
2134
|
+
completedAt?: string;
|
|
2135
|
+
durationMs?: number;
|
|
2136
|
+
/** @enum {string} */
|
|
2137
|
+
problemCode?: "paa_found" | "paa_partial" | "no_paa" | "serp_only" | "degraded_result" | "captcha" | "request_aborted" | "timeout" | "location_mismatch" | "proxy_tunnel_failed" | "proxy_unavailable" | "browser_session_interrupted" | "mcp_unavailable" | "error" | "captcha_exhausted" | "harvest_timeout" | "service_unavailable" | "vendor_unavailable" | "extraction_failed" | "invalid_url" | "capture_failed";
|
|
2138
|
+
cleanupSucceeded?: boolean | null;
|
|
1943
2139
|
};
|
|
1944
2140
|
SerpPageSnapshotCapture: {
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2141
|
+
/** Format: uri */
|
|
2142
|
+
url: string;
|
|
2143
|
+
/** Format: uri */
|
|
2144
|
+
requestedUrl: string;
|
|
2145
|
+
/** Format: uri */
|
|
2146
|
+
finalUrl: string | null;
|
|
1948
2147
|
/** @enum {string} */
|
|
1949
|
-
sourceKind
|
|
1950
|
-
sourcePosition
|
|
2148
|
+
sourceKind: "organic" | "ai_citation" | "local_pack_website" | "configured_target" | "site_subject";
|
|
2149
|
+
sourcePosition: number | null;
|
|
1951
2150
|
/** @enum {string} */
|
|
1952
|
-
status
|
|
2151
|
+
status: "captured" | "skipped" | "failed";
|
|
1953
2152
|
/** @enum {string|null} */
|
|
1954
|
-
fetchedVia
|
|
1955
|
-
httpStatus
|
|
1956
|
-
contentType
|
|
1957
|
-
title
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
2153
|
+
fetchedVia: "fetch" | "headless" | "browser" | "mcp" | null;
|
|
2154
|
+
httpStatus: number | null;
|
|
2155
|
+
contentType: string | null;
|
|
2156
|
+
title: string | null;
|
|
2157
|
+
/** Format: uri */
|
|
2158
|
+
canonicalUrl: string | null;
|
|
2159
|
+
metaDescription: string | null;
|
|
2160
|
+
/** @default [] */
|
|
2161
|
+
headings: {
|
|
2162
|
+
level: number;
|
|
2163
|
+
text: string;
|
|
1963
2164
|
}[];
|
|
1964
|
-
artifact
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2165
|
+
artifact: {
|
|
2166
|
+
/** Format: uri */
|
|
2167
|
+
htmlBlobUrl: string | null;
|
|
2168
|
+
/** Format: uri */
|
|
2169
|
+
textBlobUrl: string | null;
|
|
2170
|
+
/** Format: uri */
|
|
2171
|
+
markdownBlobUrl: string | null;
|
|
2172
|
+
/** Format: uri */
|
|
2173
|
+
screenshotBlobUrl: string | null;
|
|
2174
|
+
contentSha256: string | null;
|
|
2175
|
+
capturedAt: string | null;
|
|
2176
|
+
};
|
|
2177
|
+
error: {
|
|
2178
|
+
/** @enum {string} */
|
|
2179
|
+
code: "invalid_url" | "timeout" | "capture_failed";
|
|
2180
|
+
message: string;
|
|
1975
2181
|
} | null;
|
|
2182
|
+
schemaTypes?: string[];
|
|
2183
|
+
wordCount?: number;
|
|
2184
|
+
linkCounts?: {
|
|
2185
|
+
wordCount: number;
|
|
2186
|
+
internalLinkCount: number;
|
|
2187
|
+
externalLinkCount: number;
|
|
2188
|
+
totalLinkCount: number;
|
|
2189
|
+
};
|
|
2190
|
+
hashes?: {
|
|
2191
|
+
htmlSha256: string | null;
|
|
2192
|
+
markdownSha256: string | null;
|
|
2193
|
+
textSha256: string | null;
|
|
2194
|
+
};
|
|
2195
|
+
content?: {
|
|
2196
|
+
html: string | null;
|
|
2197
|
+
markdown: string | null;
|
|
2198
|
+
text: string | null;
|
|
2199
|
+
};
|
|
2200
|
+
diagnostics?: {
|
|
2201
|
+
requestedAt: string;
|
|
2202
|
+
completedAt: string;
|
|
2203
|
+
durationMs: number;
|
|
2204
|
+
urlValidation: {
|
|
2205
|
+
passed: boolean;
|
|
2206
|
+
};
|
|
2207
|
+
browserFallback: {
|
|
2208
|
+
configured: boolean;
|
|
2209
|
+
used: boolean;
|
|
2210
|
+
boundedByTimeoutMs: number;
|
|
2211
|
+
};
|
|
2212
|
+
content: {
|
|
2213
|
+
htmlIncluded: boolean;
|
|
2214
|
+
markdownIncluded: boolean;
|
|
2215
|
+
textIncluded: boolean;
|
|
2216
|
+
maxContentChars: number;
|
|
2217
|
+
truncated: boolean;
|
|
2218
|
+
};
|
|
2219
|
+
};
|
|
2220
|
+
};
|
|
2221
|
+
SerpIntelligencePageSnapshotDiagnostics: {
|
|
2222
|
+
requestedCount?: number;
|
|
2223
|
+
capturedCount?: number;
|
|
2224
|
+
failedCount?: number;
|
|
2225
|
+
maxConcurrency?: number;
|
|
2226
|
+
timeoutMs?: number;
|
|
1976
2227
|
};
|
|
1977
2228
|
SerpIntelligenceCaptureResponse: {
|
|
1978
|
-
harvestResult
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
pageSnapshotArtifacts?: components["schemas"]["SerpPageSnapshotCapture"][];
|
|
2229
|
+
harvestResult: components["schemas"]["SerpIntelligenceHarvestResult"];
|
|
2230
|
+
attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
|
|
2231
|
+
locationEvidence: components["schemas"]["SerpIntelligenceLocationEvidence"] | null;
|
|
2232
|
+
pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
|
|
1983
2233
|
billing: {
|
|
1984
2234
|
creditsUsed: number;
|
|
2235
|
+
requestId?: string;
|
|
2236
|
+
jobId?: string;
|
|
1985
2237
|
};
|
|
1986
2238
|
};
|
|
1987
2239
|
SerpIntelligencePageSnapshotsResponse: {
|
|
1988
|
-
pageSnapshotArtifacts
|
|
2240
|
+
pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
|
|
2241
|
+
/** @default [] */
|
|
2242
|
+
attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
|
|
2243
|
+
diagnostics?: components["schemas"]["SerpIntelligencePageSnapshotDiagnostics"];
|
|
2244
|
+
};
|
|
2245
|
+
SerpIntelligencePaaNode: {
|
|
2246
|
+
questionId: string;
|
|
2247
|
+
googleLinkId: string | null;
|
|
2248
|
+
googleEvidenceId: string | null;
|
|
2249
|
+
question: string;
|
|
2250
|
+
answer: string | null;
|
|
2251
|
+
answerExpansionIncomplete?: boolean;
|
|
2252
|
+
sourceTitle: string | null;
|
|
2253
|
+
sourceSite: string | null;
|
|
2254
|
+
sourceCite: string | null;
|
|
2255
|
+
sources: {
|
|
2256
|
+
url: string;
|
|
2257
|
+
rawUrl?: string;
|
|
2258
|
+
resolvedUrl?: string | null;
|
|
2259
|
+
/** @enum {string} */
|
|
2260
|
+
linkType?: "plain" | "google_url_redirect" | "google_goto_redirect";
|
|
2261
|
+
/** @enum {string} */
|
|
2262
|
+
resolutionStatus?: "not_needed" | "resolved" | "unresolved" | "rejected";
|
|
2263
|
+
title: string | null;
|
|
2264
|
+
site: string | null;
|
|
2265
|
+
description?: string | null;
|
|
2266
|
+
}[];
|
|
2267
|
+
depth: number;
|
|
2268
|
+
parentQuestion: string | null;
|
|
2269
|
+
children: components["schemas"]["SerpIntelligencePaaNode"][];
|
|
1989
2270
|
};
|
|
1990
2271
|
WorkflowRun: {
|
|
1991
2272
|
id?: string;
|
|
@@ -2150,6 +2431,198 @@ interface components {
|
|
|
2150
2431
|
} & {
|
|
2151
2432
|
[key: string]: unknown;
|
|
2152
2433
|
};
|
|
2434
|
+
MapsSearchRequest: {
|
|
2435
|
+
query: string;
|
|
2436
|
+
location?: string;
|
|
2437
|
+
/** @default us */
|
|
2438
|
+
gl: string;
|
|
2439
|
+
/** @default en */
|
|
2440
|
+
hl: string;
|
|
2441
|
+
/** @default 10 */
|
|
2442
|
+
maxResults: number;
|
|
2443
|
+
/** @default false */
|
|
2444
|
+
includeServices: boolean;
|
|
2445
|
+
/**
|
|
2446
|
+
* @default none
|
|
2447
|
+
* @enum {string}
|
|
2448
|
+
*/
|
|
2449
|
+
proxyMode: "location" | "configured" | "none";
|
|
2450
|
+
proxyZip?: string;
|
|
2451
|
+
/** @default false */
|
|
2452
|
+
debug: boolean;
|
|
2453
|
+
};
|
|
2454
|
+
MapsSearchResponse: {
|
|
2455
|
+
provider?: string;
|
|
2456
|
+
fallbackFrom?: string;
|
|
2457
|
+
acquisitionProvider?: string;
|
|
2458
|
+
query: string;
|
|
2459
|
+
location: string | null;
|
|
2460
|
+
searchQuery: string;
|
|
2461
|
+
/** Format: uri */
|
|
2462
|
+
searchUrl: string;
|
|
2463
|
+
extractedAt: string;
|
|
2464
|
+
requestedMaxResults: number;
|
|
2465
|
+
resultCount: number;
|
|
2466
|
+
results: {
|
|
2467
|
+
position: number;
|
|
2468
|
+
name: string;
|
|
2469
|
+
/** Format: uri */
|
|
2470
|
+
placeUrl: string;
|
|
2471
|
+
cid: string | null;
|
|
2472
|
+
cidDecimal: string | null;
|
|
2473
|
+
rating: string | null;
|
|
2474
|
+
reviewCount: string | null;
|
|
2475
|
+
category: string | null;
|
|
2476
|
+
address: string | null;
|
|
2477
|
+
phone: string | null;
|
|
2478
|
+
hoursStatus: string | null;
|
|
2479
|
+
websiteUrl: string | null;
|
|
2480
|
+
directionsUrl: string | null;
|
|
2481
|
+
metadata: string[];
|
|
2482
|
+
/** @default [] */
|
|
2483
|
+
services: string[];
|
|
2484
|
+
/** @default [] */
|
|
2485
|
+
areasServed: string[];
|
|
2486
|
+
/**
|
|
2487
|
+
* @default unavailable
|
|
2488
|
+
* @enum {string}
|
|
2489
|
+
*/
|
|
2490
|
+
profileDetailsStatus: "collected" | "none_exist" | "unavailable" | "not_requested";
|
|
2491
|
+
}[];
|
|
2492
|
+
durationMs: number;
|
|
2493
|
+
} & {
|
|
2494
|
+
[key: string]: unknown;
|
|
2495
|
+
};
|
|
2496
|
+
DirectoryRunRequest: {
|
|
2497
|
+
query: string;
|
|
2498
|
+
/** @default TN */
|
|
2499
|
+
state: string;
|
|
2500
|
+
/** @default 100000 */
|
|
2501
|
+
minPopulation: number;
|
|
2502
|
+
/** @default 2025 */
|
|
2503
|
+
populationYear: 2020 | 2021 | 2022 | 2023 | 2024 | 2025;
|
|
2504
|
+
/** @default 25 */
|
|
2505
|
+
maxCities: number;
|
|
2506
|
+
/** @default 50 */
|
|
2507
|
+
maxResultsPerCity: number;
|
|
2508
|
+
/** @default 5 */
|
|
2509
|
+
concurrency: number;
|
|
2510
|
+
/** @default true */
|
|
2511
|
+
includeZipGroups: boolean;
|
|
2512
|
+
/** @default true */
|
|
2513
|
+
saveCsv: boolean;
|
|
2514
|
+
/** @default true */
|
|
2515
|
+
background: boolean;
|
|
2516
|
+
/** @default us */
|
|
2517
|
+
gl: string;
|
|
2518
|
+
/** @default en */
|
|
2519
|
+
hl: string;
|
|
2520
|
+
/**
|
|
2521
|
+
* @default none
|
|
2522
|
+
* @enum {string}
|
|
2523
|
+
*/
|
|
2524
|
+
proxyMode: "configured" | "none";
|
|
2525
|
+
proxyZip?: string;
|
|
2526
|
+
/** @default false */
|
|
2527
|
+
debug: boolean;
|
|
2528
|
+
};
|
|
2529
|
+
DirectoryJobResponse: {
|
|
2530
|
+
jobId: string | null;
|
|
2531
|
+
/** @enum {string} */
|
|
2532
|
+
status: "queued" | "running" | "complete" | "partial" | "empty" | "failed";
|
|
2533
|
+
statusUrl: string | null;
|
|
2534
|
+
query: string;
|
|
2535
|
+
state: string;
|
|
2536
|
+
minPopulation: number;
|
|
2537
|
+
populationYear: number;
|
|
2538
|
+
maxResultsPerCity: number;
|
|
2539
|
+
concurrency: number;
|
|
2540
|
+
/** Format: uri */
|
|
2541
|
+
censusSourceUrl: string;
|
|
2542
|
+
usZipsSourcePath: string | null;
|
|
2543
|
+
warnings: string[];
|
|
2544
|
+
extractedAt: string;
|
|
2545
|
+
selectedCityCount: number;
|
|
2546
|
+
totalResultCount: number;
|
|
2547
|
+
csvPath: string | null;
|
|
2548
|
+
csvArtifact: {
|
|
2549
|
+
artifactId: string;
|
|
2550
|
+
filename: string;
|
|
2551
|
+
contentType: string;
|
|
2552
|
+
bytes: number;
|
|
2553
|
+
rowCount: number;
|
|
2554
|
+
sha256: string;
|
|
2555
|
+
expiresAt: string;
|
|
2556
|
+
downloadUrl: string | null;
|
|
2557
|
+
downloadUrlExpiresAt: string | null;
|
|
2558
|
+
} | null;
|
|
2559
|
+
progress: {
|
|
2560
|
+
completedCities: number;
|
|
2561
|
+
totalCities: number;
|
|
2562
|
+
failedCities: number;
|
|
2563
|
+
};
|
|
2564
|
+
billing: {
|
|
2565
|
+
heldMc: number;
|
|
2566
|
+
finalMc: number | null;
|
|
2567
|
+
refundMc: number | null;
|
|
2568
|
+
};
|
|
2569
|
+
errorCode: string | null;
|
|
2570
|
+
error: string | null;
|
|
2571
|
+
retryable: boolean | null;
|
|
2572
|
+
cities: {
|
|
2573
|
+
city: string;
|
|
2574
|
+
state: string;
|
|
2575
|
+
location: string;
|
|
2576
|
+
cityKey: string;
|
|
2577
|
+
censusName: string;
|
|
2578
|
+
population: number;
|
|
2579
|
+
populationYear: number;
|
|
2580
|
+
zips: string[];
|
|
2581
|
+
counties: string[];
|
|
2582
|
+
/** @enum {string} */
|
|
2583
|
+
status: "ok" | "empty" | "failed";
|
|
2584
|
+
error: string | null;
|
|
2585
|
+
errorCode?: string | null;
|
|
2586
|
+
retryable?: boolean;
|
|
2587
|
+
resultCount: number;
|
|
2588
|
+
durationMs: number;
|
|
2589
|
+
results: {
|
|
2590
|
+
position: number;
|
|
2591
|
+
name: string;
|
|
2592
|
+
/** Format: uri */
|
|
2593
|
+
placeUrl: string;
|
|
2594
|
+
cid: string | null;
|
|
2595
|
+
cidDecimal: string | null;
|
|
2596
|
+
rating: string | null;
|
|
2597
|
+
reviewCount: string | null;
|
|
2598
|
+
category: string | null;
|
|
2599
|
+
address: string | null;
|
|
2600
|
+
phone: string | null;
|
|
2601
|
+
hoursStatus: string | null;
|
|
2602
|
+
websiteUrl: string | null;
|
|
2603
|
+
directionsUrl: string | null;
|
|
2604
|
+
metadata: string[];
|
|
2605
|
+
}[];
|
|
2606
|
+
}[];
|
|
2607
|
+
durationMs: number;
|
|
2608
|
+
truncatedCount?: number;
|
|
2609
|
+
artifact?: {
|
|
2610
|
+
artifactId: string;
|
|
2611
|
+
bytes: number;
|
|
2612
|
+
expiresAt: string;
|
|
2613
|
+
preview: string;
|
|
2614
|
+
};
|
|
2615
|
+
} & {
|
|
2616
|
+
[key: string]: unknown;
|
|
2617
|
+
};
|
|
2618
|
+
DirectoryJobNotFound: {
|
|
2619
|
+
/** @enum {string} */
|
|
2620
|
+
error: "Directory workflow job not found.";
|
|
2621
|
+
/** @enum {string} */
|
|
2622
|
+
error_code: "directory_job_not_found";
|
|
2623
|
+
/** @enum {boolean} */
|
|
2624
|
+
retryable: false;
|
|
2625
|
+
};
|
|
2153
2626
|
};
|
|
2154
2627
|
responses: {
|
|
2155
2628
|
/** @description Missing or invalid `x-api-key`. */
|
|
@@ -3442,7 +3915,10 @@ interface operations {
|
|
|
3442
3915
|
mapsSearch: {
|
|
3443
3916
|
parameters: {
|
|
3444
3917
|
query?: never;
|
|
3445
|
-
header?:
|
|
3918
|
+
header?: {
|
|
3919
|
+
/** @description Reuse only for an identical retry after an uncertain response. */
|
|
3920
|
+
"Idempotency-Key"?: string;
|
|
3921
|
+
};
|
|
3446
3922
|
path?: never;
|
|
3447
3923
|
cookie?: never;
|
|
3448
3924
|
};
|
|
@@ -3452,22 +3928,20 @@ interface operations {
|
|
|
3452
3928
|
};
|
|
3453
3929
|
};
|
|
3454
3930
|
responses: {
|
|
3455
|
-
/** @description Search
|
|
3931
|
+
/** @description Search Google Maps for business candidates */
|
|
3456
3932
|
200: {
|
|
3457
3933
|
headers: {
|
|
3458
3934
|
[name: string]: unknown;
|
|
3459
3935
|
};
|
|
3460
3936
|
content: {
|
|
3461
|
-
"application/json":
|
|
3462
|
-
[key: string]: unknown;
|
|
3463
|
-
};
|
|
3937
|
+
"application/json": components["schemas"]["MapsSearchResponse"];
|
|
3464
3938
|
};
|
|
3465
3939
|
};
|
|
3466
3940
|
400: components["responses"]["BadRequest"];
|
|
3467
3941
|
402: components["responses"]["InsufficientBalance"];
|
|
3468
3942
|
429: components["responses"]["ConcurrencyLimitExceeded"];
|
|
3469
3943
|
500: components["responses"]["ServerError"];
|
|
3470
|
-
/** @description Temporarily blocked
|
|
3944
|
+
/** @description Temporarily blocked. */
|
|
3471
3945
|
503: {
|
|
3472
3946
|
headers: {
|
|
3473
3947
|
[name: string]: unknown;
|
|
@@ -3676,48 +4150,46 @@ interface operations {
|
|
|
3676
4150
|
directoryWorkflow: {
|
|
3677
4151
|
parameters: {
|
|
3678
4152
|
query?: never;
|
|
3679
|
-
header?:
|
|
4153
|
+
header?: {
|
|
4154
|
+
/** @description Reuse only for the same intended directory job. */
|
|
4155
|
+
"Idempotency-Key"?: string;
|
|
4156
|
+
};
|
|
3680
4157
|
path?: never;
|
|
3681
4158
|
cookie?: never;
|
|
3682
4159
|
};
|
|
3683
4160
|
requestBody: {
|
|
3684
4161
|
content: {
|
|
3685
|
-
"application/json":
|
|
3686
|
-
/** @description Business category to search, e.g. "roofers". */
|
|
3687
|
-
query: string;
|
|
3688
|
-
/** @description US state code or name. */
|
|
3689
|
-
state: string;
|
|
3690
|
-
/** @description Minimum city population to include as a market. */
|
|
3691
|
-
minPop?: number;
|
|
3692
|
-
/** @description Max results per city. */
|
|
3693
|
-
perCity?: number;
|
|
3694
|
-
};
|
|
4162
|
+
"application/json": components["schemas"]["DirectoryRunRequest"];
|
|
3695
4163
|
};
|
|
3696
4164
|
};
|
|
3697
4165
|
responses: {
|
|
3698
|
-
/** @description
|
|
4166
|
+
/** @description Start a directory search across selected US cities */
|
|
3699
4167
|
200: {
|
|
3700
4168
|
headers: {
|
|
3701
4169
|
[name: string]: unknown;
|
|
3702
4170
|
};
|
|
3703
4171
|
content: {
|
|
3704
|
-
"application/json":
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
}[];
|
|
3715
|
-
}[];
|
|
3716
|
-
};
|
|
4172
|
+
"application/json": components["schemas"]["DirectoryJobResponse"];
|
|
4173
|
+
};
|
|
4174
|
+
};
|
|
4175
|
+
/** @description Start a directory search across selected US cities */
|
|
4176
|
+
202: {
|
|
4177
|
+
headers: {
|
|
4178
|
+
[name: string]: unknown;
|
|
4179
|
+
};
|
|
4180
|
+
content: {
|
|
4181
|
+
"application/json": components["schemas"]["DirectoryJobResponse"];
|
|
3717
4182
|
};
|
|
3718
4183
|
};
|
|
3719
4184
|
400: components["responses"]["BadRequest"];
|
|
3720
4185
|
402: components["responses"]["InsufficientBalance"];
|
|
4186
|
+
/** @description Idempotency-Key already used with different input. */
|
|
4187
|
+
409: {
|
|
4188
|
+
headers: {
|
|
4189
|
+
[name: string]: unknown;
|
|
4190
|
+
};
|
|
4191
|
+
content?: never;
|
|
4192
|
+
};
|
|
3721
4193
|
429: components["responses"]["ConcurrencyLimitExceeded"];
|
|
3722
4194
|
/** @description Directory workflow failed. */
|
|
3723
4195
|
500: {
|
|
@@ -3728,6 +4200,37 @@ interface operations {
|
|
|
3728
4200
|
};
|
|
3729
4201
|
};
|
|
3730
4202
|
};
|
|
4203
|
+
directoryJobStatus: {
|
|
4204
|
+
parameters: {
|
|
4205
|
+
query?: never;
|
|
4206
|
+
header?: never;
|
|
4207
|
+
path: {
|
|
4208
|
+
jobId: string;
|
|
4209
|
+
};
|
|
4210
|
+
cookie?: never;
|
|
4211
|
+
};
|
|
4212
|
+
requestBody?: never;
|
|
4213
|
+
responses: {
|
|
4214
|
+
/** @description Poll an owner-scoped directory job */
|
|
4215
|
+
200: {
|
|
4216
|
+
headers: {
|
|
4217
|
+
[name: string]: unknown;
|
|
4218
|
+
};
|
|
4219
|
+
content: {
|
|
4220
|
+
"application/json": components["schemas"]["DirectoryJobResponse"];
|
|
4221
|
+
};
|
|
4222
|
+
};
|
|
4223
|
+
/** @description Poll an owner-scoped directory job */
|
|
4224
|
+
404: {
|
|
4225
|
+
headers: {
|
|
4226
|
+
[name: string]: unknown;
|
|
4227
|
+
};
|
|
4228
|
+
content: {
|
|
4229
|
+
"application/json": components["schemas"]["DirectoryJobNotFound"];
|
|
4230
|
+
};
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4233
|
+
};
|
|
3731
4234
|
serpIntelligenceCapture: {
|
|
3732
4235
|
parameters: {
|
|
3733
4236
|
query?: never;
|
|
@@ -4479,7 +4982,7 @@ type SuccessBodyOf<K extends OperationId> = operations[K]['responses'] extends {
|
|
|
4479
4982
|
};
|
|
4480
4983
|
};
|
|
4481
4984
|
} ? B : unknown;
|
|
4482
|
-
interface ScraperClientOptions {
|
|
4985
|
+
interface ScraperClientOptions extends ClientMetadataOptions {
|
|
4483
4986
|
apiKey: string;
|
|
4484
4987
|
baseUrl?: string;
|
|
4485
4988
|
fetch?: typeof globalThis.fetch;
|
|
@@ -4496,6 +4999,10 @@ interface ScraperRequestOptions {
|
|
|
4496
4999
|
signal?: AbortSignal;
|
|
4497
5000
|
timeoutMs?: number;
|
|
4498
5001
|
}
|
|
5002
|
+
type MapsSearchDefaultedKey = 'gl' | 'hl' | 'maxResults' | 'includeServices' | 'proxyMode' | 'debug';
|
|
5003
|
+
type MapsSearchParams = Omit<RequestBodyOf<'mapsSearch'>, MapsSearchDefaultedKey> & Partial<Pick<RequestBodyOf<'mapsSearch'>, MapsSearchDefaultedKey>>;
|
|
5004
|
+
type DirectoryDefaultedKey = 'state' | 'minPopulation' | 'populationYear' | 'maxCities' | 'maxResultsPerCity' | 'concurrency' | 'includeZipGroups' | 'saveCsv' | 'background' | 'gl' | 'hl' | 'proxyMode' | 'debug';
|
|
5005
|
+
type DirectoryRunParams = Omit<RequestBodyOf<'directoryWorkflow'>, DirectoryDefaultedKey> & Partial<Pick<RequestBodyOf<'directoryWorkflow'>, DirectoryDefaultedKey>>;
|
|
4499
5006
|
interface ExtractSiteOptions extends ScraperRequestOptions {
|
|
4500
5007
|
idempotencyKey?: string;
|
|
4501
5008
|
}
|
|
@@ -4514,13 +5021,17 @@ interface SerpIntelligenceCaptureOptions {
|
|
|
4514
5021
|
interface SerpIntelligenceCaptureReceipt {
|
|
4515
5022
|
data: SuccessBodyOf<'serpIntelligenceCapture'>;
|
|
4516
5023
|
idempotencyKey: string | null;
|
|
5024
|
+
requestId?: string;
|
|
4517
5025
|
}
|
|
4518
5026
|
declare class Requester {
|
|
4519
5027
|
private readonly apiKey;
|
|
4520
5028
|
private readonly baseUrl;
|
|
4521
5029
|
private readonly fetchImpl;
|
|
4522
5030
|
private readonly timeoutMs;
|
|
4523
|
-
|
|
5031
|
+
private readonly metadataOptions;
|
|
5032
|
+
constructor(apiKey: string, baseUrl: string, fetchImpl: typeof globalThis.fetch, timeoutMs: number, metadataOptions?: ClientMetadataOptions);
|
|
5033
|
+
private headers;
|
|
5034
|
+
private received;
|
|
4524
5035
|
private request;
|
|
4525
5036
|
call<K extends OperationId>(method: string, path: string, body?: RequestBodyOf<K>, extraHeaders?: Record<string, string>, options?: ScraperRequestOptions): Promise<SuccessBodyOf<K>>;
|
|
4526
5037
|
callWithReceipt<K extends OperationId>(method: string, path: string, body?: RequestBodyOf<K>, extraHeaders?: Record<string, string>, options?: ScraperRequestOptions): Promise<{
|
|
@@ -4623,7 +5134,7 @@ declare class InstagramNamespace {
|
|
|
4623
5134
|
declare class RedditNamespace {
|
|
4624
5135
|
private readonly r;
|
|
4625
5136
|
constructor(r: Requester);
|
|
4626
|
-
thread(params: RequestBodyOf<'redditThread'
|
|
5137
|
+
thread(params: RequestBodyOf<'redditThread'>, options?: ScraperRequestOptions & IdempotentRequestOptions): Promise<{
|
|
4627
5138
|
title?: string;
|
|
4628
5139
|
author?: string | null;
|
|
4629
5140
|
score?: string | null;
|
|
@@ -4669,7 +5180,38 @@ declare class VideoNamespace {
|
|
|
4669
5180
|
declare class MapsNamespace {
|
|
4670
5181
|
private readonly r;
|
|
4671
5182
|
constructor(r: Requester);
|
|
4672
|
-
search(params:
|
|
5183
|
+
search(params: MapsSearchParams, options?: ScraperRequestOptions & IdempotentRequestOptions): Promise<{
|
|
5184
|
+
provider?: string;
|
|
5185
|
+
fallbackFrom?: string;
|
|
5186
|
+
acquisitionProvider?: string;
|
|
5187
|
+
query: string;
|
|
5188
|
+
location: string | null;
|
|
5189
|
+
searchQuery: string;
|
|
5190
|
+
searchUrl: string;
|
|
5191
|
+
extractedAt: string;
|
|
5192
|
+
requestedMaxResults: number;
|
|
5193
|
+
resultCount: number;
|
|
5194
|
+
results: {
|
|
5195
|
+
position: number;
|
|
5196
|
+
name: string;
|
|
5197
|
+
placeUrl: string;
|
|
5198
|
+
cid: string | null;
|
|
5199
|
+
cidDecimal: string | null;
|
|
5200
|
+
rating: string | null;
|
|
5201
|
+
reviewCount: string | null;
|
|
5202
|
+
category: string | null;
|
|
5203
|
+
address: string | null;
|
|
5204
|
+
phone: string | null;
|
|
5205
|
+
hoursStatus: string | null;
|
|
5206
|
+
websiteUrl: string | null;
|
|
5207
|
+
directionsUrl: string | null;
|
|
5208
|
+
metadata: string[];
|
|
5209
|
+
services: string[];
|
|
5210
|
+
areasServed: string[];
|
|
5211
|
+
profileDetailsStatus: "collected" | "none_exist" | "unavailable" | "not_requested";
|
|
5212
|
+
}[];
|
|
5213
|
+
durationMs: number;
|
|
5214
|
+
} & {
|
|
4673
5215
|
[key: string]: unknown;
|
|
4674
5216
|
}>;
|
|
4675
5217
|
place(params: RequestBodyOf<'mapsPlaceIntel'>, options?: ScraperRequestOptions & {
|
|
@@ -4751,35 +5293,198 @@ declare class MapsNamespace {
|
|
|
4751
5293
|
declare class DirectoryNamespace {
|
|
4752
5294
|
private readonly r;
|
|
4753
5295
|
constructor(r: Requester);
|
|
4754
|
-
run(params:
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
5296
|
+
run(params: DirectoryRunParams, options?: ScraperRequestOptions & {
|
|
5297
|
+
idempotencyKey?: string;
|
|
5298
|
+
}): Promise<{
|
|
5299
|
+
jobId: string | null;
|
|
5300
|
+
status: "queued" | "running" | "complete" | "partial" | "empty" | "failed";
|
|
5301
|
+
statusUrl: string | null;
|
|
5302
|
+
query: string;
|
|
5303
|
+
state: string;
|
|
5304
|
+
minPopulation: number;
|
|
5305
|
+
populationYear: number;
|
|
5306
|
+
maxResultsPerCity: number;
|
|
5307
|
+
concurrency: number;
|
|
5308
|
+
censusSourceUrl: string;
|
|
5309
|
+
usZipsSourcePath: string | null;
|
|
5310
|
+
warnings: string[];
|
|
5311
|
+
extractedAt: string;
|
|
5312
|
+
selectedCityCount: number;
|
|
5313
|
+
totalResultCount: number;
|
|
5314
|
+
csvPath: string | null;
|
|
5315
|
+
csvArtifact: {
|
|
5316
|
+
artifactId: string;
|
|
5317
|
+
filename: string;
|
|
5318
|
+
contentType: string;
|
|
5319
|
+
bytes: number;
|
|
5320
|
+
rowCount: number;
|
|
5321
|
+
sha256: string;
|
|
5322
|
+
expiresAt: string;
|
|
5323
|
+
downloadUrl: string | null;
|
|
5324
|
+
downloadUrlExpiresAt: string | null;
|
|
5325
|
+
} | null;
|
|
5326
|
+
progress: {
|
|
5327
|
+
completedCities: number;
|
|
5328
|
+
totalCities: number;
|
|
5329
|
+
failedCities: number;
|
|
5330
|
+
};
|
|
5331
|
+
billing: {
|
|
5332
|
+
heldMc: number;
|
|
5333
|
+
finalMc: number | null;
|
|
5334
|
+
refundMc: number | null;
|
|
5335
|
+
};
|
|
5336
|
+
errorCode: string | null;
|
|
5337
|
+
error: string | null;
|
|
5338
|
+
retryable: boolean | null;
|
|
5339
|
+
cities: {
|
|
5340
|
+
city: string;
|
|
5341
|
+
state: string;
|
|
5342
|
+
location: string;
|
|
5343
|
+
cityKey: string;
|
|
5344
|
+
censusName: string;
|
|
5345
|
+
population: number;
|
|
5346
|
+
populationYear: number;
|
|
5347
|
+
zips: string[];
|
|
5348
|
+
counties: string[];
|
|
5349
|
+
status: "ok" | "empty" | "failed";
|
|
5350
|
+
error: string | null;
|
|
5351
|
+
errorCode?: string | null;
|
|
5352
|
+
retryable?: boolean;
|
|
5353
|
+
resultCount: number;
|
|
5354
|
+
durationMs: number;
|
|
5355
|
+
results: {
|
|
5356
|
+
position: number;
|
|
5357
|
+
name: string;
|
|
5358
|
+
placeUrl: string;
|
|
5359
|
+
cid: string | null;
|
|
5360
|
+
cidDecimal: string | null;
|
|
5361
|
+
rating: string | null;
|
|
5362
|
+
reviewCount: string | null;
|
|
5363
|
+
category: string | null;
|
|
5364
|
+
address: string | null;
|
|
5365
|
+
phone: string | null;
|
|
5366
|
+
hoursStatus: string | null;
|
|
5367
|
+
websiteUrl: string | null;
|
|
5368
|
+
directionsUrl: string | null;
|
|
5369
|
+
metadata: string[];
|
|
4763
5370
|
}[];
|
|
4764
5371
|
}[];
|
|
5372
|
+
durationMs: number;
|
|
5373
|
+
truncatedCount?: number;
|
|
5374
|
+
artifact?: {
|
|
5375
|
+
artifactId: string;
|
|
5376
|
+
bytes: number;
|
|
5377
|
+
expiresAt: string;
|
|
5378
|
+
preview: string;
|
|
5379
|
+
};
|
|
5380
|
+
} & {
|
|
5381
|
+
[key: string]: unknown;
|
|
5382
|
+
}>;
|
|
5383
|
+
status(jobId: string, options?: ScraperRequestOptions): Promise<{
|
|
5384
|
+
jobId: string | null;
|
|
5385
|
+
status: "queued" | "running" | "complete" | "partial" | "empty" | "failed";
|
|
5386
|
+
statusUrl: string | null;
|
|
5387
|
+
query: string;
|
|
5388
|
+
state: string;
|
|
5389
|
+
minPopulation: number;
|
|
5390
|
+
populationYear: number;
|
|
5391
|
+
maxResultsPerCity: number;
|
|
5392
|
+
concurrency: number;
|
|
5393
|
+
censusSourceUrl: string;
|
|
5394
|
+
usZipsSourcePath: string | null;
|
|
5395
|
+
warnings: string[];
|
|
5396
|
+
extractedAt: string;
|
|
5397
|
+
selectedCityCount: number;
|
|
5398
|
+
totalResultCount: number;
|
|
5399
|
+
csvPath: string | null;
|
|
5400
|
+
csvArtifact: {
|
|
5401
|
+
artifactId: string;
|
|
5402
|
+
filename: string;
|
|
5403
|
+
contentType: string;
|
|
5404
|
+
bytes: number;
|
|
5405
|
+
rowCount: number;
|
|
5406
|
+
sha256: string;
|
|
5407
|
+
expiresAt: string;
|
|
5408
|
+
downloadUrl: string | null;
|
|
5409
|
+
downloadUrlExpiresAt: string | null;
|
|
5410
|
+
} | null;
|
|
5411
|
+
progress: {
|
|
5412
|
+
completedCities: number;
|
|
5413
|
+
totalCities: number;
|
|
5414
|
+
failedCities: number;
|
|
5415
|
+
};
|
|
5416
|
+
billing: {
|
|
5417
|
+
heldMc: number;
|
|
5418
|
+
finalMc: number | null;
|
|
5419
|
+
refundMc: number | null;
|
|
5420
|
+
};
|
|
5421
|
+
errorCode: string | null;
|
|
5422
|
+
error: string | null;
|
|
5423
|
+
retryable: boolean | null;
|
|
5424
|
+
cities: {
|
|
5425
|
+
city: string;
|
|
5426
|
+
state: string;
|
|
5427
|
+
location: string;
|
|
5428
|
+
cityKey: string;
|
|
5429
|
+
censusName: string;
|
|
5430
|
+
population: number;
|
|
5431
|
+
populationYear: number;
|
|
5432
|
+
zips: string[];
|
|
5433
|
+
counties: string[];
|
|
5434
|
+
status: "ok" | "empty" | "failed";
|
|
5435
|
+
error: string | null;
|
|
5436
|
+
errorCode?: string | null;
|
|
5437
|
+
retryable?: boolean;
|
|
5438
|
+
resultCount: number;
|
|
5439
|
+
durationMs: number;
|
|
5440
|
+
results: {
|
|
5441
|
+
position: number;
|
|
5442
|
+
name: string;
|
|
5443
|
+
placeUrl: string;
|
|
5444
|
+
cid: string | null;
|
|
5445
|
+
cidDecimal: string | null;
|
|
5446
|
+
rating: string | null;
|
|
5447
|
+
reviewCount: string | null;
|
|
5448
|
+
category: string | null;
|
|
5449
|
+
address: string | null;
|
|
5450
|
+
phone: string | null;
|
|
5451
|
+
hoursStatus: string | null;
|
|
5452
|
+
websiteUrl: string | null;
|
|
5453
|
+
directionsUrl: string | null;
|
|
5454
|
+
metadata: string[];
|
|
5455
|
+
}[];
|
|
5456
|
+
}[];
|
|
5457
|
+
durationMs: number;
|
|
5458
|
+
truncatedCount?: number;
|
|
5459
|
+
artifact?: {
|
|
5460
|
+
artifactId: string;
|
|
5461
|
+
bytes: number;
|
|
5462
|
+
expiresAt: string;
|
|
5463
|
+
preview: string;
|
|
5464
|
+
};
|
|
5465
|
+
} & {
|
|
5466
|
+
[key: string]: unknown;
|
|
4765
5467
|
}>;
|
|
4766
5468
|
}
|
|
4767
5469
|
declare class SerpIntelligenceNamespace {
|
|
4768
5470
|
private readonly r;
|
|
4769
5471
|
constructor(r: Requester);
|
|
4770
5472
|
capture(params: SerpIntelligenceCaptureParams, options?: SerpIntelligenceCaptureOptions): Promise<{
|
|
4771
|
-
harvestResult
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
pageSnapshotArtifacts?: components["schemas"]["SerpPageSnapshotCapture"][];
|
|
5473
|
+
harvestResult: components["schemas"]["SerpIntelligenceHarvestResult"];
|
|
5474
|
+
attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
|
|
5475
|
+
locationEvidence: components["schemas"]["SerpIntelligenceLocationEvidence"] | null;
|
|
5476
|
+
pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
|
|
4776
5477
|
billing: {
|
|
4777
5478
|
creditsUsed: number;
|
|
5479
|
+
requestId?: string;
|
|
5480
|
+
jobId?: string;
|
|
4778
5481
|
};
|
|
4779
5482
|
}>;
|
|
4780
5483
|
captureWithReceipt(params: SerpIntelligenceCaptureParams, options?: SerpIntelligenceCaptureOptions): Promise<SerpIntelligenceCaptureReceipt>;
|
|
4781
5484
|
pageSnapshots(params: RequestBodyOf<'serpIntelligencePageSnapshots'>): Promise<{
|
|
4782
|
-
pageSnapshotArtifacts
|
|
5485
|
+
pageSnapshotArtifacts: components["schemas"]["SerpPageSnapshotCapture"][];
|
|
5486
|
+
attempts: components["schemas"]["SerpIntelligenceCaptureAttempt"][];
|
|
5487
|
+
diagnostics?: components["schemas"]["SerpIntelligencePageSnapshotDiagnostics"];
|
|
4783
5488
|
}>;
|
|
4784
5489
|
}
|
|
4785
5490
|
declare class WorkflowsNamespace {
|
|
@@ -5291,11 +5996,15 @@ type StructuredErrorBody = components['schemas']['StructuredError'];
|
|
|
5291
5996
|
type PublicErrorEnvelopeBody = components['schemas']['PublicErrorEnvelope'];
|
|
5292
5997
|
type ConcurrencyPackBody = components['schemas']['ConcurrencyPack'];
|
|
5293
5998
|
type ConcurrencyAccountViewBody = components['schemas']['ConcurrencyAccountView'];
|
|
5999
|
+
interface ScraperApiErrorDetails {
|
|
6000
|
+
requestId?: string;
|
|
6001
|
+
}
|
|
5294
6002
|
declare class ScraperApiError extends Error {
|
|
5295
6003
|
readonly status: number;
|
|
5296
6004
|
readonly code?: string;
|
|
5297
6005
|
readonly body: unknown;
|
|
5298
|
-
|
|
6006
|
+
readonly requestId?: string;
|
|
6007
|
+
constructor(status: number, body: unknown, details?: ScraperApiErrorDetails);
|
|
5299
6008
|
isInsufficientBalance(): this is ScraperApiError & {
|
|
5300
6009
|
body: InsufficientBalanceBody;
|
|
5301
6010
|
};
|
|
@@ -5313,4 +6022,4 @@ declare class ScraperApiError extends Error {
|
|
|
5313
6022
|
};
|
|
5314
6023
|
}
|
|
5315
6024
|
|
|
5316
|
-
export { type ArchiveReadParams, type ConcurrencyAccountViewBody, type ConcurrencyLimitBody, type ConcurrencyPackBody, type ExtractSiteOptions, type GmailMutationOptions, type HarvestParams, type IdempotentRequestOptions, type InsufficientBalanceBody, type PublicErrorEnvelopeBody, ScraperApiError, ScraperClient, type ScraperClientOptions, type ScraperRequestOptions, type SearchSerpParams, type SerpIntelligenceCaptureOptions, type SerpIntelligenceCaptureParams, type SerpIntelligenceCaptureReceipt, type StructuredErrorBody, type components, type operations, type paths };
|
|
6025
|
+
export { type ArchiveReadParams, type ConcurrencyAccountViewBody, type ConcurrencyLimitBody, type ConcurrencyPackBody, type DirectoryRunParams, type ExtractSiteOptions, type GmailMutationOptions, type HarvestParams, type IdempotentRequestOptions, type InsufficientBalanceBody, type MapsSearchParams, type PublicErrorEnvelopeBody, ScraperApiError, type ScraperApiErrorDetails, ScraperClient, type ScraperClientOptions, type ScraperRequestOptions, type SearchSerpParams, type SerpIntelligenceCaptureOptions, type SerpIntelligenceCaptureParams, type SerpIntelligenceCaptureReceipt, type StructuredErrorBody, type components, type operations, type paths };
|