@@ -612,6 +612,7 @@ def web_scrape_html(
612612 self ,
613613 * ,
614614 url : str ,
615+ headers : Dict [str , str ] | Omit = omit ,
615616 include_frames : bool | Omit = omit ,
616617 max_age_ms : int | Omit = omit ,
617618 pdf : web_web_scrape_html_params .Pdf | Omit = omit ,
@@ -630,6 +631,10 @@ def web_scrape_html(
630631 Args:
631632 url: Full URL to scrape (must include http:// or https:// protocol)
632633
634+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
635+ deep-object query params such as headers[X-Custom]=value. When provided, caching
636+ is bypassed: the result is neither read from nor written to cache.
637+
633638 include_frames: When true, iframes are rendered inline into the returned HTML.
634639
635640 max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
@@ -665,6 +670,7 @@ def web_scrape_html(
665670 query = maybe_transform (
666671 {
667672 "url" : url ,
673+ "headers" : headers ,
668674 "include_frames" : include_frames ,
669675 "max_age_ms" : max_age_ms ,
670676 "pdf" : pdf ,
@@ -682,6 +688,7 @@ def web_scrape_images(
682688 * ,
683689 url : str ,
684690 enrichment : web_web_scrape_images_params .Enrichment | Omit = omit ,
691+ headers : Dict [str , str ] | Omit = omit ,
685692 max_age_ms : int | Omit = omit ,
686693 timeout_ms : int | Omit = omit ,
687694 wait_for_ms : int | Omit = omit ,
@@ -704,6 +711,10 @@ def web_scrape_images(
704711 enrichment: Optional per-image processing, sent as deep-object query params such as
705712 enrichment[resolution]=true.
706713
714+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
715+ deep-object query params such as headers[X-Custom]=value. When provided, caching
716+ is bypassed: the result is neither read from nor written to cache.
717+
707718 max_age_ms: Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
708719 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
709720
@@ -733,6 +744,7 @@ def web_scrape_images(
733744 {
734745 "url" : url ,
735746 "enrichment" : enrichment ,
747+ "headers" : headers ,
736748 "max_age_ms" : max_age_ms ,
737749 "timeout_ms" : timeout_ms ,
738750 "wait_for_ms" : wait_for_ms ,
@@ -747,6 +759,7 @@ def web_scrape_md(
747759 self ,
748760 * ,
749761 url : str ,
762+ headers : Dict [str , str ] | Omit = omit ,
750763 include_frames : bool | Omit = omit ,
751764 include_images : bool | Omit = omit ,
752765 include_links : bool | Omit = omit ,
@@ -770,6 +783,10 @@ def web_scrape_md(
770783 url: Full URL to scrape into LLM usable Markdown (must include http:// or https://
771784 protocol)
772785
786+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
787+ deep-object query params such as headers[X-Custom]=value. When provided, caching
788+ is bypassed: the result is neither read from nor written to cache.
789+
773790 include_frames: When true, the contents of iframes are rendered to Markdown.
774791
775792 include_images: Include image references in Markdown output
@@ -813,6 +830,7 @@ def web_scrape_md(
813830 query = maybe_transform (
814831 {
815832 "url" : url ,
833+ "headers" : headers ,
816834 "include_frames" : include_frames ,
817835 "include_images" : include_images ,
818836 "include_links" : include_links ,
@@ -833,6 +851,7 @@ def web_scrape_sitemap(
833851 self ,
834852 * ,
835853 domain : str ,
854+ headers : Dict [str , str ] | Omit = omit ,
836855 max_links : int | Omit = omit ,
837856 timeout_ms : int | Omit = omit ,
838857 url_regex : str | Omit = omit ,
@@ -849,6 +868,10 @@ def web_scrape_sitemap(
849868 Args:
850869 domain: Domain to build a sitemap for
851870
871+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
872+ deep-object query params such as headers[X-Custom]=value. When provided, caching
873+ is bypassed: the result is neither read from nor written to cache.
874+
852875 max_links: Maximum number of links to return from the sitemap crawl. Defaults to 10,000.
853876 Minimum is 1, maximum is 100,000.
854877
@@ -877,6 +900,7 @@ def web_scrape_sitemap(
877900 query = maybe_transform (
878901 {
879902 "domain" : domain ,
903+ "headers" : headers ,
880904 "max_links" : max_links ,
881905 "timeout_ms" : timeout_ms ,
882906 "url_regex" : url_regex ,
@@ -1454,6 +1478,7 @@ async def web_scrape_html(
14541478 self ,
14551479 * ,
14561480 url : str ,
1481+ headers : Dict [str , str ] | Omit = omit ,
14571482 include_frames : bool | Omit = omit ,
14581483 max_age_ms : int | Omit = omit ,
14591484 pdf : web_web_scrape_html_params .Pdf | Omit = omit ,
@@ -1472,6 +1497,10 @@ async def web_scrape_html(
14721497 Args:
14731498 url: Full URL to scrape (must include http:// or https:// protocol)
14741499
1500+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
1501+ deep-object query params such as headers[X-Custom]=value. When provided, caching
1502+ is bypassed: the result is neither read from nor written to cache.
1503+
14751504 include_frames: When true, iframes are rendered inline into the returned HTML.
14761505
14771506 max_age_ms: Return a cached result if a prior scrape for the same parameters exists and is
@@ -1507,6 +1536,7 @@ async def web_scrape_html(
15071536 query = await async_maybe_transform (
15081537 {
15091538 "url" : url ,
1539+ "headers" : headers ,
15101540 "include_frames" : include_frames ,
15111541 "max_age_ms" : max_age_ms ,
15121542 "pdf" : pdf ,
@@ -1524,6 +1554,7 @@ async def web_scrape_images(
15241554 * ,
15251555 url : str ,
15261556 enrichment : web_web_scrape_images_params .Enrichment | Omit = omit ,
1557+ headers : Dict [str , str ] | Omit = omit ,
15271558 max_age_ms : int | Omit = omit ,
15281559 timeout_ms : int | Omit = omit ,
15291560 wait_for_ms : int | Omit = omit ,
@@ -1546,6 +1577,10 @@ async def web_scrape_images(
15461577 enrichment: Optional per-image processing, sent as deep-object query params such as
15471578 enrichment[resolution]=true.
15481579
1580+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
1581+ deep-object query params such as headers[X-Custom]=value. When provided, caching
1582+ is bypassed: the result is neither read from nor written to cache.
1583+
15491584 max_age_ms: Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
15501585 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
15511586
@@ -1575,6 +1610,7 @@ async def web_scrape_images(
15751610 {
15761611 "url" : url ,
15771612 "enrichment" : enrichment ,
1613+ "headers" : headers ,
15781614 "max_age_ms" : max_age_ms ,
15791615 "timeout_ms" : timeout_ms ,
15801616 "wait_for_ms" : wait_for_ms ,
@@ -1589,6 +1625,7 @@ async def web_scrape_md(
15891625 self ,
15901626 * ,
15911627 url : str ,
1628+ headers : Dict [str , str ] | Omit = omit ,
15921629 include_frames : bool | Omit = omit ,
15931630 include_images : bool | Omit = omit ,
15941631 include_links : bool | Omit = omit ,
@@ -1612,6 +1649,10 @@ async def web_scrape_md(
16121649 url: Full URL to scrape into LLM usable Markdown (must include http:// or https://
16131650 protocol)
16141651
1652+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
1653+ deep-object query params such as headers[X-Custom]=value. When provided, caching
1654+ is bypassed: the result is neither read from nor written to cache.
1655+
16151656 include_frames: When true, the contents of iframes are rendered to Markdown.
16161657
16171658 include_images: Include image references in Markdown output
@@ -1655,6 +1696,7 @@ async def web_scrape_md(
16551696 query = await async_maybe_transform (
16561697 {
16571698 "url" : url ,
1699+ "headers" : headers ,
16581700 "include_frames" : include_frames ,
16591701 "include_images" : include_images ,
16601702 "include_links" : include_links ,
@@ -1675,6 +1717,7 @@ async def web_scrape_sitemap(
16751717 self ,
16761718 * ,
16771719 domain : str ,
1720+ headers : Dict [str , str ] | Omit = omit ,
16781721 max_links : int | Omit = omit ,
16791722 timeout_ms : int | Omit = omit ,
16801723 url_regex : str | Omit = omit ,
@@ -1691,6 +1734,10 @@ async def web_scrape_sitemap(
16911734 Args:
16921735 domain: Domain to build a sitemap for
16931736
1737+ headers: Optional outbound HTTP headers forwarded only to the target URL, sent as
1738+ deep-object query params such as headers[X-Custom]=value. When provided, caching
1739+ is bypassed: the result is neither read from nor written to cache.
1740+
16941741 max_links: Maximum number of links to return from the sitemap crawl. Defaults to 10,000.
16951742 Minimum is 1, maximum is 100,000.
16961743
@@ -1719,6 +1766,7 @@ async def web_scrape_sitemap(
17191766 query = await async_maybe_transform (
17201767 {
17211768 "domain" : domain ,
1769+ "headers" : headers ,
17221770 "max_links" : max_links ,
17231771 "timeout_ms" : timeout_ms ,
17241772 "url_regex" : url_regex ,
0 commit comments