@scrapa/sdk 0.3.0 → 0.5.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 +52 -2
- package/dist/errors.d.ts +7 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -5
- package/dist/errors.js.map +1 -1
- package/dist/generated/contract.d.ts +114 -17
- package/dist/generated/contract.d.ts.map +1 -1
- package/dist/generated/contract.js +33 -13
- package/dist/generated/contract.js.map +1 -1
- package/dist/generated/operations.d.ts +61 -21
- package/dist/generated/operations.d.ts.map +1 -1
- package/dist/generated/operations.js +73 -19
- package/dist/generated/operations.js.map +1 -1
- package/dist/generated/params.d.ts +493 -61
- package/dist/generated/params.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/errors.ts +11 -7
- package/src/generated/contract.ts +138 -20
- package/src/generated/operations.ts +93 -19
- package/src/generated/params.ts +531 -61
package/README.md
CHANGED
|
@@ -39,6 +39,17 @@ page.links; // every absolute link, in document order
|
|
|
39
39
|
page.metadata.title;
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
`markdown` and `text` hold the page's main content, without the menus, the share buttons or
|
|
43
|
+
the related posts. Send `onlyMainContent: false` for the whole page, or pick the parts
|
|
44
|
+
yourself with CSS selectors:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
const post = await scrapa.scrape({ url: "https://example.com/blog/hello", includeTags: ["article"] });
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A link to a PDF or a Word file comes back as text too, and `metadata.pages` says how many
|
|
51
|
+
pages the PDF has.
|
|
52
|
+
|
|
42
53
|
Ask for a screenshot or a PDF and the browser is used whatever `engine` says. Both come back
|
|
43
54
|
base64-encoded, and asking for both costs no more than asking for one.
|
|
44
55
|
|
|
@@ -47,6 +58,18 @@ const shot = await scrapa.scrape({ url: "https://stripe.com", formats: ["screens
|
|
|
47
58
|
await writeFile("stripe.png", Buffer.from(shot.screenshot!, "base64"));
|
|
48
59
|
```
|
|
49
60
|
|
|
61
|
+
Reading the same page again within the hour? Send `maxAge`, the oldest copy you accept in
|
|
62
|
+
milliseconds (up to `3600000`). If we still hold a copy your account read of that URL, from
|
|
63
|
+
the same country with the same engine, in that time, you get it back for 0 credits (`extract` is
|
|
64
|
+
still charged), with `cached: true` and `cachedAt`, the time it was read. If not, the page is read now at the usual
|
|
65
|
+
price. We may drop a copy sooner, to make room or on a deploy, and a batch keeps its own
|
|
66
|
+
copies, apart from single calls. A copy is never shared with another account.
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
const page = await scrapa.scrape({ url: "https://example.com/pricing", maxAge: 600_000 }); // 10 minutes
|
|
70
|
+
page.cached; // true when it came from a copy, so the page cost nothing
|
|
71
|
+
```
|
|
72
|
+
|
|
50
73
|
## Where calls come from
|
|
51
74
|
|
|
52
75
|
Every call leaves through a residential address in the United States unless it says
|
|
@@ -90,6 +113,9 @@ found.results[0].url; // array order IS the ranking: there is no score to sort b
|
|
|
90
113
|
found.cached; // the same question inside the window costs nothing and says so
|
|
91
114
|
```
|
|
92
115
|
|
|
116
|
+
`topic: "images"` hands back pictures: each hit's `url` is the page that shows one, and
|
|
117
|
+
`hit.image` holds the picture's own address, a thumbnail that always loads and its size.
|
|
118
|
+
Credit the page, not the file: no hit says who owns a picture.
|
|
93
119
|
`topic: "news"` is the one topic that reliably carries `publishedAt`. `includeDomains` is
|
|
94
120
|
asked of the front *and* enforced on the answer, so what comes back is on your list whatever
|
|
95
121
|
the front did with the operator. `answer: true` adds a paragraph written over the hits. To
|
|
@@ -98,6 +124,25 @@ read any result, hand its URL straight to `scrape()`.
|
|
|
98
124
|
A search every front refused costs nothing. A search that ran and found nothing is charged.
|
|
99
125
|
The index answered, and "nothing published that" is an answer.
|
|
100
126
|
|
|
127
|
+
## Listing a site's pages
|
|
128
|
+
|
|
129
|
+
`map()` hands back every URL a site lists, without reading the pages. The list comes from the
|
|
130
|
+
site's robots.txt, its sitemaps (gzipped ones and indexes too) and the links on the page you
|
|
131
|
+
name.
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
const { urls } = await scrapa.map({ url: "https://example.com" });
|
|
135
|
+
|
|
136
|
+
urls[0]; // { url: "https://example.com", lastmod: "2026-10-01" }
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Each URL comes back once, without `utm_` parameters, a `#` part or a trailing slash. Only the
|
|
140
|
+
host you named is kept unless you pass `includeSubdomains: true`, and `search: "blog"` keeps
|
|
141
|
+
the URLs that contain the word. `truncated: true` means the site may list more than you got.
|
|
142
|
+
|
|
143
|
+
The price does not change with what a map finds. Only managed-pool bandwidth past the first
|
|
144
|
+
megabyte is added. Price one first with `quoteMap()`.
|
|
145
|
+
|
|
101
146
|
## Driving a real browser
|
|
102
147
|
|
|
103
148
|
A session is one Chromium held for you, with a CDP URL your own tools connect to. We hand
|
|
@@ -200,7 +245,10 @@ try {
|
|
|
200
245
|
} catch (error) {
|
|
201
246
|
if (!(error instanceof ScrapaError)) throw error;
|
|
202
247
|
switch (error.outcome) {
|
|
203
|
-
case "blocked":
|
|
248
|
+
case "blocked":
|
|
249
|
+
// time ran out, nobody said no: give the page more time
|
|
250
|
+
if (error.code === "NAV_TIMEOUT") return scrapa.scrape({ url, timeoutMs: 60_000 });
|
|
251
|
+
// the site said no: try another pool, country or engine
|
|
204
252
|
return scrapa.scrape({ url, proxy: { pool: "residential", country: "de" } });
|
|
205
253
|
case "denied": // our policy said no: retrying cannot help, change the URL
|
|
206
254
|
return null;
|
|
@@ -212,7 +260,9 @@ try {
|
|
|
212
260
|
```
|
|
213
261
|
|
|
214
262
|
`error.cost` is `0` on every one of those, because a page you did not get is a page you do not
|
|
215
|
-
pay for.
|
|
263
|
+
pay for. The one exception is a call whose own `browser.actions` script ran in the page first:
|
|
264
|
+
a `blocked` or `denied` answer then keeps the browser price and its bandwidth, because the
|
|
265
|
+
script may already have read the page. A `broken` call is always refunded. `error.code` carries the exact reason, `error.retryAfter` says when a limit clears,
|
|
216
266
|
and `error.requestId` is what support needs to find the call.
|
|
217
267
|
|
|
218
268
|
One code has no `outcome` and is not your mistake: `INVALID_RESPONSE`. The call got a success
|
package/dist/errors.d.ts
CHANGED
|
@@ -18,8 +18,9 @@ export interface ScrapaErrorInit {
|
|
|
18
18
|
requestId?: string;
|
|
19
19
|
/** The call may have run, and been charged, though no answer from the API says so. */
|
|
20
20
|
mayHaveRun?: boolean;
|
|
21
|
-
/** What this call cost. Zero on
|
|
22
|
-
*
|
|
21
|
+
/** What this call cost. Zero on a refusal, except one your own `browser.actions` script
|
|
22
|
+
* could have caused once it started: that one keeps the browser price and its bandwidth
|
|
23
|
+
* (https://docs.scrapa.app/en/guides/credits lists which). A 5xx is always refunded. */
|
|
23
24
|
cost?: number;
|
|
24
25
|
creditsRemaining?: number;
|
|
25
26
|
cause?: unknown;
|
|
@@ -45,8 +46,10 @@ export declare class ScrapaError extends Error {
|
|
|
45
46
|
/**
|
|
46
47
|
* Who said no — the one thing that decides what to do next.
|
|
47
48
|
*
|
|
48
|
-
* "blocked" the site refused the page. It cost you nothing
|
|
49
|
-
*
|
|
49
|
+
* "blocked" the site refused the page. It cost you nothing, unless your own
|
|
50
|
+
* `browser.actions` script ran in the page first. Try another engine, pool
|
|
51
|
+
* or country. The same call again will be refused again. One code here is
|
|
52
|
+
* not a refusal: on NAV_TIMEOUT time ran out, so send a larger `timeoutMs`.
|
|
50
53
|
* "denied" our policy refused this URL (a private address, the acceptable-use list).
|
|
51
54
|
* Retrying cannot help; change the URL.
|
|
52
55
|
* "broken" we broke it, and already refunded it. Worth one retry as-is.
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAQA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAA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,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;gBAEvB,IAAI,EAAE,eAAe;IAejC;;;;;;;;;;;;;;OAcG;IACH,IAAI,OAAO,IAAI,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAEzD;IAED;;uEAEmE;IACnE,IAAI,SAAS,IAAI,OAAO,CAQvB;CACJ;AAiBD;;4CAE4C;AAC5C,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAuDvE"}
|
package/dist/errors.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
//
|
|
3
3
|
// The API answers a refusal with a machine-readable code, and acting on the code is the
|
|
4
4
|
// whole point: it says WHO said no, which is what decides the caller's next move. The site
|
|
5
|
-
// blocked the page (try another engine, pool or country),
|
|
6
|
-
// (retrying cannot help), a limit needs waiting out,
|
|
7
|
-
// refunded). Collapse that into `Error("Request failed")`
|
|
5
|
+
// blocked the page (try another engine, pool or country), time ran out (send a larger
|
|
6
|
+
// `timeoutMs`), our policy refused the URL (retrying cannot help), a limit needs waiting out,
|
|
7
|
+
// or we broke it (retry as-is, it was refunded). Collapse that into `Error("Request failed")`
|
|
8
|
+
// and the caller is left guessing.
|
|
8
9
|
import { HEADERS, OUTCOME_OF } from "./generated/contract.js";
|
|
9
10
|
import { retryAfterSecs } from "./generated/retry.js";
|
|
10
11
|
export class ScrapaError extends Error {
|
|
@@ -41,8 +42,10 @@ export class ScrapaError extends Error {
|
|
|
41
42
|
/**
|
|
42
43
|
* Who said no — the one thing that decides what to do next.
|
|
43
44
|
*
|
|
44
|
-
* "blocked" the site refused the page. It cost you nothing
|
|
45
|
-
*
|
|
45
|
+
* "blocked" the site refused the page. It cost you nothing, unless your own
|
|
46
|
+
* `browser.actions` script ran in the page first. Try another engine, pool
|
|
47
|
+
* or country. The same call again will be refused again. One code here is
|
|
48
|
+
* not a refusal: on NAV_TIMEOUT time ran out, so send a larger `timeoutMs`.
|
|
46
49
|
* "denied" our policy refused this URL (a private address, the acceptable-use list).
|
|
47
50
|
* Retrying cannot help; change the URL.
|
|
48
51
|
* "broken" we broke it, and already refunded it. Worth one retry as-is.
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,wFAAwF;AACxF,2FAA2F;AAC3F,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,EAAE;AACF,wFAAwF;AACxF,2FAA2F;AAC3F,sFAAsF;AACtF,8FAA8F;AAC9F,8FAA8F;AAC9F,mCAAmC;AACnC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA8BtD,MAAM,OAAO,WAAY,SAAQ,KAAK;IACzB,IAAI,CAA8B;IAClC,MAAM,CAAS;IACf,UAAU,CAAU;IACpB,MAAM,CAAmC;IACzC,OAAO,CAAW;IAClB,UAAU,CAAU;IACpB,SAAS,CAAU;IAC5B;;;;;OAKG;IACM,UAAU,CAAU;IACpB,IAAI,CAAU;IACd,gBAAgB,CAAU;IAEnC,YAAY,IAAqB;QAC7B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAClF,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,C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
|
|
5
5
|
*
|
|
6
6
|
* THE WHOSE-FAULT VOCABULARY (DESIGN.md) is the organising principle: a caller's next move
|
|
7
|
-
* depends entirely on who said no, so the code says. `UPSTREAM_BLOCKED`
|
|
8
|
-
*
|
|
7
|
+
* depends entirely on who said no, so the code says. `UPSTREAM_BLOCKED` is "the site said no"
|
|
8
|
+
* (retry differently — another engine, pool or country), and `NAV_TIMEOUT` shares its hue under
|
|
9
|
+
* its own word, "time ran out" (give it more time; see `OWN_WORD`); `SSRF_DENIED` /
|
|
9
10
|
* `AUP_DENIED` are "our policy said no" (retrying cannot help, change the URL); a 5xx is
|
|
10
11
|
* "we broke it" (retry as-is, already refunded).
|
|
11
12
|
*/
|
|
12
|
-
export declare const ERROR_CODES: readonly ["VALIDATION_ERROR", "INVALID_URL", "SSRF_DENIED", "UNAUTHORIZED", "INVALID_TOKEN", "PLAN_GATE", "FORBIDDEN", "AUP_DENIED", "NOT_FOUND", "SESSION_NOT_FOUND", "CONFLICT", "PAYLOAD_TOO_LARGE", "UPSTREAM_BLOCKED", "NAV_TIMEOUT", "PROXY_REFUSED", "FILE_TOO_LARGE", "RATE_LIMIT_EXCEEDED", "QUOTA_EXCEEDED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE", "BILLING_UNAVAILABLE"];
|
|
13
|
+
export declare const ERROR_CODES: readonly ["VALIDATION_ERROR", "INVALID_URL", "SSRF_DENIED", "UNAUTHORIZED", "INVALID_TOKEN", "PLAN_GATE", "FORBIDDEN", "AUP_DENIED", "NOT_FOUND", "SESSION_NOT_FOUND", "CONFLICT", "PAYLOAD_TOO_LARGE", "UPSTREAM_BLOCKED", "NAV_TIMEOUT", "PROXY_REFUSED", "FILE_TOO_LARGE", "DOCUMENT_TIMEOUT", "ACTION_FAILED", "RATE_LIMIT_EXCEEDED", "QUOTA_EXCEEDED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE", "BILLING_UNAVAILABLE"];
|
|
13
14
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
|
14
15
|
/** The status each code answers with. The server's error factory, the SDK's fallback and
|
|
15
16
|
* the docs' errors table all read this one map — three copies could drift, one cannot. */
|
|
@@ -30,6 +31,8 @@ export declare const ERROR_STATUS: {
|
|
|
30
31
|
readonly NAV_TIMEOUT: 422;
|
|
31
32
|
readonly PROXY_REFUSED: 422;
|
|
32
33
|
readonly FILE_TOO_LARGE: 422;
|
|
34
|
+
readonly DOCUMENT_TIMEOUT: 422;
|
|
35
|
+
readonly ACTION_FAILED: 422;
|
|
33
36
|
readonly RATE_LIMIT_EXCEEDED: 429;
|
|
34
37
|
readonly QUOTA_EXCEEDED: 429;
|
|
35
38
|
readonly INTERNAL_ERROR: 500;
|
|
@@ -37,11 +40,15 @@ export declare const ERROR_STATUS: {
|
|
|
37
40
|
readonly BILLING_UNAVAILABLE: 503;
|
|
38
41
|
};
|
|
39
42
|
/**
|
|
40
|
-
* The three
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
43
|
+
* The three outcomes that get a colour, as DESIGN.md names them. Each code here maps to
|
|
44
|
+
* exactly one, and the SDK's `outcome` reads this map to tell a caller what to do next. A code
|
|
45
|
+
* absent from here gets no colour: the caller's own mistake (a bad body, a missing key), or a
|
|
46
|
+
* refusal whose fix is in the request rather than the site (PROXY_REFUSED, FILE_TOO_LARGE,
|
|
47
|
+
* DOCUMENT_TIMEOUT, ACTION_FAILED).
|
|
48
|
+
*
|
|
49
|
+
* Every one of these refusals is free, unless the caller's own `browser.actions` script ran
|
|
50
|
+
* in the page first: then a refusal the script could have caused keeps the browser price and
|
|
51
|
+
* its bandwidth (https://docs.scrapa.app/en/guides/credits lists which). `broken` is always refunded.
|
|
45
52
|
*
|
|
46
53
|
* blocked → the site said no → try another engine, pool or country
|
|
47
54
|
* denied → our policy said no → change the URL; retrying cannot help
|
|
@@ -129,13 +136,16 @@ export type ScrapeFormat = (typeof SCRAPE_FORMATS)[number];
|
|
|
129
136
|
export declare const SESSION_STATUSES: readonly ["starting", "live", "closed", "expired", "failed"];
|
|
130
137
|
export type SessionStatus = (typeof SESSION_STATUSES)[number];
|
|
131
138
|
/** What a search is looking for. `general` is the web; `news` is dated journalism — a
|
|
132
|
-
* different door at every engine, and the only one that reliably carries a date
|
|
133
|
-
|
|
139
|
+
* different door at every engine, and the only one that reliably carries a date; `images`
|
|
140
|
+
* is pictures, each tied to the page that holds it. */
|
|
141
|
+
export declare const SEARCH_TOPICS: readonly ["general", "news", "images"];
|
|
134
142
|
export type SearchTopic = (typeof SEARCH_TOPICS)[number];
|
|
135
143
|
/** Which front answered a search. Not a caller's choice — the ladder picks, and says which
|
|
136
144
|
* one it was, because a result set's flavour follows its index. */
|
|
137
145
|
export declare const SEARCH_ENGINES: readonly ["bing", "brave", "duckduckgo"];
|
|
138
146
|
export type SearchEngine = (typeof SEARCH_ENGINES)[number];
|
|
147
|
+
/** Where a map's URLs came from. With none found, the sources that were read. */
|
|
148
|
+
export type MapSource = "sitemap" | "links" | "both";
|
|
139
149
|
/** A batch's life. `queued` is accepted but not yet picked up; `running` has at least one
|
|
140
150
|
* item in flight. The three end states answer the same question the session statuses do —
|
|
141
151
|
* who ended it: `completed` ran every item to a verdict (some of which may be failures,
|
|
@@ -186,6 +196,12 @@ export interface ScrapeMetadataDto {
|
|
|
186
196
|
* it so a caller can retry with `engine: "browser"` instead of trusting an empty page.
|
|
187
197
|
* Always false from the browser engine, which ran the scripts. */
|
|
188
198
|
needsJs: boolean;
|
|
199
|
+
/** How many pages the PDF has, when a PDF was read into text. Absent for anything else,
|
|
200
|
+
* and when only "raw" was asked for. */
|
|
201
|
+
pages?: number;
|
|
202
|
+
/** True when we read only part of the PDF: its first 200 pages, or its first 5 million
|
|
203
|
+
* characters of text, are in the answer and the rest is not. Absent otherwise. */
|
|
204
|
+
truncated?: boolean;
|
|
189
205
|
}
|
|
190
206
|
/** A file, exactly as the site sent it. */
|
|
191
207
|
export interface ScrapeRawDto {
|
|
@@ -194,6 +210,25 @@ export interface ScrapeRawDto {
|
|
|
194
210
|
/** The response's `content-type`, media type only: `application/pdf`. */
|
|
195
211
|
contentType: string | null;
|
|
196
212
|
}
|
|
213
|
+
/** The page's address and HTML at the moment a `scrape` step ran. */
|
|
214
|
+
export interface ScrapeActionPageDto {
|
|
215
|
+
url: string;
|
|
216
|
+
html: string;
|
|
217
|
+
}
|
|
218
|
+
/** What a script returned, as JSON. */
|
|
219
|
+
export interface ScrapeActionReturnDto {
|
|
220
|
+
/** null when the script returned nothing, or something JSON cannot hold. */
|
|
221
|
+
value: unknown;
|
|
222
|
+
}
|
|
223
|
+
/** What the `browser.actions` steps kept along the way, each list in the order its steps ran. */
|
|
224
|
+
export interface ScrapeActionsDto {
|
|
225
|
+
/** One base64 PNG per `screenshot` step. */
|
|
226
|
+
screenshots: string[];
|
|
227
|
+
/** One per `scrape` step. */
|
|
228
|
+
scrapes: ScrapeActionPageDto[];
|
|
229
|
+
/** One per `executeJavascript` step. */
|
|
230
|
+
javascriptReturns: ScrapeActionReturnDto[];
|
|
231
|
+
}
|
|
197
232
|
/** `POST /v1/scrape`'s answer. Only the requested formats are present; everything else is
|
|
198
233
|
* always there. Artifacts (`screenshot`, `pdf`) are base64 in v1. */
|
|
199
234
|
export interface ScrapeResultDto {
|
|
@@ -218,6 +253,12 @@ export interface ScrapeResultDto {
|
|
|
218
253
|
* `fetch`: the body, decompressed — what the caller received. `browser`: every response
|
|
219
254
|
* the page pulled, as carried on the wire. An `auto` call that escalated counts both. */
|
|
220
255
|
bytes: number;
|
|
256
|
+
/** True when this answer is a copy of the page we read for your account earlier, because
|
|
257
|
+
* you sent `maxAge`. The page then costs 0 credits and carries no bandwidth; `extract` on
|
|
258
|
+
* it is still charged. */
|
|
259
|
+
cached: boolean;
|
|
260
|
+
/** When the copy was read, ISO 8601. Present only when `cached` is true. */
|
|
261
|
+
cachedAt?: string;
|
|
221
262
|
markdown?: string;
|
|
222
263
|
html?: string;
|
|
223
264
|
text?: string;
|
|
@@ -231,6 +272,9 @@ export interface ScrapeResultDto {
|
|
|
231
272
|
* could not answer — that credit is handed back and the page still stands. Present only
|
|
232
273
|
* when `extract` was in `formats`. */
|
|
233
274
|
extract?: Record<string, unknown> | null;
|
|
275
|
+
/** What the `browser.actions` steps kept. Present only when the request sent steps; the
|
|
276
|
+
* formats above read the page as the last step left it. */
|
|
277
|
+
actions?: ScrapeActionsDto;
|
|
234
278
|
metadata: ScrapeMetadataDto;
|
|
235
279
|
}
|
|
236
280
|
/** `dryRun: true`'s answer — the price of the call, without making it. */
|
|
@@ -254,8 +298,9 @@ export interface ScrapeQuoteDto {
|
|
|
254
298
|
*
|
|
255
299
|
* The rule that shapes everything here is that **a batch is N scrapes and nothing more**.
|
|
256
300
|
* Each item is charged exactly what the same call would have cost synchronously, on the
|
|
257
|
-
* same terms
|
|
258
|
-
*
|
|
301
|
+
* same terms (a blocked page is free inside a batch too, unless the caller's own
|
|
302
|
+
* `browser.actions` script ran in it first), so there is no batch price, no discount and no
|
|
303
|
+
* surcharge to reason about. What the caller buys is not having to hold a
|
|
259
304
|
* connection open for an hour.
|
|
260
305
|
*
|
|
261
306
|
* `cost` and `bytes` therefore GROW while the batch runs. They are what it has spent so
|
|
@@ -273,7 +318,8 @@ export interface BatchDto {
|
|
|
273
318
|
completed: number;
|
|
274
319
|
/** Of those, how many the web or our policy refused. A `failed` count equal to `total`
|
|
275
320
|
* is still a `completed` batch: every URL got a verdict, and the verdicts were
|
|
276
|
-
* refusals. Free ones
|
|
321
|
+
* refusals. Free ones: a blocked page costs nothing here too, unless the caller's own
|
|
322
|
+
* `browser.actions` script ran in it first. */
|
|
277
323
|
failed: number;
|
|
278
324
|
/** Of those, how many were never attempted — the batch was cancelled, the month's
|
|
279
325
|
* credits ran out under it, or we could not finish it. Counted APART from `failed`
|
|
@@ -336,13 +382,15 @@ export interface BatchWebhookDto {
|
|
|
336
382
|
* events there are many deliveries against one batch, and this is not their sum. */
|
|
337
383
|
attempts: number;
|
|
338
384
|
}
|
|
339
|
-
/** `POST /v1/batches/quote
|
|
340
|
-
* synchronous call would be, so this is `total` × that
|
|
341
|
-
*
|
|
385
|
+
/** `POST /v1/batches/quote`: the ceiling, not a bill. Every item is priced as the same
|
|
386
|
+
* synchronous call would be, so this is `total` × that. The real cost is lower by every page
|
|
387
|
+
* that never needed a browser, and by the outcomes that cost nothing: a page the site blocked
|
|
388
|
+
* or our policy refused (unless the item's own `browser.actions` script ran in it first) and
|
|
389
|
+
* anything we broke. */
|
|
342
390
|
export interface BatchQuoteDto {
|
|
343
391
|
total: number;
|
|
344
392
|
pool: ProxyPool;
|
|
345
|
-
/** What one item would cost at most
|
|
393
|
+
/** What one item would cost at most: the browser row for `auto`, since that is the
|
|
346
394
|
* ceiling a page can escalate to. */
|
|
347
395
|
perItemMaxCost: number;
|
|
348
396
|
/** `total` × `perItemMaxCost`. Bandwidth is on top and cannot be quoted: it depends on
|
|
@@ -365,12 +413,59 @@ export interface CreatedBatchDto extends BatchDto {
|
|
|
365
413
|
* delivery somebody copied can be sent to you again. */
|
|
366
414
|
webhookSecret?: string;
|
|
367
415
|
}
|
|
416
|
+
/** One URL a site lists, normalised: no fragment, no `utm_*` parameters, the query sorted,
|
|
417
|
+
* no trailing slash. */
|
|
418
|
+
export interface MapUrlDto {
|
|
419
|
+
url: string;
|
|
420
|
+
/** When the sitemap says the page last changed, as the sitemap wrote it (a W3C date, often
|
|
421
|
+
* just the day). Absent when it did not say, or when the URL came from the page's links. */
|
|
422
|
+
lastmod?: string;
|
|
423
|
+
}
|
|
424
|
+
/** `POST /v1/map`'s answer. */
|
|
425
|
+
export interface MapResultDto {
|
|
426
|
+
/** Every URL found, once each, sitemap URLs first in the order the site listed them. */
|
|
427
|
+
urls: MapUrlDto[];
|
|
428
|
+
/** Where they came from. With none found, the sources that were read. */
|
|
429
|
+
source: MapSource;
|
|
430
|
+
/** True when the site may list more than this answer holds: `limit` cut the list, or the
|
|
431
|
+
* robots.txt or a sitemap was not read to its end (the site refused it, its size, the
|
|
432
|
+
* 25-document cap, the time limit, or our own proxy failing, in which case the map is
|
|
433
|
+
* free and these are the URLs found before it). */
|
|
434
|
+
truncated: boolean;
|
|
435
|
+
pool: ProxyPool;
|
|
436
|
+
/** What the managed pool carried for every document the map read, decompressed. The
|
|
437
|
+
* first megabyte is free; past it, bandwidth is metered like any request's. */
|
|
438
|
+
bytes: number;
|
|
439
|
+
}
|
|
440
|
+
/** What a map would cost, without making it. */
|
|
441
|
+
export interface MapQuoteDto {
|
|
442
|
+
pool: ProxyPool;
|
|
443
|
+
/** Credits a map charges, whatever it finds. */
|
|
444
|
+
cost: number;
|
|
445
|
+
/** Managed-pool megabytes included before `perMb` applies. 0 on BYO. */
|
|
446
|
+
freeMb: number;
|
|
447
|
+
/** Credits per additional megabyte through the managed pool. 0 on BYO. */
|
|
448
|
+
perMb: number;
|
|
449
|
+
}
|
|
450
|
+
/** The picture behind a hit on the `images` topic. */
|
|
451
|
+
export interface SearchImageDto {
|
|
452
|
+
/** The picture itself, on the site that hosts it. It can be gone, or refuse a download
|
|
453
|
+
* that does not come from a browser: the thumbnail is the one that always loads. */
|
|
454
|
+
url: string;
|
|
455
|
+
/** A small copy the engine keeps, safe to show in a page. */
|
|
456
|
+
thumbnailUrl: string;
|
|
457
|
+
/** Pixels of the original, as the engine reported them. Null when it did not say. */
|
|
458
|
+
width: number | null;
|
|
459
|
+
height: number | null;
|
|
460
|
+
}
|
|
368
461
|
/** One hit, as the index ranked it. The array's ORDER is the ranking — there is no score,
|
|
369
462
|
* because no engine we read publishes one and a rank-derived float would be a made-up
|
|
370
463
|
* number in a public contract. */
|
|
371
464
|
export interface SearchHitDto {
|
|
372
465
|
/** 1-based rank within this answer. */
|
|
373
466
|
position: number;
|
|
467
|
+
/** The page. On the `images` topic it is the page that shows the picture, never the
|
|
468
|
+
* picture's own address: that is `image.url`. */
|
|
374
469
|
url: string;
|
|
375
470
|
title: string;
|
|
376
471
|
/** The engine's own summary of the page, a couple of lines. Never the page itself —
|
|
@@ -379,6 +474,8 @@ export interface SearchHitDto {
|
|
|
379
474
|
/** When the engine dated it, ISO 8601. Null whenever it did not, which on the general
|
|
380
475
|
* topic is most of the time — never guessed from the snippet. */
|
|
381
476
|
publishedAt: string | null;
|
|
477
|
+
/** The picture, on the `images` topic. Null on every other topic. */
|
|
478
|
+
image: SearchImageDto | null;
|
|
382
479
|
}
|
|
383
480
|
/** `POST /v1/search`'s answer. */
|
|
384
481
|
export interface SearchResultDto {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAOA
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,6ZAiDd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD;2FAC2F;AAC3F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CAwBqB,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAUlF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,OAAO;IAChB,uEAAuE;;IAEvE,+EAA+E;;;IAG/E,sEAAsE;;IAEtE,yCAAyC;;;CAGnC,CAAC;AAEX,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CACpB;AAED;;kEAEkE;AAClE,MAAM,WAAW,SAAS;IACtB,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,C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AM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD;;kCAEkC;AAClC,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB;mEAC+D;IAC/D,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,sFAAsF;AACtF,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB;+FAC2F;IAC3F,aAAa,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,WAAW,EAAE,CAAC;CACvB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// GENERATED FILE — do not edit. Run `bun run sdk:gen`.
|
|
2
|
-
// Source: packages/shared/src/http/index.ts, packages/shared/src/locale/index.ts, packages/shared/src/enums/index.ts, packages/shared/src/billing/catalog.ts, packages/shared/src/dto/account.ts, packages/shared/src/dto/scrape.ts, packages/shared/src/dto/batch.ts, packages/shared/src/dto/search.ts, packages/shared/src/dto/sessions.ts, packages/shared/src/dto/usage.ts
|
|
2
|
+
// Source: packages/shared/src/http/index.ts, packages/shared/src/locale/index.ts, packages/shared/src/enums/index.ts, packages/shared/src/billing/catalog.ts, packages/shared/src/dto/account.ts, packages/shared/src/dto/scrape.ts, packages/shared/src/dto/batch.ts, packages/shared/src/dto/map.ts, packages/shared/src/dto/search.ts, packages/shared/src/dto/sessions.ts, packages/shared/src/dto/usage.ts
|
|
3
3
|
//
|
|
4
4
|
// The shapes the API speaks, lifted from the server's own contract.
|
|
5
5
|
// ── from packages/shared/src/http/index.ts ───────────────────────────
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
* locale catalogs, exhaustiveness checks).
|
|
10
10
|
*
|
|
11
11
|
* THE WHOSE-FAULT VOCABULARY (DESIGN.md) is the organising principle: a caller's next move
|
|
12
|
-
* depends entirely on who said no, so the code says. `UPSTREAM_BLOCKED`
|
|
13
|
-
*
|
|
12
|
+
* depends entirely on who said no, so the code says. `UPSTREAM_BLOCKED` is "the site said no"
|
|
13
|
+
* (retry differently — another engine, pool or country), and `NAV_TIMEOUT` shares its hue under
|
|
14
|
+
* its own word, "time ran out" (give it more time; see `OWN_WORD`); `SSRF_DENIED` /
|
|
14
15
|
* `AUP_DENIED` are "our policy said no" (retrying cannot help, change the URL); a 5xx is
|
|
15
16
|
* "we broke it" (retry as-is, already refunded).
|
|
16
17
|
*/
|
|
@@ -33,19 +34,31 @@ export const ERROR_CODES = [
|
|
|
33
34
|
"CONFLICT", // 409 — e.g. the api-key name cap race
|
|
34
35
|
"PAYLOAD_TOO_LARGE", // 413 — the request body is over the surface's limit
|
|
35
36
|
// ── 422: the request was fine, the WEB did not cooperate. Deliberately 4xx, not 5xx:
|
|
36
|
-
// "5xx is reserved for what we broke" (AGENTS.md), and these cost the caller nothing
|
|
37
|
-
//
|
|
37
|
+
// "5xx is reserved for what we broke" (AGENTS.md), and these cost the caller nothing
|
|
38
|
+
// unless their own `browser.actions` script ran in the page first (OUTCOME_OF). 422
|
|
39
|
+
// also tells an HTTP client the truth: replaying the identical request gets the
|
|
38
40
|
// identical refusal, so the fix is a different engine/pool/country, not a retry.
|
|
39
41
|
"UPSTREAM_BLOCKED", // 422 — an anti-bot wall, a captcha, a hard 403 from the target
|
|
40
42
|
"NAV_TIMEOUT", // 422 — the page never reached a usable state inside the budget
|
|
41
43
|
// The exit proxy would not place the call, so the site never saw it: YOUR proxy refused
|
|
42
44
|
// or did not answer, or the managed pool has no exit in the place you asked for. Free,
|
|
43
|
-
//
|
|
45
|
+
// except your own proxy's refusal once your own `browser.actions` script ran. No colour:
|
|
46
|
+
// the fix is in the request (the proxy, the credentials, a wider place).
|
|
44
47
|
"PROXY_REFUSED", // 422 — details {reason: "no_exit" | "refused" | "unreachable", place?, status?}
|
|
45
48
|
// The site sent a file bigger than `raw` hands back whole. Not 413, which tells an HTTP
|
|
46
49
|
// client its OWN request was too big. Free, and no colour, for PROXY_REFUSED's reason:
|
|
47
50
|
// the fix is in the request (another format, or download it yourself), not another road.
|
|
48
51
|
"FILE_TOO_LARGE", // 422 — details {limit}, in bytes
|
|
52
|
+
// A PDF or a Word file arrived whole, and reading it into text took longer than the time
|
|
53
|
+
// the call had left, or than the most one file may read. Free, and no colour: the site
|
|
54
|
+
// answered in full, so another engine, pool or country reads the same file just as
|
|
55
|
+
// slowly. The fix is "raw" and reading it yourself, or a smaller file.
|
|
56
|
+
"DOCUMENT_TIMEOUT", // 422: details {budgetMs, readMaxMs}: the call's timeout, and the most one file may read
|
|
57
|
+
// One of the caller's `browser.actions` steps did not work on the page: a selector that
|
|
58
|
+
// matched nothing, a key Chrome does not know, a script that threw. Free unless one of the
|
|
59
|
+
// caller's scripts ran (their code read the page), and no colour, for PROXY_REFUSED's
|
|
60
|
+
// reason: the page answered, and the fix is in the step, not the road.
|
|
61
|
+
"ACTION_FAILED", // 422: details {index, type, reason}, index counting from 0
|
|
49
62
|
"RATE_LIMIT_EXCEEDED", // 429 — the per-minute burst bucket; Retry-After + details {limit}
|
|
50
63
|
"QUOTA_EXCEEDED", // 429 — a durable bound that WAITING clears; details {scope, limit, resetAt}
|
|
51
64
|
"INTERNAL_ERROR", // 500 — we broke it; the body is always generic, the cause stays server-side
|
|
@@ -71,6 +84,8 @@ export const ERROR_STATUS = {
|
|
|
71
84
|
NAV_TIMEOUT: 422,
|
|
72
85
|
PROXY_REFUSED: 422,
|
|
73
86
|
FILE_TOO_LARGE: 422,
|
|
87
|
+
DOCUMENT_TIMEOUT: 422,
|
|
88
|
+
ACTION_FAILED: 422,
|
|
74
89
|
RATE_LIMIT_EXCEEDED: 429,
|
|
75
90
|
QUOTA_EXCEEDED: 429,
|
|
76
91
|
INTERNAL_ERROR: 500,
|
|
@@ -78,11 +93,15 @@ export const ERROR_STATUS = {
|
|
|
78
93
|
BILLING_UNAVAILABLE: 503,
|
|
79
94
|
};
|
|
80
95
|
/**
|
|
81
|
-
* The three
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
96
|
+
* The three outcomes that get a colour, as DESIGN.md names them. Each code here maps to
|
|
97
|
+
* exactly one, and the SDK's `outcome` reads this map to tell a caller what to do next. A code
|
|
98
|
+
* absent from here gets no colour: the caller's own mistake (a bad body, a missing key), or a
|
|
99
|
+
* refusal whose fix is in the request rather than the site (PROXY_REFUSED, FILE_TOO_LARGE,
|
|
100
|
+
* DOCUMENT_TIMEOUT, ACTION_FAILED).
|
|
101
|
+
*
|
|
102
|
+
* Every one of these refusals is free, unless the caller's own `browser.actions` script ran
|
|
103
|
+
* in the page first: then a refusal the script could have caused keeps the browser price and
|
|
104
|
+
* its bandwidth (https://docs.scrapa.app/en/guides/credits lists which). `broken` is always refunded.
|
|
86
105
|
*
|
|
87
106
|
* blocked → the site said no → try another engine, pool or country
|
|
88
107
|
* denied → our policy said no → change the URL; retrying cannot help
|
|
@@ -150,8 +169,9 @@ export const SCRAPE_FORMATS = [
|
|
|
150
169
|
* is ours). A session that never reached `live` never charged a minute. */
|
|
151
170
|
export const SESSION_STATUSES = ["starting", "live", "closed", "expired", "failed"];
|
|
152
171
|
/** What a search is looking for. `general` is the web; `news` is dated journalism — a
|
|
153
|
-
* different door at every engine, and the only one that reliably carries a date
|
|
154
|
-
|
|
172
|
+
* different door at every engine, and the only one that reliably carries a date; `images`
|
|
173
|
+
* is pictures, each tied to the page that holds it. */
|
|
174
|
+
export const SEARCH_TOPICS = ["general", "news", "images"];
|
|
155
175
|
/** Which front answered a search. Not a caller's choice — the ladder picks, and says which
|
|
156
176
|
* one it was, because a result set's flavour follows its index. */
|
|
157
177
|
export const SEARCH_ENGINES = ["bing", "brave", "duckduckgo"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/generated/contract.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,gZAAgZ;AAChZ,EAAE;AACF,oEAAoE;AAEpE,wEAAwE;AAExE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,kBAAkB,EAAE,iFAAiF;IACrG,aAAa,EAAE,+DAA+D;IAC9E,aAAa,EAAE,sFAAsF;IACrG,cAAc,EAAE,gCAAgC;IAChD,eAAe,EAAE,6EAA6E;IAC9F,oFAAoF;IACpF,mFAAmF;IACnF,qFAAqF;IACrF,uFAAuF;IACvF,qFAAqF;IACrF,WAAW,EAAE,2EAA2E;IACxF,WAAW,EAAE,uCAAuC;IACpD,YAAY,EAAE,yEAAyE;IACvF,WAAW,EAAE,uEAAuE;IACpF,mBAAmB,EAAE,0DAA0D;IAC/E,UAAU,EAAE,uCAAuC;IACnD,mBAAmB,EAAE,qDAAqD;IAC1E,sFAAsF;IACtF,wFAAwF;IACxF,uFAAuF;IACvF,mFAAmF;IACnF,oFAAoF;IACpF,kBAAkB,EAAE,gEAAgE;IACpF,aAAa,EAAE,gEAAgE;IAC/E,wFAAwF;IACxF,uFAAuF;IACvF,yFAAyF;IACzF,yEAAyE;IACzE,eAAe,EAAE,iFAAiF;IAClG,wFAAwF;IACxF,uFAAuF;IACvF,yFAAyF;IACzF,gBAAgB,EAAE,kCAAkC;IACpD,yFAAyF;IACzF,uFAAuF;IACvF,mFAAmF;IACnF,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