Skip to content

Commit 0c7797d

Browse files
author
stlc-bot
committed
feat(parse): support WARC archives in parsing and scraping (#2761)
Stainless-Generated-From: 1f3613aca9570731b43207251433017bddfe8dc0
1 parent d71b558 commit 0c7797d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎src/resources/parse.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { RequestOptions } from '../internal/request-options';
88

99
export class Parse extends APIResource {
1010
/**
11-
* Convert uploaded file bytes into Markdown and optional HTML.
11+
* Convert uploaded file bytes into Markdown and optional HTML. WARC and WARC.GZ
12+
* archives combine HTTP response, resource, and conversion records in archive
13+
* order. Revisit and segmented records are skipped. Decoded WARC content is
14+
* limited to 50 MiB.
1215
*/
1316
handle(
1417
body: Uploadable,
@@ -70,6 +73,7 @@ export interface ParseHandleResponse {
7073
* Detected content type used for parsing
7174
*/
7275
type:
76+
| 'warc'
7377
| 'html'
7478
| 'xml'
7579
| 'json'
@@ -143,9 +147,11 @@ export interface ParseHandleParams {
143147

144148
/**
145149
* Query param: Optional file extension hint, such as pdf, docx, xlsx, pptx, html,
146-
* json, csv, md, py, rtf, jpg, png, or txt.
150+
* json, csv, md, py, rtf, jpg, png, txt, warc, or warc.gz.
147151
*/
148152
extension?:
153+
| 'warc'
154+
| 'warc.gz'
149155
| 'txt'
150156
| 'text'
151157
| 'md'

0 commit comments

Comments
 (0)