You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3688eab
Browse filesBrowse the repository at this point in the historyBrowse files
"""What this batch has done to your credit balance."""
17
-
18
-
net: int
19
-
"""`reserved` minus `refunded` — what the batch has cost so far.
20
-
21
-
Equal to `reserved` until the batch settles.
22
-
"""
23
-
24
-
refunded: int
25
-
"""Credits returned for pages that did not succeed.
26
-
27
-
Stays 0 until the batch reaches a final status, then settles in one movement.
28
-
"""
15
+
"""What this batch cost so far."""
29
16
30
17
reserved: int
31
-
"""Credits debited from your balance the moment the batch was accepted.
18
+
"""Credits debited at submission.
32
19
33
-
This is a charge, not a forecast — the whole amount leaves the balance up front.
20
+
The unspent remainder is refunded once the batch settles — read
21
+
`credits.refunded` from GET /batch/{batch_id} then.
34
22
"""
35
23
36
24
37
25
classProgress(BaseModel):
38
-
"""Pages attempted so far. Use `status` to check completion."""
26
+
"""How far the batch got before cancellation."""
39
27
40
28
failed: int
41
-
"""Pages that could not be scraped."""
29
+
"""Pages that could not be scraped before the request landed."""
42
30
43
31
pending: int
44
-
"""Reserved pages not yet attempted.
45
-
46
-
A cancelled batch keeps reporting the URLs it never reached; a crawl whose
47
-
`input.reserved_is_ceiling` is true reports 0 once final, because its unspent
48
-
budget was never real pages.
49
-
"""
32
+
"""Reserved pages that will now be skipped, and refunded when the batch settles."""
50
33
51
34
succeeded: int
52
-
"""Pages scraped successfully."""
53
-
54
-
55
-
classResultsFile(BaseModel):
56
-
bytes: int
57
-
"""Compressed file size in bytes."""
58
-
59
-
items: int
60
-
"""Results in this file."""
61
-
62
-
url: str
63
-
"""Temporary URL for a gzipped NDJSON file."""
64
-
65
-
66
-
classResults(BaseModel):
67
-
"""
68
-
Download links, available once the batch reaches a final status and null before then. GET /batch/{batch_id}/results serves the same records as paginated JSON.
69
-
"""
70
-
71
-
expires_at: str
72
-
"""When the download URLs expire."""
73
-
74
-
files: List[ResultsFile]
75
-
"""Result files. Order is not guaranteed."""
35
+
"""Pages scraped successfully before the request landed."""
76
36
77
37
78
38
classTiming(BaseModel):
79
-
completed_at: Optional[str] =None
80
-
"""When processing finished. Null while active."""
39
+
"""There is no finish time yet — the batch is still winding down."""
81
40
82
41
created_at: str
83
42
"""When the batch was created."""
84
43
85
44
started_at: Optional[str] =None
86
-
"""When processing started. Null while queued."""
45
+
"""When processing started. Null if it was cancelled while still queued."""
87
46
88
47
89
48
classKeyMetadata(BaseModel):
@@ -98,7 +57,7 @@ class KeyMetadata(BaseModel):
98
57
99
58
classBatchCancelResponse(BaseModel):
100
59
id: str
101
-
"""Batch ID used to retrieve or cancel the job."""
60
+
"""Batch ID."""
102
61
103
62
crawl: Optional[CrawlControls] =None
104
63
"""
@@ -107,48 +66,34 @@ class BatchCancelResponse(BaseModel):
107
66
"""
108
67
109
68
credits: Credits
110
-
"""What this batch has done to your credit balance."""
111
-
112
-
failure: Optional[Failure] =None
113
-
"""
114
-
A failure of the batch as a whole, distinct from the per-page failures in
115
-
`page_errors`.
116
-
"""
69
+
"""What this batch cost so far."""
117
70
118
71
format: Literal["markdown", "html"]
119
-
"""What each page is returned as.
120
-
121
-
Matches `input.data.format` on the submit request.
122
-
"""
72
+
"""What each page is returned as."""
123
73
124
74
input: Intake
125
75
"""What submission took in, and what it charged for."""
126
76
127
77
mode: Literal["scrape", "crawl"]
128
-
"""How pages were selected. Matches `input.mode` on the submit request."""
78
+
"""How pages were selected."""
129
79
130
80
page_errors: List[PageErrorCount]
131
-
"""Individual page failures grouped by error code, sorted by count.
132
-
133
-
Unrelated to `failure`, which is the batch itself failing.
134
-
"""
81
+
"""Page failures so far, grouped by error code and sorted by count."""
135
82
136
83
progress: Progress
137
-
"""Pages attempted so far. Use `status` to check completion."""
84
+
"""How far the batch got before cancellation."""
138
85
139
-
results: Optional[Results] =None
140
-
"""
141
-
Download links, available once the batch reaches a final status and null before
142
-
then. GET /batch/{batch_id}/results serves the same records as paginated JSON.
0 commit comments