Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.18.0"
".": "0.19.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e26ac226a3cf6d02380f3df386077414dd424dbf35c7c40e02ba512eff1dff84.yml
openapi_spec_hash: 077166ff05843544fbb4b519200ac9fc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-18e7692e180f911962f33787228afa2cf31f6c05ab23c6afb1ca4f82b108fba5.yml
openapi_spec_hash: 865bd1e346267d1e33f8ca63963c6aa3
config_hash: 70354330f92ce169beabc98696ebb9a3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.19.0 (2026-05-09)

Full Changelog: [v0.18.0...v0.19.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.18.0...v0.19.0)

### Features

* **api:** api update ([9706153](https://github.com/context-dot-dev/context-python-sdk/commit/97061533bf1bfebbba56574529b4cd2f69863edc))

## 0.18.0 (2026-05-07)

Full Changelog: [v0.17.0...v0.18.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.17.0...v0.18.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "context.dev"
version = "0.18.0"
version = "0.19.0"
description = "The official Python library for the context.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/context/dev/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "context.dev"
__version__ = "0.18.0" # x-release-please-version
__version__ = "0.19.0" # x-release-please-version
66 changes: 54 additions & 12 deletions src/context/dev/resources/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ def screenshot(
full_screenshot: Literal["true", "false"] | Omit = omit,
max_age_ms: int | Omit = omit,
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit,
prioritize: Literal["speed", "quality"] | Omit = omit,
timeout_ms: int | Omit = omit,
viewport: web_screenshot_params.Viewport | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -218,16 +218,16 @@ def screenshot(
provided, screenshots the main domain landing page. Only applicable when using
'domain', not 'directUrl'.

prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
faster capture with basic quality. If 'quality', optimizes for higher quality
with longer wait times. Defaults to 'quality' if not provided.

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

viewport: Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.

wait_for_ms: Optional browser wait time in milliseconds after initial page load before taking
the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
omitted.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -250,9 +250,9 @@ def screenshot(
"full_screenshot": full_screenshot,
"max_age_ms": max_age_ms,
"page": page,
"prioritize": prioritize,
"timeout_ms": timeout_ms,
"viewport": viewport,
"wait_for_ms": wait_for_ms,
},
web_screenshot_params.WebScreenshotParams,
),
Expand All @@ -276,6 +276,7 @@ def web_crawl_md(
timeout_ms: int | Omit = omit,
url_regex: str | Omit = omit,
use_main_content_only: bool | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -324,6 +325,9 @@ def web_crawl_md(
use_main_content_only: Extract only the main content, stripping headers, footers, sidebars, and
navigation

wait_for_ms: Optional browser wait time in milliseconds after initial page load for each
crawled page. Min: 0. Max: 30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -349,6 +353,7 @@ def web_crawl_md(
"timeout_ms": timeout_ms,
"url_regex": url_regex,
"use_main_content_only": use_main_content_only,
"wait_for_ms": wait_for_ms,
},
web_web_crawl_md_params.WebWebCrawlMdParams,
),
Expand All @@ -366,6 +371,7 @@ def web_scrape_html(
max_age_ms: int | Omit = omit,
parse_pdf: bool | Omit = omit,
timeout_ms: int | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -393,6 +399,10 @@ def web_scrape_html(
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

wait_for_ms:
Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -415,6 +425,7 @@ def web_scrape_html(
"max_age_ms": max_age_ms,
"parse_pdf": parse_pdf,
"timeout_ms": timeout_ms,
"wait_for_ms": wait_for_ms,
},
web_web_scrape_html_params.WebWebScrapeHTMLParams,
),
Expand All @@ -429,6 +440,7 @@ def web_scrape_images(
enrichment: web_web_scrape_images_params.Enrichment | Omit = omit,
max_age_ms: int | Omit = omit,
timeout_ms: int | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -455,6 +467,9 @@ def web_scrape_images(
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

wait_for_ms: Optional browser wait time in milliseconds after initial page load before
collecting images. Min: 0. Max: 30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -476,6 +491,7 @@ def web_scrape_images(
"enrichment": enrichment,
"max_age_ms": max_age_ms,
"timeout_ms": timeout_ms,
"wait_for_ms": wait_for_ms,
},
web_web_scrape_images_params.WebWebScrapeImagesParams,
),
Expand All @@ -495,6 +511,7 @@ def web_scrape_md(
shorten_base64_images: bool | Omit = omit,
timeout_ms: int | Omit = omit,
use_main_content_only: bool | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -532,6 +549,9 @@ def web_scrape_md(
use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars,
and navigation

wait_for_ms: Optional browser wait time in milliseconds after initial page load before
converting the page to Markdown. Min: 0. Max: 30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -558,6 +578,7 @@ def web_scrape_md(
"shorten_base64_images": shorten_base64_images,
"timeout_ms": timeout_ms,
"use_main_content_only": use_main_content_only,
"wait_for_ms": wait_for_ms,
},
web_web_scrape_md_params.WebWebScrapeMdParams,
),
Expand Down Expand Up @@ -767,9 +788,9 @@ async def screenshot(
full_screenshot: Literal["true", "false"] | Omit = omit,
max_age_ms: int | Omit = omit,
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit,
prioritize: Literal["speed", "quality"] | Omit = omit,
timeout_ms: int | Omit = omit,
viewport: web_screenshot_params.Viewport | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -803,16 +824,16 @@ async def screenshot(
provided, screenshots the main domain landing page. Only applicable when using
'domain', not 'directUrl'.

prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
faster capture with basic quality. If 'quality', optimizes for higher quality
with longer wait times. Defaults to 'quality' if not provided.

timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

viewport: Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.

wait_for_ms: Optional browser wait time in milliseconds after initial page load before taking
the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
omitted.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -835,9 +856,9 @@ async def screenshot(
"full_screenshot": full_screenshot,
"max_age_ms": max_age_ms,
"page": page,
"prioritize": prioritize,
"timeout_ms": timeout_ms,
"viewport": viewport,
"wait_for_ms": wait_for_ms,
},
web_screenshot_params.WebScreenshotParams,
),
Expand All @@ -861,6 +882,7 @@ async def web_crawl_md(
timeout_ms: int | Omit = omit,
url_regex: str | Omit = omit,
use_main_content_only: bool | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -909,6 +931,9 @@ async def web_crawl_md(
use_main_content_only: Extract only the main content, stripping headers, footers, sidebars, and
navigation

wait_for_ms: Optional browser wait time in milliseconds after initial page load for each
crawled page. Min: 0. Max: 30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -934,6 +959,7 @@ async def web_crawl_md(
"timeout_ms": timeout_ms,
"url_regex": url_regex,
"use_main_content_only": use_main_content_only,
"wait_for_ms": wait_for_ms,
},
web_web_crawl_md_params.WebWebCrawlMdParams,
),
Expand All @@ -951,6 +977,7 @@ async def web_scrape_html(
max_age_ms: int | Omit = omit,
parse_pdf: bool | Omit = omit,
timeout_ms: int | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -978,6 +1005,10 @@ async def web_scrape_html(
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

wait_for_ms:
Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -1000,6 +1031,7 @@ async def web_scrape_html(
"max_age_ms": max_age_ms,
"parse_pdf": parse_pdf,
"timeout_ms": timeout_ms,
"wait_for_ms": wait_for_ms,
},
web_web_scrape_html_params.WebWebScrapeHTMLParams,
),
Expand All @@ -1014,6 +1046,7 @@ async def web_scrape_images(
enrichment: web_web_scrape_images_params.Enrichment | Omit = omit,
max_age_ms: int | Omit = omit,
timeout_ms: int | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -1040,6 +1073,9 @@ async def web_scrape_images(
than this value, it will be aborted with a 408 status code. Maximum allowed
value is 300000ms (5 minutes).

wait_for_ms: Optional browser wait time in milliseconds after initial page load before
collecting images. Min: 0. Max: 30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -1061,6 +1097,7 @@ async def web_scrape_images(
"enrichment": enrichment,
"max_age_ms": max_age_ms,
"timeout_ms": timeout_ms,
"wait_for_ms": wait_for_ms,
},
web_web_scrape_images_params.WebWebScrapeImagesParams,
),
Expand All @@ -1080,6 +1117,7 @@ async def web_scrape_md(
shorten_base64_images: bool | Omit = omit,
timeout_ms: int | Omit = omit,
use_main_content_only: bool | Omit = omit,
wait_for_ms: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -1117,6 +1155,9 @@ async def web_scrape_md(
use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars,
and navigation

wait_for_ms: Optional browser wait time in milliseconds after initial page load before
converting the page to Markdown. Min: 0. Max: 30000 (30 seconds).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -1143,6 +1184,7 @@ async def web_scrape_md(
"shorten_base64_images": shorten_base64_images,
"timeout_ms": timeout_ms,
"use_main_content_only": use_main_content_only,
"wait_for_ms": wait_for_ms,
},
web_web_scrape_md_params.WebWebScrapeMdParams,
),
Expand Down
15 changes: 7 additions & 8 deletions src/context/dev/types/web_screenshot_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ class WebScreenshotParams(TypedDict, total=False):
applicable when using 'domain', not 'directUrl'.
"""

prioritize: Literal["speed", "quality"]
"""Optional parameter to prioritize screenshot capture.

If 'speed', optimizes for faster capture with basic quality. If 'quality',
optimizes for higher quality with longer wait times. Defaults to 'quality' if
not provided.
"""

timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
"""Optional timeout in milliseconds for the request.

Expand All @@ -65,6 +57,13 @@ class WebScreenshotParams(TypedDict, total=False):
viewport: Viewport
"""Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080."""

wait_for_ms: Annotated[int, PropertyInfo(alias="waitForMs")]
"""
Optional browser wait time in milliseconds after initial page load before taking
the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
omitted.
"""


class Viewport(TypedDict, total=False):
"""Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080."""
Expand Down
6 changes: 6 additions & 0 deletions src/context/dev/types/web_web_crawl_md_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,9 @@ class WebWebCrawlMdParams(TypedDict, total=False):
Extract only the main content, stripping headers, footers, sidebars, and
navigation
"""

wait_for_ms: Annotated[int, PropertyInfo(alias="waitForMs")]
"""
Optional browser wait time in milliseconds after initial page load for each
crawled page. Min: 0. Max: 30000 (30 seconds).
"""
6 changes: 6 additions & 0 deletions src/context/dev/types/web_web_scrape_html_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ class WebWebScrapeHTMLParams(TypedDict, total=False):
If the request takes longer than this value, it will be aborted with a 408
status code. Maximum allowed value is 300000ms (5 minutes).
"""

wait_for_ms: Annotated[int, PropertyInfo(alias="waitForMs")]
"""Optional browser wait time in milliseconds after initial page load.

Min: 0. Max: 30000 (30 seconds).
"""
6 changes: 6 additions & 0 deletions src/context/dev/types/web_web_scrape_images_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ class WebWebScrapeImagesParams(TypedDict, total=False):
status code. Maximum allowed value is 300000ms (5 minutes).
"""

wait_for_ms: Annotated[int, PropertyInfo(alias="waitForMs")]
"""
Optional browser wait time in milliseconds after initial page load before
collecting images. Min: 0. Max: 30000 (30 seconds).
"""


class Enrichment(TypedDict, total=False):
"""
Expand Down
Loading
Loading