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.34.0"
".": "0.35.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: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5a8e1f6e16ecdbab4b2ff14701779818fe0328b06a1c7fa44a32da4f4bc87a49.yml
openapi_spec_hash: 4b5407859d1154232189ef440b783b17
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b84f53b1a92511eff85645f287ec08d43adcdcc589367c015770bde836422a65.yml
openapi_spec_hash: 71e317da7bc58cfc3bc2e4180f5b6267
config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.35.0 (2026-06-11)

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

### Features

* **api:** api update ([6721d0b](https://github.com/context-dot-dev/context-python-sdk/commit/6721d0bb8b04b536a28ebc5dfbda87358ccb2f2b))
* **api:** api update ([713964b](https://github.com/context-dot-dev/context-python-sdk/commit/713964bbe1868905959b6758a3da528ded51316e))

## 0.34.0 (2026-06-08)

Full Changelog: [v0.33.0...v0.34.0](https://github.com/context-dot-dev/context-python-sdk/compare/v0.33.0...v0.34.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.34.0"
version = "0.35.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.34.0" # x-release-please-version
__version__ = "0.35.0" # x-release-please-version
18 changes: 18 additions & 0 deletions src/context/dev/resources/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def extract(
include_frames: bool | Omit = omit,
instructions: str | Omit = omit,
max_age_ms: int | Omit = omit,
max_depth: int | Omit = omit,
max_pages: int | Omit = omit,
pdf: web_extract_params.Pdf | Omit = omit,
stop_after_ms: int | Omit = omit,
timeout_ms: int | Omit = omit,
Expand Down Expand Up @@ -116,6 +118,11 @@ def extract(
max_age_ms: Return cached scrape results if a prior scrape for the same parameters is
younger than this many milliseconds. Defaults to 7 days (604800000 ms).

max_depth: Optional maximum link depth from the starting URL (0 = only the starting page).
If omitted, there is no crawl depth limit.

max_pages: Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.

stop_after_ms: Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
(110s). Default: 80000 (80s).

Expand Down Expand Up @@ -145,6 +152,8 @@ def extract(
"include_frames": include_frames,
"instructions": instructions,
"max_age_ms": max_age_ms,
"max_depth": max_depth,
"max_pages": max_pages,
"pdf": pdf,
"stop_after_ms": stop_after_ms,
"timeout_ms": timeout_ms,
Expand Down Expand Up @@ -985,6 +994,8 @@ async def extract(
include_frames: bool | Omit = omit,
instructions: str | Omit = omit,
max_age_ms: int | Omit = omit,
max_depth: int | Omit = omit,
max_pages: int | Omit = omit,
pdf: web_extract_params.Pdf | Omit = omit,
stop_after_ms: int | Omit = omit,
timeout_ms: int | Omit = omit,
Expand Down Expand Up @@ -1025,6 +1036,11 @@ async def extract(
max_age_ms: Return cached scrape results if a prior scrape for the same parameters is
younger than this many milliseconds. Defaults to 7 days (604800000 ms).

max_depth: Optional maximum link depth from the starting URL (0 = only the starting page).
If omitted, there is no crawl depth limit.

max_pages: Maximum number of pages to analyze for extraction. Hard cap: 50. Defaults to 5.

stop_after_ms: Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
(110s). Default: 80000 (80s).

Expand Down Expand Up @@ -1054,6 +1070,8 @@ async def extract(
"include_frames": include_frames,
"instructions": instructions,
"max_age_ms": max_age_ms,
"max_depth": max_depth,
"max_pages": max_pages,
"pdf": pdf,
"stop_after_ms": stop_after_ms,
"timeout_ms": timeout_ms,
Expand Down
22 changes: 21 additions & 1 deletion src/context/dev/types/ai_ai_query_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from .._models import BaseModel

__all__ = ["AIAIQueryResponse", "DataExtracted"]
__all__ = ["AIAIQueryResponse", "DataExtracted", "KeyMetadata"]


class DataExtracted(BaseModel):
Expand All @@ -19,13 +19,33 @@ class DataExtracted(BaseModel):
"""


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class AIAIQueryResponse(BaseModel):
data_extracted: Optional[List[DataExtracted]] = None
"""Array of extracted data points"""

domain: Optional[str] = None
"""The domain that was analyzed"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

status: Optional[str] = None
"""Status of the response, e.g., 'ok'"""

Expand Down
22 changes: 21 additions & 1 deletion src/context/dev/types/ai_extract_product_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@

from .._models import BaseModel

__all__ = ["AIExtractProductResponse", "Product"]
__all__ = ["AIExtractProductResponse", "KeyMetadata", "Product"]


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class Product(BaseModel):
Expand Down Expand Up @@ -58,6 +71,13 @@ class AIExtractProductResponse(BaseModel):
is_product_page: Optional[bool] = None
"""Whether the given URL is a product detail page"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

platform: Optional[Literal["amazon", "tiktok_shop", "etsy", "generic"]] = None
"""The detected ecommerce platform, or null if not a product page"""

Expand Down
22 changes: 21 additions & 1 deletion src/context/dev/types/ai_extract_products_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@

from .._models import BaseModel

__all__ = ["AIExtractProductsResponse", "Product"]
__all__ = ["AIExtractProductsResponse", "KeyMetadata", "Product"]


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class Product(BaseModel):
Expand Down Expand Up @@ -53,5 +66,12 @@ class Product(BaseModel):


class AIExtractProductsResponse(BaseModel):
key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

products: Optional[List[Product]] = None
"""Array of products extracted from the website"""
21 changes: 21 additions & 0 deletions src/context/dev/types/brand_identify_from_transaction_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"BrandLogoResolution",
"BrandSocial",
"BrandStock",
"KeyMetadata",
]


Expand Down Expand Up @@ -650,12 +651,32 @@ class Brand(BaseModel):
"""The title or name of the brand"""


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class BrandIdentifyFromTransactionResponse(BaseModel):
brand: Optional[Brand] = None
"""Detailed brand information"""

code: Optional[int] = None
"""HTTP status code"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

status: Optional[str] = None
"""Status of the response, e.g., 'ok'"""
21 changes: 21 additions & 0 deletions src/context/dev/types/brand_retrieve_by_email_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"BrandLogoResolution",
"BrandSocial",
"BrandStock",
"KeyMetadata",
]


Expand Down Expand Up @@ -650,12 +651,32 @@ class Brand(BaseModel):
"""The title or name of the brand"""


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class BrandRetrieveByEmailResponse(BaseModel):
brand: Optional[Brand] = None
"""Detailed brand information"""

code: Optional[int] = None
"""HTTP status code"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

status: Optional[str] = None
"""Status of the response, e.g., 'ok'"""
21 changes: 21 additions & 0 deletions src/context/dev/types/brand_retrieve_by_isin_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"BrandLogoResolution",
"BrandSocial",
"BrandStock",
"KeyMetadata",
]


Expand Down Expand Up @@ -650,12 +651,32 @@ class Brand(BaseModel):
"""The title or name of the brand"""


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class BrandRetrieveByIsinResponse(BaseModel):
brand: Optional[Brand] = None
"""Detailed brand information"""

code: Optional[int] = None
"""HTTP status code"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

status: Optional[str] = None
"""Status of the response, e.g., 'ok'"""
21 changes: 21 additions & 0 deletions src/context/dev/types/brand_retrieve_by_name_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"BrandLogoResolution",
"BrandSocial",
"BrandStock",
"KeyMetadata",
]


Expand Down Expand Up @@ -650,12 +651,32 @@ class Brand(BaseModel):
"""The title or name of the brand"""


class KeyMetadata(BaseModel):
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the response status is not 200.
"""

credits_consumed: int
"""The number of credits consumed by this request."""

credits_remaining: int
"""The number of credits remaining for your organization after this request."""


class BrandRetrieveByNameResponse(BaseModel):
brand: Optional[Brand] = None
"""Detailed brand information"""

code: Optional[int] = None
"""HTTP status code"""

key_metadata: Optional[KeyMetadata] = None
"""Metadata about the API key used for the request.

Included in every response whenever a valid API key is provided, even when the
response status is not 200.
"""

status: Optional[str] = None
"""Status of the response, e.g., 'ok'"""
Loading
Loading