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 377c7a6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: pkg/cmd/web.go
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ var webExtract = requestflag.WithInnerFlags(cli.Command{
21
21
Flags: []cli.Flag{
22
22
&requestflag.Flag[map[string]any]{
23
23
Name: "schema",
24
-
Usage: "JSON Schema for the returned data object. TypeScript Zod users can pass a JSON Schema generated from a Zod object; Python users can pass the equivalent JSON Schema object.",
24
+
Usage: "JSON Schema for the returned data object. Image fields such as `image_urls` or `product_photos` automatically make page image references available to extraction, so product data and photos can be returned in one call. TypeScript Zod users can pass a JSON Schema generated from a Zod object; Python users can pass the equivalent JSON Schema object.",
25
25
Required: true,
26
26
BodyPath: "schema",
27
27
},
@@ -31,6 +31,11 @@ var webExtract = requestflag.WithInnerFlags(cli.Command{
31
31
Required: true,
32
32
BodyPath: "url",
33
33
},
34
+
&requestflag.Flag[[]map[string]any]{
35
+
Name: "action",
36
+
Usage: "Optional browser actions executed in order on the requested page after it loads, before links are discovered or additional pages are crawled. Requires a paid plan. When actions are provided and stopAfterMs is omitted, the crawl budget defaults to 110000 ms.",
37
+
BodyPath: "actions",
38
+
},
34
39
&requestflag.Flag[bool]{
35
40
Name: "fact-check",
36
41
Usage: "When true, every returned value must be grounded in facts stated on the page; fields that cannot be supported by the page are returned as null/empty. When false (default), the model may make reasonable inferences and derivations from the page content (e.g. ideal customer, competitor analysis, recommendations) while keeping verifiable specifics (names, quotes, URLs, dates, metrics) faithful to the source.",
@@ -84,7 +89,7 @@ var webExtract = requestflag.WithInnerFlags(cli.Command{
84
89
},
85
90
&requestflag.Flag[int64]{
86
91
Name: "stop-after-ms",
87
-
Usage: "Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (110s). Default: 80000 (80s).",
92
+
Usage: "Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (110s). Defaults to 80000 (80s), or 110000 (110s) when browser actions are provided.",
88
93
Default: 80000,
89
94
BodyPath: "stopAfterMs",
90
95
},
@@ -557,7 +562,7 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
557
562
},
558
563
&requestflag.Flag[string]{
559
564
Name: "url-regex",
560
-
Usage: "Regex pattern. Only URLs matching this pattern will be followed and scraped.",
565
+
Usage: "Regex pattern. Only URLs matching this pattern will be followed and scraped. An automatic prefix scope in the form ^<starting URL> follows a redirect of the starting page.",
561
566
BodyPath: "urlRegex",
562
567
},
563
568
&requestflag.Flag[bool]{
@@ -568,7 +573,8 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
568
573
},
569
574
&requestflag.Flag[int64]{
570
575
Name: "wait-for-ms",
571
-
Usage: "Optional browser wait time in milliseconds after initial page load for each crawled page. Min: 0. Max: 30000 (30 seconds). ",
576
+
Usage: "Browser wait time in milliseconds after initial page load for each crawled page. Defaults to 3500 (3.5 seconds). Min: 0. Max: 30000 (30 seconds).",
0 commit comments