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 @@
{
".": "1.27.0"
".": "1.28.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-1391c1e69bcdce517f71265a2f22f4e8d35c3f12a224899e64f85e25897b743a.yml
openapi_spec_hash: f8a2917cc425300d272ae943f88d7bb7
config_hash: 7f48d078645cb8331328bcd6f6ab3281
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-863ddc13e032497459a639cf02a16349831dda7e39557cbd5ce33da34d086b02.yml
openapi_spec_hash: f972aac9618fe8df340d96344b3d0578
config_hash: 6f10592c7d0c3bafefc1271472283217
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.28.0 (2026-01-05)

Full Changelog: [v1.27.0...v1.28.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.27.0...v1.28.0)

### Features

* **api:** api update ([5e513f4](https://github.com/brand-dot-dev/python-sdk/commit/5e513f457d07e9f0560aa8f50542934d7393c929))
* **api:** api update ([9556441](https://github.com/brand-dot-dev/python-sdk/commit/95564414d4f0ec6095e06df2d5e1e8e2b9d2d889))
* **api:** manual updates ([62ec1b4](https://github.com/brand-dot-dev/python-sdk/commit/62ec1b480e338243030e770e4a0cae33468575c2))

## 1.27.0 (2025-12-22)

Full Changelog: [v1.26.0...v1.27.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.26.0...v1.27.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Brand Dev
Copyright 2026 Brand Dev

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Types:
```python
from brand.dev.types import (
BrandRetrieveResponse,
BrandAIProductsResponse,
BrandAIQueryResponse,
BrandFontsResponse,
BrandIdentifyFromTransactionResponse,
Expand All @@ -24,6 +25,7 @@ from brand.dev.types import (
Methods:

- <code title="get /brand/retrieve">client.brand.<a href="./src/brand/dev/resources/brand.py">retrieve</a>(\*\*<a href="src/brand/dev/types/brand_retrieve_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_retrieve_response.py">BrandRetrieveResponse</a></code>
- <code title="post /brand/ai/products">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_products</a>(\*\*<a href="src/brand/dev/types/brand_ai_products_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_products_response.py">BrandAIProductsResponse</a></code>
- <code title="post /brand/ai/query">client.brand.<a href="./src/brand/dev/resources/brand.py">ai_query</a>(\*\*<a href="src/brand/dev/types/brand_ai_query_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_ai_query_response.py">BrandAIQueryResponse</a></code>
- <code title="get /brand/fonts">client.brand.<a href="./src/brand/dev/resources/brand.py">fonts</a>(\*\*<a href="src/brand/dev/types/brand_fonts_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_fonts_response.py">BrandFontsResponse</a></code>
- <code title="get /brand/transaction_identifier">client.brand.<a href="./src/brand/dev/resources/brand.py">identify_from_transaction</a>(\*\*<a href="src/brand/dev/types/brand_identify_from_transaction_params.py">params</a>) -> <a href="./src/brand/dev/types/brand_identify_from_transaction_response.py">BrandIdentifyFromTransactionResponse</a></code>
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 = "brand.dev"
version = "1.27.0"
version = "1.28.0"
description = "The official Python library for the brand.dev API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/brand/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__ = "brand.dev"
__version__ = "1.27.0" # x-release-please-version
__version__ = "1.28.0" # x-release-please-version
172 changes: 144 additions & 28 deletions src/brand/dev/resources/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
brand_retrieve_params,
brand_screenshot_params,
brand_styleguide_params,
brand_ai_products_params,
brand_retrieve_naics_params,
brand_retrieve_by_isin_params,
brand_retrieve_by_name_params,
Expand All @@ -40,6 +41,7 @@
from ..types.brand_retrieve_response import BrandRetrieveResponse
from ..types.brand_screenshot_response import BrandScreenshotResponse
from ..types.brand_styleguide_response import BrandStyleguideResponse
from ..types.brand_ai_products_response import BrandAIProductsResponse
from ..types.brand_retrieve_naics_response import BrandRetrieveNaicsResponse
from ..types.brand_retrieve_by_isin_response import BrandRetrieveByIsinResponse
from ..types.brand_retrieve_by_name_response import BrandRetrieveByNameResponse
Expand Down Expand Up @@ -187,6 +189,58 @@ def retrieve(
cast_to=BrandRetrieveResponse,
)

def ai_products(
self,
*,
domain: str,
max_products: int | Omit = omit,
timeout_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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandAIProductsResponse:
"""Beta feature: Extract product information from a brand's website.

Brand.dev will
analyze the website and return a list of products with details such as name,
description, image, pricing, features, and more.

Args:
domain: The domain name to analyze

max_products: Maximum number of products to extract.

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).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._post(
"/brand/ai/products",
body=maybe_transform(
{
"domain": domain,
"max_products": max_products,
"timeout_ms": timeout_ms,
},
brand_ai_products_params.BrandAIProductsParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=BrandAIProductsResponse,
)

def ai_query(
self,
*,
Expand All @@ -201,11 +255,11 @@ def ai_query(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandAIQueryResponse:
"""Beta feature: Use AI to extract specific data points from a brand's website.
"""Use AI to extract specific data points from a brand's website.

The
AI will crawl the website and extract the requested information based on the
provided data points.
The AI will crawl
the website and extract the requested information based on the provided data
points.

Args:
data_to_extract: Array of data points to extract from the website
Expand Down Expand Up @@ -256,8 +310,8 @@ def fonts(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandFontsResponse:
"""
Beta feature: Extract font information from a brand's website including font
families, usage statistics, fallbacks, and element/word counts.
Extract font information from a brand's website including font families, usage
statistics, fallbacks, and element/word counts.

Args:
domain: Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
Expand Down Expand Up @@ -1429,12 +1483,12 @@ def screenshot(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandScreenshotResponse:
"""Beta feature: Capture a screenshot of a website.
"""Capture a screenshot of a website.

Supports both viewport
(standard browser view) and full-page screenshots. Can also screenshot specific
page types (login, pricing, etc.) by using heuristics to find the appropriate
URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
Supports both viewport (standard browser
view) and full-page screenshots. Can also screenshot specific page types (login,
pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
the uploaded screenshot image hosted on our CDN.

Args:
domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
Expand Down Expand Up @@ -1495,9 +1549,8 @@ def styleguide(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandStyleguideResponse:
"""
Beta feature: Automatically extract comprehensive design system information from
a brand's website including colors, typography, spacing, shadows, and UI
components.
Automatically extract comprehensive design system information from a brand's
website including colors, typography, spacing, shadows, and UI components.

Args:
domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
Expand Down Expand Up @@ -1675,6 +1728,58 @@ async def retrieve(
cast_to=BrandRetrieveResponse,
)

async def ai_products(
self,
*,
domain: str,
max_products: int | Omit = omit,
timeout_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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandAIProductsResponse:
"""Beta feature: Extract product information from a brand's website.

Brand.dev will
analyze the website and return a list of products with details such as name,
description, image, pricing, features, and more.

Args:
domain: The domain name to analyze

max_products: Maximum number of products to extract.

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).

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._post(
"/brand/ai/products",
body=await async_maybe_transform(
{
"domain": domain,
"max_products": max_products,
"timeout_ms": timeout_ms,
},
brand_ai_products_params.BrandAIProductsParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=BrandAIProductsResponse,
)

async def ai_query(
self,
*,
Expand All @@ -1689,11 +1794,11 @@ async def ai_query(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandAIQueryResponse:
"""Beta feature: Use AI to extract specific data points from a brand's website.
"""Use AI to extract specific data points from a brand's website.

The
AI will crawl the website and extract the requested information based on the
provided data points.
The AI will crawl
the website and extract the requested information based on the provided data
points.

Args:
data_to_extract: Array of data points to extract from the website
Expand Down Expand Up @@ -1744,8 +1849,8 @@ async def fonts(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandFontsResponse:
"""
Beta feature: Extract font information from a brand's website including font
families, usage statistics, fallbacks, and element/word counts.
Extract font information from a brand's website including font families, usage
statistics, fallbacks, and element/word counts.

Args:
domain: Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
Expand Down Expand Up @@ -2917,12 +3022,12 @@ async def screenshot(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandScreenshotResponse:
"""Beta feature: Capture a screenshot of a website.
"""Capture a screenshot of a website.

Supports both viewport
(standard browser view) and full-page screenshots. Can also screenshot specific
page types (login, pricing, etc.) by using heuristics to find the appropriate
URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
Supports both viewport (standard browser
view) and full-page screenshots. Can also screenshot specific page types (login,
pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
the uploaded screenshot image hosted on our CDN.

Args:
domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
Expand Down Expand Up @@ -2983,9 +3088,8 @@ async def styleguide(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BrandStyleguideResponse:
"""
Beta feature: Automatically extract comprehensive design system information from
a brand's website including colors, typography, spacing, shadows, and UI
components.
Automatically extract comprehensive design system information from a brand's
website including colors, typography, spacing, shadows, and UI components.

Args:
domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
Expand Down Expand Up @@ -3035,6 +3139,9 @@ def __init__(self, brand: BrandResource) -> None:
self.retrieve = to_raw_response_wrapper(
brand.retrieve,
)
self.ai_products = to_raw_response_wrapper(
brand.ai_products,
)
self.ai_query = to_raw_response_wrapper(
brand.ai_query,
)
Expand Down Expand Up @@ -3083,6 +3190,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
brand.retrieve,
)
self.ai_products = async_to_raw_response_wrapper(
brand.ai_products,
)
self.ai_query = async_to_raw_response_wrapper(
brand.ai_query,
)
Expand Down Expand Up @@ -3131,6 +3241,9 @@ def __init__(self, brand: BrandResource) -> None:
self.retrieve = to_streamed_response_wrapper(
brand.retrieve,
)
self.ai_products = to_streamed_response_wrapper(
brand.ai_products,
)
self.ai_query = to_streamed_response_wrapper(
brand.ai_query,
)
Expand Down Expand Up @@ -3179,6 +3292,9 @@ def __init__(self, brand: AsyncBrandResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
brand.retrieve,
)
self.ai_products = async_to_streamed_response_wrapper(
brand.ai_products,
)
self.ai_query = async_to_streamed_response_wrapper(
brand.ai_query,
)
Expand Down
2 changes: 2 additions & 0 deletions src/brand/dev/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
from .brand_retrieve_response import BrandRetrieveResponse as BrandRetrieveResponse
from .brand_screenshot_params import BrandScreenshotParams as BrandScreenshotParams
from .brand_styleguide_params import BrandStyleguideParams as BrandStyleguideParams
from .brand_ai_products_params import BrandAIProductsParams as BrandAIProductsParams
from .brand_screenshot_response import BrandScreenshotResponse as BrandScreenshotResponse
from .brand_styleguide_response import BrandStyleguideResponse as BrandStyleguideResponse
from .brand_ai_products_response import BrandAIProductsResponse as BrandAIProductsResponse
from .brand_retrieve_naics_params import BrandRetrieveNaicsParams as BrandRetrieveNaicsParams
from .brand_retrieve_by_isin_params import BrandRetrieveByIsinParams as BrandRetrieveByIsinParams
from .brand_retrieve_by_name_params import BrandRetrieveByNameParams as BrandRetrieveByNameParams
Expand Down
24 changes: 24 additions & 0 deletions src/brand/dev/types/brand_ai_products_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Required, Annotated, TypedDict

from .._utils import PropertyInfo

__all__ = ["BrandAIProductsParams"]


class BrandAIProductsParams(TypedDict, total=False):
domain: Required[str]
"""The domain name to analyze"""

max_products: Annotated[int, PropertyInfo(alias="maxProducts")]
"""Maximum number of products to extract."""

timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
"""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).
"""
Loading