@@ -45,6 +45,8 @@ def index(
4545 self ,
4646 * ,
4747 url : str ,
48+ limit : int | NotGiven = NOT_GIVEN ,
49+ max_depth : int | NotGiven = NOT_GIVEN ,
4850 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4951 # The extra values given here take precedence over values defined on the client or passed to this method.
5052 extra_headers : Headers | None = None ,
@@ -56,6 +58,12 @@ def index(
5658 Recursively crawl a website to make it available for indexed search.
5759
5860 Args:
61+ url: The base URL of the website to crawl
62+
63+ limit: Maximum number of pages to crawl in total
64+
65+ max_depth: Maximum depth of links to follow during crawling
66+
5967 extra_headers: Send extra headers
6068
6169 extra_query: Add additional query parameters to the request
@@ -71,7 +79,14 @@ def index(
7179 extra_query = extra_query ,
7280 extra_body = extra_body ,
7381 timeout = timeout ,
74- query = maybe_transform ({"url" : url }, web_crawler_index_params .WebCrawlerIndexParams ),
82+ query = maybe_transform (
83+ {
84+ "url" : url ,
85+ "limit" : limit ,
86+ "max_depth" : max_depth ,
87+ },
88+ web_crawler_index_params .WebCrawlerIndexParams ,
89+ ),
7590 ),
7691 cast_to = WebCrawlerIndexResponse ,
7792 )
@@ -101,6 +116,8 @@ async def index(
101116 self ,
102117 * ,
103118 url : str ,
119+ limit : int | NotGiven = NOT_GIVEN ,
120+ max_depth : int | NotGiven = NOT_GIVEN ,
104121 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
105122 # The extra values given here take precedence over values defined on the client or passed to this method.
106123 extra_headers : Headers | None = None ,
@@ -112,6 +129,12 @@ async def index(
112129 Recursively crawl a website to make it available for indexed search.
113130
114131 Args:
132+ url: The base URL of the website to crawl
133+
134+ limit: Maximum number of pages to crawl in total
135+
136+ max_depth: Maximum depth of links to follow during crawling
137+
115138 extra_headers: Send extra headers
116139
117140 extra_query: Add additional query parameters to the request
@@ -127,7 +150,14 @@ async def index(
127150 extra_query = extra_query ,
128151 extra_body = extra_body ,
129152 timeout = timeout ,
130- query = await async_maybe_transform ({"url" : url }, web_crawler_index_params .WebCrawlerIndexParams ),
153+ query = await async_maybe_transform (
154+ {
155+ "url" : url ,
156+ "limit" : limit ,
157+ "max_depth" : max_depth ,
158+ },
159+ web_crawler_index_params .WebCrawlerIndexParams ,
160+ ),
131161 ),
132162 cast_to = WebCrawlerIndexResponse ,
133163 )
0 commit comments