stophy 1.4.0 → 1.4.2
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 +39 -103
- package/dist/index.cjs +73 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -73
- package/dist/index.d.ts +19 -73
- package/dist/index.js +73 -29
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -164,7 +164,10 @@ type ExtractResultResponses = {
|
|
|
164
164
|
* The extracted data.
|
|
165
165
|
*/
|
|
166
166
|
200: {
|
|
167
|
-
|
|
167
|
+
/**
|
|
168
|
+
* False when status is failed.
|
|
169
|
+
*/
|
|
170
|
+
success: boolean;
|
|
168
171
|
status: "completed" | "failed";
|
|
169
172
|
data: {
|
|
170
173
|
[key: string]: ExtractResultSchema0;
|
|
@@ -735,7 +738,7 @@ type SearchData = {
|
|
|
735
738
|
*/
|
|
736
739
|
country?: string;
|
|
737
740
|
/**
|
|
738
|
-
* Two-letter language for web results, like de.
|
|
741
|
+
* Two-letter language for web results, like de. A web source that does not support this language for the selected country can return results in another language with a warning.
|
|
739
742
|
*/
|
|
740
743
|
lang?: string;
|
|
741
744
|
} | {
|
|
@@ -772,7 +775,7 @@ type SearchData = {
|
|
|
772
775
|
*/
|
|
773
776
|
country?: string;
|
|
774
777
|
/**
|
|
775
|
-
* Two-letter language
|
|
778
|
+
* Two-letter language preference, like de. Applies to web results when web is selected, otherwise to news where supported. Results from a source that cannot honor it may be in another language and come with a warning.
|
|
776
779
|
*/
|
|
777
780
|
lang?: string;
|
|
778
781
|
includeDomains?: Array<string>;
|
|
@@ -1089,7 +1092,7 @@ type SearchData = {
|
|
|
1089
1092
|
saveChanges?: boolean;
|
|
1090
1093
|
};
|
|
1091
1094
|
/**
|
|
1092
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
1095
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
1093
1096
|
*/
|
|
1094
1097
|
zeroDataRetention?: boolean;
|
|
1095
1098
|
};
|
|
@@ -1644,9 +1647,6 @@ type SearchResponses = {
|
|
|
1644
1647
|
}>;
|
|
1645
1648
|
};
|
|
1646
1649
|
warning?: string;
|
|
1647
|
-
creditsUsed: number;
|
|
1648
|
-
costUsd: number;
|
|
1649
|
-
requestId?: string;
|
|
1650
1650
|
};
|
|
1651
1651
|
};
|
|
1652
1652
|
type SearchResponse = SearchResponses[keyof SearchResponses];
|
|
@@ -1948,7 +1948,7 @@ type ScrapeData = {
|
|
|
1948
1948
|
saveChanges?: boolean;
|
|
1949
1949
|
};
|
|
1950
1950
|
/**
|
|
1951
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
1951
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
1952
1952
|
*/
|
|
1953
1953
|
zeroDataRetention?: boolean;
|
|
1954
1954
|
/**
|
|
@@ -2056,14 +2056,10 @@ type ScrapeResponses = {
|
|
|
2056
2056
|
cacheState?: "hit" | "miss" | "stale";
|
|
2057
2057
|
cachedAt?: string;
|
|
2058
2058
|
scrapeId?: string;
|
|
2059
|
-
creditsUsed?: number;
|
|
2060
2059
|
costUsd?: number;
|
|
2061
2060
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
2062
2061
|
};
|
|
2063
2062
|
};
|
|
2064
|
-
creditsUsed: number;
|
|
2065
|
-
costUsd: number;
|
|
2066
|
-
requestId?: string;
|
|
2067
2063
|
};
|
|
2068
2064
|
};
|
|
2069
2065
|
type ScrapeResponse = ScrapeResponses[keyof ScrapeResponses];
|
|
@@ -2329,7 +2325,7 @@ type ExtractData = {
|
|
|
2329
2325
|
saveChanges?: boolean;
|
|
2330
2326
|
};
|
|
2331
2327
|
/**
|
|
2332
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
2328
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
2333
2329
|
*/
|
|
2334
2330
|
zeroDataRetention?: boolean;
|
|
2335
2331
|
};
|
|
@@ -2376,9 +2372,6 @@ type ExtractResponses = {
|
|
|
2376
2372
|
success: true;
|
|
2377
2373
|
id?: string;
|
|
2378
2374
|
invalidURLs: Array<string>;
|
|
2379
|
-
creditsUsed: number;
|
|
2380
|
-
costUsd: number;
|
|
2381
|
-
requestId?: string;
|
|
2382
2375
|
};
|
|
2383
2376
|
};
|
|
2384
2377
|
type ExtractResponse = ExtractResponses[keyof ExtractResponses];
|
|
@@ -2787,7 +2780,7 @@ type ParseResponses = {
|
|
|
2787
2780
|
*/
|
|
2788
2781
|
200: {
|
|
2789
2782
|
success: true;
|
|
2790
|
-
data
|
|
2783
|
+
data: {
|
|
2791
2784
|
markdown?: string;
|
|
2792
2785
|
html?: string;
|
|
2793
2786
|
rawHtml?: string;
|
|
@@ -2804,16 +2797,14 @@ type ParseResponses = {
|
|
|
2804
2797
|
[key: string]: ParseSchema0;
|
|
2805
2798
|
}>;
|
|
2806
2799
|
warning?: string;
|
|
2807
|
-
metadata
|
|
2800
|
+
metadata: {
|
|
2808
2801
|
title?: string;
|
|
2809
2802
|
contentType?: string;
|
|
2810
2803
|
numPages?: number;
|
|
2811
2804
|
ocrPages?: number;
|
|
2805
|
+
costUsd: number;
|
|
2812
2806
|
};
|
|
2813
2807
|
};
|
|
2814
|
-
creditsUsed: number;
|
|
2815
|
-
costUsd: number;
|
|
2816
|
-
requestId?: string;
|
|
2817
2808
|
};
|
|
2818
2809
|
};
|
|
2819
2810
|
type ParseResponse = ParseResponses[keyof ParseResponses];
|
|
@@ -2902,9 +2893,6 @@ type MapResponses = {
|
|
|
2902
2893
|
title?: string;
|
|
2903
2894
|
description?: string;
|
|
2904
2895
|
}>;
|
|
2905
|
-
creditsUsed: number;
|
|
2906
|
-
costUsd: number;
|
|
2907
|
-
requestId?: string;
|
|
2908
2896
|
};
|
|
2909
2897
|
};
|
|
2910
2898
|
type MapResponse = MapResponses[keyof MapResponses];
|
|
@@ -3266,7 +3254,7 @@ type CrawlData = {
|
|
|
3266
3254
|
saveChanges?: boolean;
|
|
3267
3255
|
};
|
|
3268
3256
|
/**
|
|
3269
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
3257
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
3270
3258
|
*/
|
|
3271
3259
|
zeroDataRetention?: boolean;
|
|
3272
3260
|
};
|
|
@@ -3324,9 +3312,6 @@ type CrawlResponses = {
|
|
|
3324
3312
|
url?: string;
|
|
3325
3313
|
status?: "scraping";
|
|
3326
3314
|
queuePosition?: number;
|
|
3327
|
-
creditsUsed: number;
|
|
3328
|
-
costUsd: number;
|
|
3329
|
-
requestId?: string;
|
|
3330
3315
|
};
|
|
3331
3316
|
};
|
|
3332
3317
|
type CrawlResponse = CrawlResponses[keyof CrawlResponses];
|
|
@@ -3361,9 +3346,6 @@ type CrawlCancelResponses = {
|
|
|
3361
3346
|
200: {
|
|
3362
3347
|
status: "cancelled";
|
|
3363
3348
|
success: true;
|
|
3364
|
-
creditsUsed: number;
|
|
3365
|
-
costUsd: number;
|
|
3366
|
-
requestId?: string;
|
|
3367
3349
|
};
|
|
3368
3350
|
};
|
|
3369
3351
|
type CrawlCancelResponse = CrawlCancelResponses[keyof CrawlCancelResponses];
|
|
@@ -3485,7 +3467,6 @@ type CrawlStatusResponses = {
|
|
|
3485
3467
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
3486
3468
|
};
|
|
3487
3469
|
}>;
|
|
3488
|
-
requestId?: string;
|
|
3489
3470
|
};
|
|
3490
3471
|
};
|
|
3491
3472
|
type CrawlStatusResponse = CrawlStatusResponses[keyof CrawlStatusResponses];
|
|
@@ -3812,7 +3793,7 @@ type BatchScrapeData = {
|
|
|
3812
3793
|
saveChanges?: boolean;
|
|
3813
3794
|
};
|
|
3814
3795
|
/**
|
|
3815
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
3796
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
3816
3797
|
*/
|
|
3817
3798
|
zeroDataRetention?: boolean;
|
|
3818
3799
|
/**
|
|
@@ -3865,9 +3846,6 @@ type BatchScrapeResponses = {
|
|
|
3865
3846
|
status?: "scraping";
|
|
3866
3847
|
queuePosition?: number;
|
|
3867
3848
|
invalidURLs: Array<string>;
|
|
3868
|
-
creditsUsed: number;
|
|
3869
|
-
costUsd: number;
|
|
3870
|
-
requestId?: string;
|
|
3871
3849
|
};
|
|
3872
3850
|
};
|
|
3873
3851
|
type BatchScrapeResponse = BatchScrapeResponses[keyof BatchScrapeResponses];
|
|
@@ -3902,9 +3880,6 @@ type BatchScrapeCancelResponses = {
|
|
|
3902
3880
|
200: {
|
|
3903
3881
|
status: "cancelled";
|
|
3904
3882
|
success: true;
|
|
3905
|
-
creditsUsed: number;
|
|
3906
|
-
costUsd: number;
|
|
3907
|
-
requestId?: string;
|
|
3908
3883
|
};
|
|
3909
3884
|
};
|
|
3910
3885
|
type BatchScrapeCancelResponse = BatchScrapeCancelResponses[keyof BatchScrapeCancelResponses];
|
|
@@ -4026,7 +4001,6 @@ type BatchScrapeStatusResponses = {
|
|
|
4026
4001
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
4027
4002
|
};
|
|
4028
4003
|
}>;
|
|
4029
|
-
requestId?: string;
|
|
4030
4004
|
};
|
|
4031
4005
|
};
|
|
4032
4006
|
type BatchScrapeStatusResponse = BatchScrapeStatusResponses[keyof BatchScrapeStatusResponses];
|
|
@@ -4156,14 +4130,11 @@ declare function bindSurface(call: Caller): {
|
|
|
4156
4130
|
success: true;
|
|
4157
4131
|
id?: string;
|
|
4158
4132
|
invalidURLs: Array<string>;
|
|
4159
|
-
creditsUsed: number;
|
|
4160
|
-
costUsd: number;
|
|
4161
|
-
requestId?: string;
|
|
4162
4133
|
}>) & {
|
|
4163
4134
|
result: (input: {
|
|
4164
4135
|
id: string;
|
|
4165
4136
|
}, options?: RequestOptions) => Promise<{
|
|
4166
|
-
success:
|
|
4137
|
+
success: boolean;
|
|
4167
4138
|
status: "completed" | "failed";
|
|
4168
4139
|
data: {
|
|
4169
4140
|
[key: string]: ExtractResultSchema0;
|
|
@@ -4850,9 +4821,6 @@ declare function bindSurface(call: Caller): {
|
|
|
4850
4821
|
}>;
|
|
4851
4822
|
};
|
|
4852
4823
|
warning?: string;
|
|
4853
|
-
creditsUsed: number;
|
|
4854
|
-
costUsd: number;
|
|
4855
|
-
requestId?: string;
|
|
4856
4824
|
}>) & {
|
|
4857
4825
|
developer: (body: {
|
|
4858
4826
|
query: string;
|
|
@@ -5085,14 +5053,10 @@ declare function bindSurface(call: Caller): {
|
|
|
5085
5053
|
cacheState?: "hit" | "miss" | "stale";
|
|
5086
5054
|
cachedAt?: string;
|
|
5087
5055
|
scrapeId?: string;
|
|
5088
|
-
creditsUsed?: number;
|
|
5089
5056
|
costUsd?: number;
|
|
5090
5057
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
5091
5058
|
};
|
|
5092
5059
|
};
|
|
5093
|
-
creditsUsed: number;
|
|
5094
|
-
costUsd: number;
|
|
5095
|
-
requestId?: string;
|
|
5096
5060
|
}>;
|
|
5097
5061
|
browser: {
|
|
5098
5062
|
task: ((body: {
|
|
@@ -5219,7 +5183,7 @@ declare function bindSurface(call: Caller): {
|
|
|
5219
5183
|
};
|
|
5220
5184
|
} | undefined, options?: RequestOptions) => Promise<{
|
|
5221
5185
|
success: true;
|
|
5222
|
-
data
|
|
5186
|
+
data: {
|
|
5223
5187
|
markdown?: string;
|
|
5224
5188
|
html?: string;
|
|
5225
5189
|
rawHtml?: string;
|
|
@@ -5236,16 +5200,14 @@ declare function bindSurface(call: Caller): {
|
|
|
5236
5200
|
[key: string]: ParseSchema0;
|
|
5237
5201
|
}>;
|
|
5238
5202
|
warning?: string;
|
|
5239
|
-
metadata
|
|
5203
|
+
metadata: {
|
|
5240
5204
|
title?: string;
|
|
5241
5205
|
contentType?: string;
|
|
5242
5206
|
numPages?: number;
|
|
5243
5207
|
ocrPages?: number;
|
|
5208
|
+
costUsd: number;
|
|
5244
5209
|
};
|
|
5245
5210
|
};
|
|
5246
|
-
creditsUsed: number;
|
|
5247
|
-
costUsd: number;
|
|
5248
|
-
requestId?: string;
|
|
5249
5211
|
}>;
|
|
5250
5212
|
map: (body: {
|
|
5251
5213
|
url: string;
|
|
@@ -5267,9 +5229,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5267
5229
|
title?: string;
|
|
5268
5230
|
description?: string;
|
|
5269
5231
|
}>;
|
|
5270
|
-
creditsUsed: number;
|
|
5271
|
-
costUsd: number;
|
|
5272
|
-
requestId?: string;
|
|
5273
5232
|
}>;
|
|
5274
5233
|
crawl: ((body: {
|
|
5275
5234
|
url: string;
|
|
@@ -5442,9 +5401,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5442
5401
|
url?: string;
|
|
5443
5402
|
status?: "scraping";
|
|
5444
5403
|
queuePosition?: number;
|
|
5445
|
-
creditsUsed: number;
|
|
5446
|
-
costUsd: number;
|
|
5447
|
-
requestId?: string;
|
|
5448
5404
|
}>) & {
|
|
5449
5405
|
status: (input: {
|
|
5450
5406
|
id: string;
|
|
@@ -5534,7 +5490,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5534
5490
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
5535
5491
|
};
|
|
5536
5492
|
}>;
|
|
5537
|
-
requestId?: string;
|
|
5538
5493
|
}>;
|
|
5539
5494
|
cancel: (input: {
|
|
5540
5495
|
id: string;
|
|
@@ -5543,9 +5498,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5543
5498
|
}, options?: RequestOptions) => Promise<{
|
|
5544
5499
|
status: "cancelled";
|
|
5545
5500
|
success: true;
|
|
5546
|
-
creditsUsed: number;
|
|
5547
|
-
costUsd: number;
|
|
5548
|
-
requestId?: string;
|
|
5549
5501
|
}>;
|
|
5550
5502
|
};
|
|
5551
5503
|
batch: {
|
|
@@ -5710,9 +5662,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5710
5662
|
status?: "scraping";
|
|
5711
5663
|
queuePosition?: number;
|
|
5712
5664
|
invalidURLs: Array<string>;
|
|
5713
|
-
creditsUsed: number;
|
|
5714
|
-
costUsd: number;
|
|
5715
|
-
requestId?: string;
|
|
5716
5665
|
}>) & {
|
|
5717
5666
|
status: (input: {
|
|
5718
5667
|
id: string;
|
|
@@ -5802,7 +5751,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5802
5751
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
5803
5752
|
};
|
|
5804
5753
|
}>;
|
|
5805
|
-
requestId?: string;
|
|
5806
5754
|
}>;
|
|
5807
5755
|
cancel: (input: {
|
|
5808
5756
|
id: string;
|
|
@@ -5811,9 +5759,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5811
5759
|
}, options?: RequestOptions) => Promise<{
|
|
5812
5760
|
status: "cancelled";
|
|
5813
5761
|
success: true;
|
|
5814
|
-
creditsUsed: number;
|
|
5815
|
-
costUsd: number;
|
|
5816
|
-
requestId?: string;
|
|
5817
5762
|
}>;
|
|
5818
5763
|
};
|
|
5819
5764
|
};
|
|
@@ -5871,6 +5816,7 @@ declare class StophyError extends Error {
|
|
|
5871
5816
|
readonly status: number;
|
|
5872
5817
|
readonly requestId?: string;
|
|
5873
5818
|
readonly details: Record<string, JsonValue>;
|
|
5819
|
+
readonly outcomeUnknown?: true;
|
|
5874
5820
|
constructor(message: string, options: {
|
|
5875
5821
|
status: number;
|
|
5876
5822
|
code?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -164,7 +164,10 @@ type ExtractResultResponses = {
|
|
|
164
164
|
* The extracted data.
|
|
165
165
|
*/
|
|
166
166
|
200: {
|
|
167
|
-
|
|
167
|
+
/**
|
|
168
|
+
* False when status is failed.
|
|
169
|
+
*/
|
|
170
|
+
success: boolean;
|
|
168
171
|
status: "completed" | "failed";
|
|
169
172
|
data: {
|
|
170
173
|
[key: string]: ExtractResultSchema0;
|
|
@@ -735,7 +738,7 @@ type SearchData = {
|
|
|
735
738
|
*/
|
|
736
739
|
country?: string;
|
|
737
740
|
/**
|
|
738
|
-
* Two-letter language for web results, like de.
|
|
741
|
+
* Two-letter language for web results, like de. A web source that does not support this language for the selected country can return results in another language with a warning.
|
|
739
742
|
*/
|
|
740
743
|
lang?: string;
|
|
741
744
|
} | {
|
|
@@ -772,7 +775,7 @@ type SearchData = {
|
|
|
772
775
|
*/
|
|
773
776
|
country?: string;
|
|
774
777
|
/**
|
|
775
|
-
* Two-letter language
|
|
778
|
+
* Two-letter language preference, like de. Applies to web results when web is selected, otherwise to news where supported. Results from a source that cannot honor it may be in another language and come with a warning.
|
|
776
779
|
*/
|
|
777
780
|
lang?: string;
|
|
778
781
|
includeDomains?: Array<string>;
|
|
@@ -1089,7 +1092,7 @@ type SearchData = {
|
|
|
1089
1092
|
saveChanges?: boolean;
|
|
1090
1093
|
};
|
|
1091
1094
|
/**
|
|
1092
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
1095
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
1093
1096
|
*/
|
|
1094
1097
|
zeroDataRetention?: boolean;
|
|
1095
1098
|
};
|
|
@@ -1644,9 +1647,6 @@ type SearchResponses = {
|
|
|
1644
1647
|
}>;
|
|
1645
1648
|
};
|
|
1646
1649
|
warning?: string;
|
|
1647
|
-
creditsUsed: number;
|
|
1648
|
-
costUsd: number;
|
|
1649
|
-
requestId?: string;
|
|
1650
1650
|
};
|
|
1651
1651
|
};
|
|
1652
1652
|
type SearchResponse = SearchResponses[keyof SearchResponses];
|
|
@@ -1948,7 +1948,7 @@ type ScrapeData = {
|
|
|
1948
1948
|
saveChanges?: boolean;
|
|
1949
1949
|
};
|
|
1950
1950
|
/**
|
|
1951
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
1951
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
1952
1952
|
*/
|
|
1953
1953
|
zeroDataRetention?: boolean;
|
|
1954
1954
|
/**
|
|
@@ -2056,14 +2056,10 @@ type ScrapeResponses = {
|
|
|
2056
2056
|
cacheState?: "hit" | "miss" | "stale";
|
|
2057
2057
|
cachedAt?: string;
|
|
2058
2058
|
scrapeId?: string;
|
|
2059
|
-
creditsUsed?: number;
|
|
2060
2059
|
costUsd?: number;
|
|
2061
2060
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
2062
2061
|
};
|
|
2063
2062
|
};
|
|
2064
|
-
creditsUsed: number;
|
|
2065
|
-
costUsd: number;
|
|
2066
|
-
requestId?: string;
|
|
2067
2063
|
};
|
|
2068
2064
|
};
|
|
2069
2065
|
type ScrapeResponse = ScrapeResponses[keyof ScrapeResponses];
|
|
@@ -2329,7 +2325,7 @@ type ExtractData = {
|
|
|
2329
2325
|
saveChanges?: boolean;
|
|
2330
2326
|
};
|
|
2331
2327
|
/**
|
|
2332
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
2328
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
2333
2329
|
*/
|
|
2334
2330
|
zeroDataRetention?: boolean;
|
|
2335
2331
|
};
|
|
@@ -2376,9 +2372,6 @@ type ExtractResponses = {
|
|
|
2376
2372
|
success: true;
|
|
2377
2373
|
id?: string;
|
|
2378
2374
|
invalidURLs: Array<string>;
|
|
2379
|
-
creditsUsed: number;
|
|
2380
|
-
costUsd: number;
|
|
2381
|
-
requestId?: string;
|
|
2382
2375
|
};
|
|
2383
2376
|
};
|
|
2384
2377
|
type ExtractResponse = ExtractResponses[keyof ExtractResponses];
|
|
@@ -2787,7 +2780,7 @@ type ParseResponses = {
|
|
|
2787
2780
|
*/
|
|
2788
2781
|
200: {
|
|
2789
2782
|
success: true;
|
|
2790
|
-
data
|
|
2783
|
+
data: {
|
|
2791
2784
|
markdown?: string;
|
|
2792
2785
|
html?: string;
|
|
2793
2786
|
rawHtml?: string;
|
|
@@ -2804,16 +2797,14 @@ type ParseResponses = {
|
|
|
2804
2797
|
[key: string]: ParseSchema0;
|
|
2805
2798
|
}>;
|
|
2806
2799
|
warning?: string;
|
|
2807
|
-
metadata
|
|
2800
|
+
metadata: {
|
|
2808
2801
|
title?: string;
|
|
2809
2802
|
contentType?: string;
|
|
2810
2803
|
numPages?: number;
|
|
2811
2804
|
ocrPages?: number;
|
|
2805
|
+
costUsd: number;
|
|
2812
2806
|
};
|
|
2813
2807
|
};
|
|
2814
|
-
creditsUsed: number;
|
|
2815
|
-
costUsd: number;
|
|
2816
|
-
requestId?: string;
|
|
2817
2808
|
};
|
|
2818
2809
|
};
|
|
2819
2810
|
type ParseResponse = ParseResponses[keyof ParseResponses];
|
|
@@ -2902,9 +2893,6 @@ type MapResponses = {
|
|
|
2902
2893
|
title?: string;
|
|
2903
2894
|
description?: string;
|
|
2904
2895
|
}>;
|
|
2905
|
-
creditsUsed: number;
|
|
2906
|
-
costUsd: number;
|
|
2907
|
-
requestId?: string;
|
|
2908
2896
|
};
|
|
2909
2897
|
};
|
|
2910
2898
|
type MapResponse = MapResponses[keyof MapResponses];
|
|
@@ -3266,7 +3254,7 @@ type CrawlData = {
|
|
|
3266
3254
|
saveChanges?: boolean;
|
|
3267
3255
|
};
|
|
3268
3256
|
/**
|
|
3269
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
3257
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
3270
3258
|
*/
|
|
3271
3259
|
zeroDataRetention?: boolean;
|
|
3272
3260
|
};
|
|
@@ -3324,9 +3312,6 @@ type CrawlResponses = {
|
|
|
3324
3312
|
url?: string;
|
|
3325
3313
|
status?: "scraping";
|
|
3326
3314
|
queuePosition?: number;
|
|
3327
|
-
creditsUsed: number;
|
|
3328
|
-
costUsd: number;
|
|
3329
|
-
requestId?: string;
|
|
3330
3315
|
};
|
|
3331
3316
|
};
|
|
3332
3317
|
type CrawlResponse = CrawlResponses[keyof CrawlResponses];
|
|
@@ -3361,9 +3346,6 @@ type CrawlCancelResponses = {
|
|
|
3361
3346
|
200: {
|
|
3362
3347
|
status: "cancelled";
|
|
3363
3348
|
success: true;
|
|
3364
|
-
creditsUsed: number;
|
|
3365
|
-
costUsd: number;
|
|
3366
|
-
requestId?: string;
|
|
3367
3349
|
};
|
|
3368
3350
|
};
|
|
3369
3351
|
type CrawlCancelResponse = CrawlCancelResponses[keyof CrawlCancelResponses];
|
|
@@ -3485,7 +3467,6 @@ type CrawlStatusResponses = {
|
|
|
3485
3467
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
3486
3468
|
};
|
|
3487
3469
|
}>;
|
|
3488
|
-
requestId?: string;
|
|
3489
3470
|
};
|
|
3490
3471
|
};
|
|
3491
3472
|
type CrawlStatusResponse = CrawlStatusResponses[keyof CrawlStatusResponses];
|
|
@@ -3812,7 +3793,7 @@ type BatchScrapeData = {
|
|
|
3812
3793
|
saveChanges?: boolean;
|
|
3813
3794
|
};
|
|
3814
3795
|
/**
|
|
3815
|
-
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000
|
|
3796
|
+
* Send true to keep nothing from this call: no stored copy is read or made, and nothing from it is logged. Adds $2 per 1,000 scraped URLs, not per PDF page. Not with a screenshot.
|
|
3816
3797
|
*/
|
|
3817
3798
|
zeroDataRetention?: boolean;
|
|
3818
3799
|
/**
|
|
@@ -3865,9 +3846,6 @@ type BatchScrapeResponses = {
|
|
|
3865
3846
|
status?: "scraping";
|
|
3866
3847
|
queuePosition?: number;
|
|
3867
3848
|
invalidURLs: Array<string>;
|
|
3868
|
-
creditsUsed: number;
|
|
3869
|
-
costUsd: number;
|
|
3870
|
-
requestId?: string;
|
|
3871
3849
|
};
|
|
3872
3850
|
};
|
|
3873
3851
|
type BatchScrapeResponse = BatchScrapeResponses[keyof BatchScrapeResponses];
|
|
@@ -3902,9 +3880,6 @@ type BatchScrapeCancelResponses = {
|
|
|
3902
3880
|
200: {
|
|
3903
3881
|
status: "cancelled";
|
|
3904
3882
|
success: true;
|
|
3905
|
-
creditsUsed: number;
|
|
3906
|
-
costUsd: number;
|
|
3907
|
-
requestId?: string;
|
|
3908
3883
|
};
|
|
3909
3884
|
};
|
|
3910
3885
|
type BatchScrapeCancelResponse = BatchScrapeCancelResponses[keyof BatchScrapeCancelResponses];
|
|
@@ -4026,7 +4001,6 @@ type BatchScrapeStatusResponses = {
|
|
|
4026
4001
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
4027
4002
|
};
|
|
4028
4003
|
}>;
|
|
4029
|
-
requestId?: string;
|
|
4030
4004
|
};
|
|
4031
4005
|
};
|
|
4032
4006
|
type BatchScrapeStatusResponse = BatchScrapeStatusResponses[keyof BatchScrapeStatusResponses];
|
|
@@ -4156,14 +4130,11 @@ declare function bindSurface(call: Caller): {
|
|
|
4156
4130
|
success: true;
|
|
4157
4131
|
id?: string;
|
|
4158
4132
|
invalidURLs: Array<string>;
|
|
4159
|
-
creditsUsed: number;
|
|
4160
|
-
costUsd: number;
|
|
4161
|
-
requestId?: string;
|
|
4162
4133
|
}>) & {
|
|
4163
4134
|
result: (input: {
|
|
4164
4135
|
id: string;
|
|
4165
4136
|
}, options?: RequestOptions) => Promise<{
|
|
4166
|
-
success:
|
|
4137
|
+
success: boolean;
|
|
4167
4138
|
status: "completed" | "failed";
|
|
4168
4139
|
data: {
|
|
4169
4140
|
[key: string]: ExtractResultSchema0;
|
|
@@ -4850,9 +4821,6 @@ declare function bindSurface(call: Caller): {
|
|
|
4850
4821
|
}>;
|
|
4851
4822
|
};
|
|
4852
4823
|
warning?: string;
|
|
4853
|
-
creditsUsed: number;
|
|
4854
|
-
costUsd: number;
|
|
4855
|
-
requestId?: string;
|
|
4856
4824
|
}>) & {
|
|
4857
4825
|
developer: (body: {
|
|
4858
4826
|
query: string;
|
|
@@ -5085,14 +5053,10 @@ declare function bindSurface(call: Caller): {
|
|
|
5085
5053
|
cacheState?: "hit" | "miss" | "stale";
|
|
5086
5054
|
cachedAt?: string;
|
|
5087
5055
|
scrapeId?: string;
|
|
5088
|
-
creditsUsed?: number;
|
|
5089
5056
|
costUsd?: number;
|
|
5090
5057
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
5091
5058
|
};
|
|
5092
5059
|
};
|
|
5093
|
-
creditsUsed: number;
|
|
5094
|
-
costUsd: number;
|
|
5095
|
-
requestId?: string;
|
|
5096
5060
|
}>;
|
|
5097
5061
|
browser: {
|
|
5098
5062
|
task: ((body: {
|
|
@@ -5219,7 +5183,7 @@ declare function bindSurface(call: Caller): {
|
|
|
5219
5183
|
};
|
|
5220
5184
|
} | undefined, options?: RequestOptions) => Promise<{
|
|
5221
5185
|
success: true;
|
|
5222
|
-
data
|
|
5186
|
+
data: {
|
|
5223
5187
|
markdown?: string;
|
|
5224
5188
|
html?: string;
|
|
5225
5189
|
rawHtml?: string;
|
|
@@ -5236,16 +5200,14 @@ declare function bindSurface(call: Caller): {
|
|
|
5236
5200
|
[key: string]: ParseSchema0;
|
|
5237
5201
|
}>;
|
|
5238
5202
|
warning?: string;
|
|
5239
|
-
metadata
|
|
5203
|
+
metadata: {
|
|
5240
5204
|
title?: string;
|
|
5241
5205
|
contentType?: string;
|
|
5242
5206
|
numPages?: number;
|
|
5243
5207
|
ocrPages?: number;
|
|
5208
|
+
costUsd: number;
|
|
5244
5209
|
};
|
|
5245
5210
|
};
|
|
5246
|
-
creditsUsed: number;
|
|
5247
|
-
costUsd: number;
|
|
5248
|
-
requestId?: string;
|
|
5249
5211
|
}>;
|
|
5250
5212
|
map: (body: {
|
|
5251
5213
|
url: string;
|
|
@@ -5267,9 +5229,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5267
5229
|
title?: string;
|
|
5268
5230
|
description?: string;
|
|
5269
5231
|
}>;
|
|
5270
|
-
creditsUsed: number;
|
|
5271
|
-
costUsd: number;
|
|
5272
|
-
requestId?: string;
|
|
5273
5232
|
}>;
|
|
5274
5233
|
crawl: ((body: {
|
|
5275
5234
|
url: string;
|
|
@@ -5442,9 +5401,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5442
5401
|
url?: string;
|
|
5443
5402
|
status?: "scraping";
|
|
5444
5403
|
queuePosition?: number;
|
|
5445
|
-
creditsUsed: number;
|
|
5446
|
-
costUsd: number;
|
|
5447
|
-
requestId?: string;
|
|
5448
5404
|
}>) & {
|
|
5449
5405
|
status: (input: {
|
|
5450
5406
|
id: string;
|
|
@@ -5534,7 +5490,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5534
5490
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
5535
5491
|
};
|
|
5536
5492
|
}>;
|
|
5537
|
-
requestId?: string;
|
|
5538
5493
|
}>;
|
|
5539
5494
|
cancel: (input: {
|
|
5540
5495
|
id: string;
|
|
@@ -5543,9 +5498,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5543
5498
|
}, options?: RequestOptions) => Promise<{
|
|
5544
5499
|
status: "cancelled";
|
|
5545
5500
|
success: true;
|
|
5546
|
-
creditsUsed: number;
|
|
5547
|
-
costUsd: number;
|
|
5548
|
-
requestId?: string;
|
|
5549
5501
|
}>;
|
|
5550
5502
|
};
|
|
5551
5503
|
batch: {
|
|
@@ -5710,9 +5662,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5710
5662
|
status?: "scraping";
|
|
5711
5663
|
queuePosition?: number;
|
|
5712
5664
|
invalidURLs: Array<string>;
|
|
5713
|
-
creditsUsed: number;
|
|
5714
|
-
costUsd: number;
|
|
5715
|
-
requestId?: string;
|
|
5716
5665
|
}>) & {
|
|
5717
5666
|
status: (input: {
|
|
5718
5667
|
id: string;
|
|
@@ -5802,7 +5751,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5802
5751
|
[key: string]: unknown | string | number | ("hit" | "miss" | "stale") | number | undefined;
|
|
5803
5752
|
};
|
|
5804
5753
|
}>;
|
|
5805
|
-
requestId?: string;
|
|
5806
5754
|
}>;
|
|
5807
5755
|
cancel: (input: {
|
|
5808
5756
|
id: string;
|
|
@@ -5811,9 +5759,6 @@ declare function bindSurface(call: Caller): {
|
|
|
5811
5759
|
}, options?: RequestOptions) => Promise<{
|
|
5812
5760
|
status: "cancelled";
|
|
5813
5761
|
success: true;
|
|
5814
|
-
creditsUsed: number;
|
|
5815
|
-
costUsd: number;
|
|
5816
|
-
requestId?: string;
|
|
5817
5762
|
}>;
|
|
5818
5763
|
};
|
|
5819
5764
|
};
|
|
@@ -5871,6 +5816,7 @@ declare class StophyError extends Error {
|
|
|
5871
5816
|
readonly status: number;
|
|
5872
5817
|
readonly requestId?: string;
|
|
5873
5818
|
readonly details: Record<string, JsonValue>;
|
|
5819
|
+
readonly outcomeUnknown?: true;
|
|
5874
5820
|
constructor(message: string, options: {
|
|
5875
5821
|
status: number;
|
|
5876
5822
|
code?: string;
|