Skip to content

Commit 36f6772

Browse files
release: 1.7.0 (#161)
* feat: [CORE-1796][apps/api] Update Node.js SDK * feat: [GRO-000] docs: Add guide + docs for search api * release: 1.7.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 3b5d801 commit 36f6772

File tree

14 files changed

+432
-10
lines changed

14 files changed

+432
-10
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.6.0"
2+
".": "1.7.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-b20f9fea14d79990ab1af3d276f931e026cd955ac623ec6ace80b2af90de170f.yml
3-
openapi_spec_hash: 943ff4b3297014503fdc9854544cb9a4
4-
config_hash: 55c54fdafc9e80be584829b5724b00ab
1+
configured_endpoints: 21
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fbrowserbase-9b1e2a2abf39dd780601935a9a9ee04cb939e2c3ba76627535f625b6aeaf5eb7.yml
3+
openapi_spec_hash: 12fe5f4306c43fdfb394a33f79391a82
4+
config_hash: cf04ecfb8dad5fbd8b85be25d6e9ec55

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.7.0 (2026-03-16)
4+
5+
Full Changelog: [v1.6.0...v1.7.0](https://github.com/browserbase/sdk-python/compare/v1.6.0...v1.7.0)
6+
7+
### Features
8+
9+
* [CORE-1796][apps/api] Update Node.js SDK ([ecafbb5](https://github.com/browserbase/sdk-python/commit/ecafbb511dbe9be78e84f4e1d34e1feefa1fce8e))
10+
* [GRO-000] docs: Add guide + docs for search api ([55e2d0d](https://github.com/browserbase/sdk-python/commit/55e2d0db2f31b2ca390eaa6855f22de1f1688a88))
11+
312
## 1.6.0 (2026-03-11)
413

514
Full Changelog: [v1.5.0...v1.6.0](https://github.com/browserbase/sdk-python/compare/v1.5.0...v1.6.0)

api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ Methods:
5353
- <code title="get /v1/projects">client.projects.<a href="./src/browserbase/resources/projects.py">list</a>() -> <a href="./src/browserbase/types/project_list_response.py">ProjectListResponse</a></code>
5454
- <code title="get /v1/projects/{id}/usage">client.projects.<a href="./src/browserbase/resources/projects.py">usage</a>(id) -> <a href="./src/browserbase/types/project_usage.py">ProjectUsage</a></code>
5555

56+
# Search
57+
58+
Types:
59+
60+
```python
61+
from browserbase.types import SearchWebResponse
62+
```
63+
64+
Methods:
65+
66+
- <code title="post /v1/search">client.search.<a href="./src/browserbase/resources/search.py">web</a>(\*\*<a href="src/browserbase/types/search_web_params.py">params</a>) -> <a href="./src/browserbase/types/search_web_response.py">SearchWebResponse</a></code>
67+
5668
# Sessions
5769

5870
Types:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "browserbase"
3-
version = "1.6.0"
3+
version = "1.7.0"
44
description = "The official Python library for the Browserbase API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/browserbase/_client.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
)
3232

3333
if TYPE_CHECKING:
34-
from .resources import contexts, projects, sessions, fetch_api, extensions
34+
from .resources import search, contexts, projects, sessions, fetch_api, extensions
35+
from .resources.search import SearchResource, AsyncSearchResource
3536
from .resources.contexts import ContextsResource, AsyncContextsResource
3637
from .resources.projects import ProjectsResource, AsyncProjectsResource
3738
from .resources.fetch_api import FetchAPIResource, AsyncFetchAPIResource
@@ -129,6 +130,12 @@ def projects(self) -> ProjectsResource:
129130

130131
return ProjectsResource(self)
131132

133+
@cached_property
134+
def search(self) -> SearchResource:
135+
from .resources.search import SearchResource
136+
137+
return SearchResource(self)
138+
132139
@cached_property
133140
def sessions(self) -> SessionsResource:
134141
from .resources.sessions import SessionsResource
@@ -327,6 +334,12 @@ def projects(self) -> AsyncProjectsResource:
327334

328335
return AsyncProjectsResource(self)
329336

337+
@cached_property
338+
def search(self) -> AsyncSearchResource:
339+
from .resources.search import AsyncSearchResource
340+
341+
return AsyncSearchResource(self)
342+
330343
@cached_property
331344
def sessions(self) -> AsyncSessionsResource:
332345
from .resources.sessions import AsyncSessionsResource
@@ -476,6 +489,12 @@ def projects(self) -> projects.ProjectsResourceWithRawResponse:
476489

477490
return ProjectsResourceWithRawResponse(self._client.projects)
478491

492+
@cached_property
493+
def search(self) -> search.SearchResourceWithRawResponse:
494+
from .resources.search import SearchResourceWithRawResponse
495+
496+
return SearchResourceWithRawResponse(self._client.search)
497+
479498
@cached_property
480499
def sessions(self) -> sessions.SessionsResourceWithRawResponse:
481500
from .resources.sessions import SessionsResourceWithRawResponse
@@ -513,6 +532,12 @@ def projects(self) -> projects.AsyncProjectsResourceWithRawResponse:
513532

514533
return AsyncProjectsResourceWithRawResponse(self._client.projects)
515534

535+
@cached_property
536+
def search(self) -> search.AsyncSearchResourceWithRawResponse:
537+
from .resources.search import AsyncSearchResourceWithRawResponse
538+
539+
return AsyncSearchResourceWithRawResponse(self._client.search)
540+
516541
@cached_property
517542
def sessions(self) -> sessions.AsyncSessionsResourceWithRawResponse:
518543
from .resources.sessions import AsyncSessionsResourceWithRawResponse
@@ -550,6 +575,12 @@ def projects(self) -> projects.ProjectsResourceWithStreamingResponse:
550575

551576
return ProjectsResourceWithStreamingResponse(self._client.projects)
552577

578+
@cached_property
579+
def search(self) -> search.SearchResourceWithStreamingResponse:
580+
from .resources.search import SearchResourceWithStreamingResponse
581+
582+
return SearchResourceWithStreamingResponse(self._client.search)
583+
553584
@cached_property
554585
def sessions(self) -> sessions.SessionsResourceWithStreamingResponse:
555586
from .resources.sessions import SessionsResourceWithStreamingResponse
@@ -587,6 +618,12 @@ def projects(self) -> projects.AsyncProjectsResourceWithStreamingResponse:
587618

588619
return AsyncProjectsResourceWithStreamingResponse(self._client.projects)
589620

621+
@cached_property
622+
def search(self) -> search.AsyncSearchResourceWithStreamingResponse:
623+
from .resources.search import AsyncSearchResourceWithStreamingResponse
624+
625+
return AsyncSearchResourceWithStreamingResponse(self._client.search)
626+
590627
@cached_property
591628
def sessions(self) -> sessions.AsyncSessionsResourceWithStreamingResponse:
592629
from .resources.sessions import AsyncSessionsResourceWithStreamingResponse

src/browserbase/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "browserbase"
4-
__version__ = "1.6.0" # x-release-please-version
4+
__version__ = "1.7.0" # x-release-please-version

src/browserbase/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .search import (
4+
SearchResource,
5+
AsyncSearchResource,
6+
SearchResourceWithRawResponse,
7+
AsyncSearchResourceWithRawResponse,
8+
SearchResourceWithStreamingResponse,
9+
AsyncSearchResourceWithStreamingResponse,
10+
)
311
from .contexts import (
412
ContextsResource,
513
AsyncContextsResource,
@@ -66,6 +74,12 @@
6674
"AsyncProjectsResourceWithRawResponse",
6775
"ProjectsResourceWithStreamingResponse",
6876
"AsyncProjectsResourceWithStreamingResponse",
77+
"SearchResource",
78+
"AsyncSearchResource",
79+
"SearchResourceWithRawResponse",
80+
"AsyncSearchResourceWithRawResponse",
81+
"SearchResourceWithStreamingResponse",
82+
"AsyncSearchResourceWithStreamingResponse",
6983
"SessionsResource",
7084
"AsyncSessionsResource",
7185
"SessionsResourceWithRawResponse",
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
import httpx
6+
7+
from ..types import search_web_params
8+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
9+
from .._utils import maybe_transform, async_maybe_transform
10+
from .._compat import cached_property
11+
from .._resource import SyncAPIResource, AsyncAPIResource
12+
from .._response import (
13+
to_raw_response_wrapper,
14+
to_streamed_response_wrapper,
15+
async_to_raw_response_wrapper,
16+
async_to_streamed_response_wrapper,
17+
)
18+
from .._base_client import make_request_options
19+
from ..types.search_web_response import SearchWebResponse
20+
21+
__all__ = ["SearchResource", "AsyncSearchResource"]
22+
23+
24+
class SearchResource(SyncAPIResource):
25+
@cached_property
26+
def with_raw_response(self) -> SearchResourceWithRawResponse:
27+
"""
28+
This property can be used as a prefix for any HTTP method call to return
29+
the raw response object instead of the parsed content.
30+
31+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
32+
"""
33+
return SearchResourceWithRawResponse(self)
34+
35+
@cached_property
36+
def with_streaming_response(self) -> SearchResourceWithStreamingResponse:
37+
"""
38+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39+
40+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
41+
"""
42+
return SearchResourceWithStreamingResponse(self)
43+
44+
def web(
45+
self,
46+
*,
47+
query: str,
48+
num_results: int | Omit = omit,
49+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
50+
# The extra values given here take precedence over values defined on the client or passed to this method.
51+
extra_headers: Headers | None = None,
52+
extra_query: Query | None = None,
53+
extra_body: Body | None = None,
54+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
55+
) -> SearchWebResponse:
56+
"""
57+
Perform a web search and return structured results.
58+
59+
Args:
60+
query: The search query string
61+
62+
num_results: Number of results to return (1-25)
63+
64+
extra_headers: Send extra headers
65+
66+
extra_query: Add additional query parameters to the request
67+
68+
extra_body: Add additional JSON properties to the request
69+
70+
timeout: Override the client-level default timeout for this request, in seconds
71+
"""
72+
return self._post(
73+
"/v1/search",
74+
body=maybe_transform(
75+
{
76+
"query": query,
77+
"num_results": num_results,
78+
},
79+
search_web_params.SearchWebParams,
80+
),
81+
options=make_request_options(
82+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
83+
),
84+
cast_to=SearchWebResponse,
85+
)
86+
87+
88+
class AsyncSearchResource(AsyncAPIResource):
89+
@cached_property
90+
def with_raw_response(self) -> AsyncSearchResourceWithRawResponse:
91+
"""
92+
This property can be used as a prefix for any HTTP method call to return
93+
the raw response object instead of the parsed content.
94+
95+
For more information, see https://www.github.com/browserbase/sdk-python#accessing-raw-response-data-eg-headers
96+
"""
97+
return AsyncSearchResourceWithRawResponse(self)
98+
99+
@cached_property
100+
def with_streaming_response(self) -> AsyncSearchResourceWithStreamingResponse:
101+
"""
102+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
103+
104+
For more information, see https://www.github.com/browserbase/sdk-python#with_streaming_response
105+
"""
106+
return AsyncSearchResourceWithStreamingResponse(self)
107+
108+
async def web(
109+
self,
110+
*,
111+
query: str,
112+
num_results: int | Omit = omit,
113+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
114+
# The extra values given here take precedence over values defined on the client or passed to this method.
115+
extra_headers: Headers | None = None,
116+
extra_query: Query | None = None,
117+
extra_body: Body | None = None,
118+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
119+
) -> SearchWebResponse:
120+
"""
121+
Perform a web search and return structured results.
122+
123+
Args:
124+
query: The search query string
125+
126+
num_results: Number of results to return (1-25)
127+
128+
extra_headers: Send extra headers
129+
130+
extra_query: Add additional query parameters to the request
131+
132+
extra_body: Add additional JSON properties to the request
133+
134+
timeout: Override the client-level default timeout for this request, in seconds
135+
"""
136+
return await self._post(
137+
"/v1/search",
138+
body=await async_maybe_transform(
139+
{
140+
"query": query,
141+
"num_results": num_results,
142+
},
143+
search_web_params.SearchWebParams,
144+
),
145+
options=make_request_options(
146+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
147+
),
148+
cast_to=SearchWebResponse,
149+
)
150+
151+
152+
class SearchResourceWithRawResponse:
153+
def __init__(self, search: SearchResource) -> None:
154+
self._search = search
155+
156+
self.web = to_raw_response_wrapper(
157+
search.web,
158+
)
159+
160+
161+
class AsyncSearchResourceWithRawResponse:
162+
def __init__(self, search: AsyncSearchResource) -> None:
163+
self._search = search
164+
165+
self.web = async_to_raw_response_wrapper(
166+
search.web,
167+
)
168+
169+
170+
class SearchResourceWithStreamingResponse:
171+
def __init__(self, search: SearchResource) -> None:
172+
self._search = search
173+
174+
self.web = to_streamed_response_wrapper(
175+
search.web,
176+
)
177+
178+
179+
class AsyncSearchResourceWithStreamingResponse:
180+
def __init__(self, search: AsyncSearchResource) -> None:
181+
self._search = search
182+
183+
self.web = async_to_streamed_response_wrapper(
184+
search.web,
185+
)

src/browserbase/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
from .session import Session as Session
88
from .extension import Extension as Extension
99
from .project_usage import ProjectUsage as ProjectUsage
10+
from .search_web_params import SearchWebParams as SearchWebParams
1011
from .session_live_urls import SessionLiveURLs as SessionLiveURLs
12+
from .search_web_response import SearchWebResponse as SearchWebResponse
1113
from .session_list_params import SessionListParams as SessionListParams
1214
from .context_create_params import ContextCreateParams as ContextCreateParams
1315
from .project_list_response import ProjectListResponse as ProjectListResponse

0 commit comments

Comments
 (0)