Skip to content

Commit d0a62cc

Browse files
release: 1.11.0 (#166)
* feat: [AI-1993] - Surface structured JSON content on /v2/fetch * feat: [AI-1972] - Move fetch v2 handler into /v1/fetch * feat: [AI-1748][apps/api] Obtain custom certificates in API during session reservation * feat(api): manual updates * feat(api): manual updates * codegen metadata * release: 1.11.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent f3b6011 commit d0a62cc

9 files changed

Lines changed: 68 additions & 9 deletions

File tree

.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.10.0"
2+
".": "1.11.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 23
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-466614a040e7f31307530bd6ba443e714b6303eaa141904e7d32e6641d5ec55f.yml
3-
openapi_spec_hash: 2d06680e7c17847e4fbcac35124d2456
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-b2831c9c836f039762834825afdc20569587a825d29ac5c3748c78b009bf059b.yml
3+
openapi_spec_hash: dd85a934900cb6583f12ebf6117be884
44
config_hash: 40fbac80e24faaa0dc19e93368bcd821

CHANGELOG.md

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

3+
## 1.11.0 (2026-05-20)
4+
5+
Full Changelog: [v1.10.0...v1.11.0](https://github.com/browserbase/sdk-python/compare/v1.10.0...v1.11.0)
6+
7+
### Features
8+
9+
* [AI-1748][apps/api] Obtain custom certificates in API during session reservation ([9c0b78d](https://github.com/browserbase/sdk-python/commit/9c0b78d40adf9e9e2f49a2dbb34e37aa622b8991))
10+
* [AI-1972] - Move fetch v2 handler into /v1/fetch ([de76605](https://github.com/browserbase/sdk-python/commit/de766051f87c90c307b93f0614b2df48fd4d4ee9))
11+
* [AI-1993] - Surface structured JSON content on /v2/fetch ([97f1c02](https://github.com/browserbase/sdk-python/commit/97f1c02a520d433abe467b11a04f7fbab85fd3f3))
12+
* **api:** manual updates ([1d7beb8](https://github.com/browserbase/sdk-python/commit/1d7beb84745bd33ae11c9948a4f057f8240467a0))
13+
* **api:** manual updates ([23a3a2f](https://github.com/browserbase/sdk-python/commit/23a3a2f0d156d438b0c9aa1430663dc51f49f11e))
14+
315
## 1.10.0 (2026-05-13)
416

517
Full Changelog: [v1.9.0...v1.10.0](https://github.com/browserbase/sdk-python/compare/v1.9.0...v1.10.0)

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.10.0"
3+
version = "1.11.0"
44
description = "The official Python library for the Browserbase API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

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.10.0" # x-release-please-version
4+
__version__ = "1.11.0" # x-release-please-version

src/browserbase/resources/fetch_api.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
from __future__ import annotations
44

5+
from typing import Dict
6+
from typing_extensions import Literal
7+
58
import httpx
69

710
from ..types import fetch_api_create_params
@@ -47,7 +50,9 @@ def create(
4750
url: str,
4851
allow_insecure_ssl: bool | Omit = omit,
4952
allow_redirects: bool | Omit = omit,
53+
format: Literal["raw", "json", "markdown"] | Omit = omit,
5054
proxies: bool | Omit = omit,
55+
schema: Dict[str, object] | Omit = omit,
5156
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5257
# The extra values given here take precedence over values defined on the client or passed to this method.
5358
extra_headers: Headers | None = None,
@@ -65,8 +70,15 @@ def create(
6570
6671
allow_redirects: Whether to follow HTTP redirects
6772
73+
format: Output format for the response content. `raw` (default) returns the response
74+
body unchanged; `json` returns structured data (requires `schema`); `markdown`
75+
returns the page as markdown.
76+
6877
proxies: Whether to enable proxy support for the request
6978
79+
schema: JSON Schema describing the desired structure of the response. Only used when
80+
`format` is `json`.
81+
7082
extra_headers: Send extra headers
7183
7284
extra_query: Add additional query parameters to the request
@@ -82,7 +94,9 @@ def create(
8294
"url": url,
8395
"allow_insecure_ssl": allow_insecure_ssl,
8496
"allow_redirects": allow_redirects,
97+
"format": format,
8598
"proxies": proxies,
99+
"schema": schema,
86100
},
87101
fetch_api_create_params.FetchAPICreateParams,
88102
),
@@ -119,7 +133,9 @@ async def create(
119133
url: str,
120134
allow_insecure_ssl: bool | Omit = omit,
121135
allow_redirects: bool | Omit = omit,
136+
format: Literal["raw", "json", "markdown"] | Omit = omit,
122137
proxies: bool | Omit = omit,
138+
schema: Dict[str, object] | Omit = omit,
123139
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
124140
# The extra values given here take precedence over values defined on the client or passed to this method.
125141
extra_headers: Headers | None = None,
@@ -137,8 +153,15 @@ async def create(
137153
138154
allow_redirects: Whether to follow HTTP redirects
139155
156+
format: Output format for the response content. `raw` (default) returns the response
157+
body unchanged; `json` returns structured data (requires `schema`); `markdown`
158+
returns the page as markdown.
159+
140160
proxies: Whether to enable proxy support for the request
141161
162+
schema: JSON Schema describing the desired structure of the response. Only used when
163+
`format` is `json`.
164+
142165
extra_headers: Send extra headers
143166
144167
extra_query: Add additional query parameters to the request
@@ -154,7 +177,9 @@ async def create(
154177
"url": url,
155178
"allow_insecure_ssl": allow_insecure_ssl,
156179
"allow_redirects": allow_redirects,
180+
"format": format,
157181
"proxies": proxies,
182+
"schema": schema,
158183
},
159184
fetch_api_create_params.FetchAPICreateParams,
160185
),

src/browserbase/types/fetch_api_create_params.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, Annotated, TypedDict
5+
from typing import Dict
6+
from typing_extensions import Literal, Required, Annotated, TypedDict
67

78
from .._utils import PropertyInfo
89

@@ -19,5 +20,18 @@ class FetchAPICreateParams(TypedDict, total=False):
1920
allow_redirects: Annotated[bool, PropertyInfo(alias="allowRedirects")]
2021
"""Whether to follow HTTP redirects"""
2122

23+
format: Literal["raw", "json", "markdown"]
24+
"""Output format for the response content.
25+
26+
`raw` (default) returns the response body unchanged; `json` returns structured
27+
data (requires `schema`); `markdown` returns the page as markdown.
28+
"""
29+
2230
proxies: bool
2331
"""Whether to enable proxy support for the request"""
32+
33+
schema: Dict[str, object]
34+
"""JSON Schema describing the desired structure of the response.
35+
36+
Only used when `format` is `json`.
37+
"""

src/browserbase/types/fetch_api_create_response.py

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

3-
from typing import Dict
3+
from typing import Dict, Union
44

55
from pydantic import Field as FieldInfo
66

@@ -13,8 +13,12 @@ class FetchAPICreateResponse(BaseModel):
1313
id: str
1414
"""Unique identifier for the fetch request"""
1515

16-
content: str
17-
"""The response body content"""
16+
content: Union[str, Dict[str, object]]
17+
"""The response body content.
18+
19+
A string for `raw` and `markdown` formats; a structured object for `json` format
20+
(the schema-extracted result).
21+
"""
1822

1923
content_type: str = FieldInfo(alias="contentType")
2024
"""The MIME type of the response"""

tests/api_resources/test_fetch_api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def test_method_create_with_all_params(self, client: Browserbase) -> None:
3030
url="https://example.com",
3131
allow_insecure_ssl=True,
3232
allow_redirects=True,
33+
format="raw",
3334
proxies=True,
35+
schema={"foo": "bar"},
3436
)
3537
assert_matches_type(FetchAPICreateResponse, fetch_api, path=["response"])
3638

@@ -77,7 +79,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncBrowserbas
7779
url="https://example.com",
7880
allow_insecure_ssl=True,
7981
allow_redirects=True,
82+
format="raw",
8083
proxies=True,
84+
schema={"foo": "bar"},
8185
)
8286
assert_matches_type(FetchAPICreateResponse, fetch_api, path=["response"])
8387

0 commit comments

Comments
 (0)