@@ -273,6 +273,7 @@ def web_crawl_md(
273273 max_pages : int | Omit = omit ,
274274 pdf : web_web_crawl_md_params .Pdf | Omit = omit ,
275275 shorten_base64_images : bool | Omit = omit ,
276+ stop_after_ms : int | Omit = omit ,
276277 timeout_ms : int | Omit = omit ,
277278 url_regex : str | Omit = omit ,
278279 use_main_content_only : bool | Omit = omit ,
@@ -315,6 +316,11 @@ def web_crawl_md(
315316
316317 shorten_base64_images: Truncate base64-encoded image data in the Markdown output
317318
319+ stop_after_ms: Soft time budget for the crawl in milliseconds. After each scrape, the crawler
320+ checks the elapsed time and, if exceeded, returns the pages collected so far
321+ instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
322+ min).
323+
318324 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
319325 than this value, it will be aborted with a 408 status code. Maximum allowed
320326 value is 300000ms (5 minutes).
@@ -349,6 +355,7 @@ def web_crawl_md(
349355 "max_pages" : max_pages ,
350356 "pdf" : pdf ,
351357 "shorten_base64_images" : shorten_base64_images ,
358+ "stop_after_ms" : stop_after_ms ,
352359 "timeout_ms" : timeout_ms ,
353360 "url_regex" : url_regex ,
354361 "use_main_content_only" : use_main_content_only ,
@@ -876,6 +883,7 @@ async def web_crawl_md(
876883 max_pages : int | Omit = omit ,
877884 pdf : web_web_crawl_md_params .Pdf | Omit = omit ,
878885 shorten_base64_images : bool | Omit = omit ,
886+ stop_after_ms : int | Omit = omit ,
879887 timeout_ms : int | Omit = omit ,
880888 url_regex : str | Omit = omit ,
881889 use_main_content_only : bool | Omit = omit ,
@@ -918,6 +926,11 @@ async def web_crawl_md(
918926
919927 shorten_base64_images: Truncate base64-encoded image data in the Markdown output
920928
929+ stop_after_ms: Soft time budget for the crawl in milliseconds. After each scrape, the crawler
930+ checks the elapsed time and, if exceeded, returns the pages collected so far
931+ instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
932+ min).
933+
921934 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
922935 than this value, it will be aborted with a 408 status code. Maximum allowed
923936 value is 300000ms (5 minutes).
@@ -952,6 +965,7 @@ async def web_crawl_md(
952965 "max_pages" : max_pages ,
953966 "pdf" : pdf ,
954967 "shorten_base64_images" : shorten_base64_images ,
968+ "stop_after_ms" : stop_after_ms ,
955969 "timeout_ms" : timeout_ms ,
956970 "url_regex" : url_regex ,
957971 "use_main_content_only" : use_main_content_only ,
0 commit comments