diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index d1328ca..64f9ff4 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "2.7.0"
+ ".": "2.8.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 3b484e3..74e73bc 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 37
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-758c3a2fbd5b7be61c8e6e0ad2e6a5ec30695747bb675960d888c497647d13d7.yml
-openapi_spec_hash: 00002d90bde02f67e174368ae470c597
-config_hash: 2bea1743c84d63bd61f8501a6ea63065
+configured_endpoints: 38
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-155e4761d62255841349c0f8a01b0a9c463ea1d1f2d6c4fd8d1a75c8bef6f226.yml
+openapi_spec_hash: ab91f77e7c9d992400cbc7fc8a9e76c1
+config_hash: bff282047fafdad771fb7ec685f56944
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f635b52..643ebcb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 2.8.0 (2026-08-05)
+
+Full Changelog: [v2.7.0...v2.8.0](https://github.com/context-dot-dev/context-go-sdk/compare/v2.7.0...v2.8.0)
+
+### Features
+
+* **api:** manual updates ([bbf6510](https://github.com/context-dot-dev/context-go-sdk/commit/bbf6510a615c1bb20ef80fe594b62e9faa1c3cd6))
+
## 2.7.0 (2026-08-01)
Full Changelog: [v2.6.0...v2.7.0](https://github.com/context-dot-dev/context-go-sdk/compare/v2.6.0...v2.7.0)
diff --git a/README.md b/README.md
index 46b184b..9532e29 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ Or to pin the version:
```sh
-go get -u 'github.com/context-dot-dev/context-go-sdk@v2.7.0'
+go get -u 'github.com/context-dot-dev/context-go-sdk@v2.8.0'
```
diff --git a/api.md b/api.md
index 8cc5939..69d7939 100644
--- a/api.md
+++ b/api.md
@@ -56,11 +56,13 @@ Response Types:
- contextdev.BrandGetResponse
- contextdev.BrandGetSimplifiedResponse
+- contextdev.BrandSearchResponse
Methods:
- client.Brand.Get(ctx context.Context, body contextdev.BrandGetParams) (\*contextdev.BrandGetResponse, error)
- client.Brand.GetSimplified(ctx context.Context, query contextdev.BrandGetSimplifiedParams) (\*contextdev.BrandGetSimplifiedResponse, error)
+- client.Brand.Search(ctx context.Context, query contextdev.BrandSearchParams) (\*contextdev.BrandSearchResponse, error)
# Industry
diff --git a/brand.go b/brand.go
index 431d9e6..f979a30 100644
--- a/brand.go
+++ b/brand.go
@@ -58,6 +58,20 @@ func (r *BrandService) GetSimplified(ctx context.Context, query BrandGetSimplifi
return res, err
}
+// Search brands by name or domain and get back up to 10 lightweight matches
+// (domain, name, logo), most popular first: by Tranco rank, then market cap for
+// brands outside the Tranco list, with text relevance breaking ties. Matching is
+// prefix-based with no typo tolerance, so it is suited to autocomplete. Only
+// brands already in the Context.dev index are returned — use /brand/retrieve to
+// fetch (and index) a specific domain. Free on Pro and Scale plans; costs 1 credit
+// per request on the Free and Starter plans.
+func (r *BrandService) Search(ctx context.Context, query BrandSearchParams, opts ...option.RequestOption) (res *BrandSearchResponse, err error) {
+ opts = slices.Concat(r.options, opts)
+ path := "brand/search"
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &res, opts...)
+ return res, err
+}
+
type BrandGetResponse struct {
// Detailed brand information
Brand BrandGetResponseBrand `json:"brand"`
@@ -861,6 +875,73 @@ func (r *BrandGetSimplifiedResponseKeyMetadata) UnmarshalJSON(data []byte) error
return apijson.UnmarshalRoot(data, r)
}
+type BrandSearchResponse struct {
+ // Up to 10 matching brands, most popular first. Empty when nothing matches.
+ Results []BrandSearchResponseResult `json:"results" api:"required"`
+ // 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.
+ KeyMetadata BrandSearchResponseKeyMetadata `json:"key_metadata"`
+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
+ JSON struct {
+ Results respjson.Field
+ KeyMetadata respjson.Field
+ ExtraFields map[string]respjson.Field
+ raw string
+ } `json:"-"`
+}
+
+// Returns the unmodified JSON received from the API
+func (r BrandSearchResponse) RawJSON() string { return r.JSON.raw }
+func (r *BrandSearchResponse) UnmarshalJSON(data []byte) error {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+type BrandSearchResponseResult struct {
+ // The brand's domain.
+ Domain string `json:"domain" api:"required"`
+ // Logo link URL that serves the brand's logo, generated per request for the
+ // calling organization.
+ Logo string `json:"logo" api:"required"`
+ // The brand's name. Empty string when unknown.
+ Name string `json:"name" api:"required"`
+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
+ JSON struct {
+ Domain respjson.Field
+ Logo respjson.Field
+ Name respjson.Field
+ ExtraFields map[string]respjson.Field
+ raw string
+ } `json:"-"`
+}
+
+// Returns the unmodified JSON received from the API
+func (r BrandSearchResponseResult) RawJSON() string { return r.JSON.raw }
+func (r *BrandSearchResponseResult) UnmarshalJSON(data []byte) error {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+// 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.
+type BrandSearchResponseKeyMetadata struct {
+ // The number of credits consumed by this request.
+ CreditsConsumed int64 `json:"credits_consumed" api:"required"`
+ // The number of credits remaining for your organization after this request.
+ CreditsRemaining int64 `json:"credits_remaining" api:"required"`
+ // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
+ JSON struct {
+ CreditsConsumed respjson.Field
+ CreditsRemaining respjson.Field
+ ExtraFields map[string]respjson.Field
+ raw string
+ } `json:"-"`
+}
+
+// Returns the unmodified JSON received from the API
+func (r BrandSearchResponseKeyMetadata) RawJSON() string { return r.JSON.raw }
+func (r *BrandSearchResponseKeyMetadata) UnmarshalJSON(data []byte) error {
+ return apijson.UnmarshalRoot(data, r)
+}
+
type BrandGetParams struct {
//
@@ -1337,3 +1418,22 @@ const (
BrandGetSimplifiedParamsThemeLight BrandGetSimplifiedParamsTheme = "light"
BrandGetSimplifiedParamsThemeDark BrandGetSimplifiedParamsTheme = "dark"
)
+
+type BrandSearchParams struct {
+ // Search term, matched against brand names and domains by prefix (e.g. 'nike',
+ // 'nike.com', 'nik').
+ Query string `query:"query" api:"required" json:"-"`
+ // Optional comma-separated caller-defined tags for tracking this request. Tags are
+ // recorded on the request's usage log and can be used to filter usage on the
+ // dashboard usage page. Up to 20 tags, each 1-50 characters.
+ Tags []string `query:"tags,omitzero" json:"-"`
+ paramObj
+}
+
+// URLQuery serializes [BrandSearchParams]'s query parameters as `url.Values`.
+func (r BrandSearchParams) URLQuery() (v url.Values, err error) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatComma,
+ NestedFormat: apiquery.NestedQueryFormatBrackets,
+ })
+}
diff --git a/brand_test.go b/brand_test.go
index 591643e..2c59452 100644
--- a/brand_test.go
+++ b/brand_test.go
@@ -73,3 +73,29 @@ func TestBrandGetSimplifiedWithOptionalParams(t *testing.T) {
t.Fatalf("err should be nil: %s", err.Error())
}
}
+
+func TestBrandSearchWithOptionalParams(t *testing.T) {
+ t.Skip("Mock server tests are disabled")
+ baseURL := "http://localhost:4010"
+ if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok {
+ baseURL = envURL
+ }
+ if !testutil.CheckTestServer(t, baseURL) {
+ return
+ }
+ client := contextdev.NewClient(
+ option.WithBaseURL(baseURL),
+ option.WithAPIKey("My API Key"),
+ )
+ _, err := client.Brand.Search(context.TODO(), contextdev.BrandSearchParams{
+ Query: "x",
+ Tags: []string{"production", "team-alpha"},
+ })
+ if err != nil {
+ var apierr *contextdev.Error
+ if errors.As(err, &apierr) {
+ t.Log(string(apierr.DumpRequest(true)))
+ }
+ t.Fatalf("err should be nil: %s", err.Error())
+ }
+}
diff --git a/internal/version.go b/internal/version.go
index 166fc82..ac38466 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -2,4 +2,4 @@
package internal
-const PackageVersion = "2.7.0" // x-release-please-version
+const PackageVersion = "2.8.0" // x-release-please-version