From 71d9e3c33d6b2d6a470be1bfd483c72905bfdc4f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 12 May 2026 13:18:07 +0000
Subject: [PATCH 01/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 9be89d15..f543d22e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 42
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-39c677653dce3a2119784c3e7920341806ecb04f570586e67da2812c0918224f.yml
-openapi_spec_hash: fe9e8287add64a2ee6962e3ff46ad910
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-1c1326d52cf9189c55b47ba226737088e214bc65b4e0981221e4e4dc277b9017.yml
+openapi_spec_hash: a62786c5c2c1ae9fcbec838058996ddd
config_hash: 49f12dcc01ab5f70d3b39f508d96153b
From 5453d1a1f4390efd8ab7f1dcb017119a34b8468e Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 12 May 2026 16:18:08 +0000
Subject: [PATCH 02/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index f543d22e..7e66258a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 42
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-1c1326d52cf9189c55b47ba226737088e214bc65b4e0981221e4e4dc277b9017.yml
-openapi_spec_hash: a62786c5c2c1ae9fcbec838058996ddd
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-cf1b0dcd593ac501e89638df611299c542d697868cb917ab5af38089e9b6d596.yml
+openapi_spec_hash: f45384f57ca4c09c69dccd7c9c77ab06
config_hash: 49f12dcc01ab5f70d3b39f508d96153b
From 6d729ed1d11a66a80edcb515038c127dd0dd0dd0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 12 May 2026 18:17:58 +0000
Subject: [PATCH 03/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 7e66258a..afe8833c 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 42
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-cf1b0dcd593ac501e89638df611299c542d697868cb917ab5af38089e9b6d596.yml
-openapi_spec_hash: f45384f57ca4c09c69dccd7c9c77ab06
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-d062566cfe43e907c10561f1db8fe0571b10c8acb5ffb06e17f41fe43c46086d.yml
+openapi_spec_hash: 6746101ae95ac4cc98ad88eaa8e76223
config_hash: 49f12dcc01ab5f70d3b39f508d96153b
From a8d9b7bf9eedfd6792bbd34cbe723ae612c576b8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 12 May 2026 19:04:38 +0000
Subject: [PATCH 04/15] ci: pin GitHub Actions to commit SHAs
Pin all GitHub Actions referenced in generated workflows (both
first-party `actions/*` and third-party) to immutable commit SHAs.
Updating pinned actions is now a deliberate codegen-side bump rather
than implicit on every workflow run.
---
.github/workflows/ci.yml | 14 +++++++-------
.github/workflows/publish-pypi.yml | 4 ++--
.github/workflows/release-doctor.yml | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 20dd7ac3..1b4ca550 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,10 +21,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/profound-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
- uses: astral-sh/setup-uv@v5
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.10.2'
@@ -43,10 +43,10 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/profound-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
- uses: astral-sh/setup-uv@v5
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.10.2'
@@ -61,7 +61,7 @@ jobs:
github.repository == 'stainless-sdks/profound-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
- uses: actions/github-script@v8
+ uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());
@@ -81,10 +81,10 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/profound-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
- uses: astral-sh/setup-uv@v5
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.10.2'
diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml
index 1faed190..9718104e 100644
--- a/.github/workflows/publish-pypi.yml
+++ b/.github/workflows/publish-pypi.yml
@@ -17,10 +17,10 @@ jobs:
id-token: write
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install uv
- uses: astral-sh/setup-uv@v5
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
version: '0.9.13'
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
index 921dd153..78087bca 100644
--- a/.github/workflows/release-doctor.yml
+++ b/.github/workflows/release-doctor.yml
@@ -12,7 +12,7 @@ jobs:
if: github.repository == 'cooper-square-technologies/profound-python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
steps:
- - uses: actions/checkout@v6
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check release environment
run: |
From 3f5c1259f6e358af88f7c66c743214da6093fd17 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 12 May 2026 19:20:24 +0000
Subject: [PATCH 05/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index afe8833c..a50ff94f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 42
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-d062566cfe43e907c10561f1db8fe0571b10c8acb5ffb06e17f41fe43c46086d.yml
-openapi_spec_hash: 6746101ae95ac4cc98ad88eaa8e76223
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-7608b1e2983e99d178e4981e2ca2340397504f2ba12332dde188941590ae8deb.yml
+openapi_spec_hash: 065b2fdaa81df7c959d417e6bdaf63b3
config_hash: 49f12dcc01ab5f70d3b39f508d96153b
From 43807702e18b8159fc041dd7e6e0c0e5d48fba9f Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 12 May 2026 23:18:09 +0000
Subject: [PATCH 06/15] feat(api): api update
---
.stats.yml | 4 +-
src/profound/types/prompt_answers_params.py | 4 ++
src/profound/types/prompt_answers_response.py | 37 ++++++++++++++++++-
tests/api_resources/test_prompts.py | 4 ++
4 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index a50ff94f..f459b54a 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 42
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-7608b1e2983e99d178e4981e2ca2340397504f2ba12332dde188941590ae8deb.yml
-openapi_spec_hash: 065b2fdaa81df7c959d417e6bdaf63b3
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-fa3dc429f3f7158906222d24a29c12788ef7c4104522830bb33056f22e7b360e.yml
+openapi_spec_hash: cde944522e91d60e77cf832cde66054c
config_hash: 49f12dcc01ab5f70d3b39f508d96153b
diff --git a/src/profound/types/prompt_answers_params.py b/src/profound/types/prompt_answers_params.py
index 819ff2f4..e9d03461 100644
--- a/src/profound/types/prompt_answers_params.py
+++ b/src/profound/types/prompt_answers_params.py
@@ -61,6 +61,8 @@ class Include(TypedDict, total=False):
asset_id: bool
+ citation_details: bool
+
citations: bool
created_at: bool
@@ -99,3 +101,5 @@ class Include(TypedDict, total=False):
topic: bool
topic_id: bool
+
+ web_search_results: bool
diff --git a/src/profound/types/prompt_answers_response.py b/src/profound/types/prompt_answers_response.py
index 4221f0c6..9016c864 100644
--- a/src/profound/types/prompt_answers_response.py
+++ b/src/profound/types/prompt_answers_response.py
@@ -8,7 +8,38 @@
from .._models import BaseModel
-__all__ = ["PromptAnswersResponse", "Data", "DataSentimentTheme", "Info"]
+__all__ = [
+ "PromptAnswersResponse",
+ "Data",
+ "DataCitationDetail",
+ "DataCitationDetailGroup",
+ "DataSentimentTheme",
+ "Info",
+]
+
+
+class DataCitationDetailGroup(BaseModel):
+ group_id: int
+
+ group_position: int
+
+
+class DataCitationDetail(BaseModel):
+ clean_url: str
+
+ hostname: str
+
+ path: str
+
+ title: str
+
+ url: str
+
+ groups: Optional[List[DataCitationDetailGroup]] = None
+
+ positions: Optional[List[int]] = None
+
+ text: Optional[str] = None
class DataSentimentTheme(BaseModel):
@@ -26,6 +57,8 @@ class Data(BaseModel):
asset_id: Optional[str] = None
+ citation_details: Optional[List[DataCitationDetail]] = None
+
citations: Optional[List[str]] = None
created_at: Optional[datetime] = None
@@ -64,6 +97,8 @@ class Data(BaseModel):
topic_id: Optional[str] = None
+ web_search_results: Optional[List[str]] = None
+
class Info(BaseModel):
total_rows: int
diff --git a/tests/api_resources/test_prompts.py b/tests/api_resources/test_prompts.py
index b1824697..c9c16aef 100644
--- a/tests/api_resources/test_prompts.py
+++ b/tests/api_resources/test_prompts.py
@@ -46,6 +46,7 @@ def test_method_answers_with_all_params(self, client: Profound) -> None:
"analysis_types": True,
"asset": True,
"asset_id": True,
+ "citation_details": True,
"citations": True,
"created_at": True,
"mentions": True,
@@ -65,6 +66,7 @@ def test_method_answers_with_all_params(self, client: Profound) -> None:
"themes": True,
"topic": True,
"topic_id": True,
+ "web_search_results": True,
},
pagination={
"limit": 1,
@@ -137,6 +139,7 @@ async def test_method_answers_with_all_params(self, async_client: AsyncProfound)
"analysis_types": True,
"asset": True,
"asset_id": True,
+ "citation_details": True,
"citations": True,
"created_at": True,
"mentions": True,
@@ -156,6 +159,7 @@ async def test_method_answers_with_all_params(self, async_client: AsyncProfound)
"themes": True,
"topic": True,
"topic_id": True,
+ "web_search_results": True,
},
pagination={
"limit": 1,
From a051830bf93f0e8602a2a88d9a963d6d177f3bd2 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 13 May 2026 14:52:15 +0000
Subject: [PATCH 07/15] feat(api): added filters and web search results
---
.stats.yml | 6 +-
api.md | 38 +-
src/profound/_client.py | 2 +-
src/profound/resources/reports/__init__.py | 33 ++
.../resources/{ => reports}/reports.py | 60 ++-
.../resources/reports/web_search_results.py | 510 ++++++++++++++++++
src/profound/types/__init__.py | 3 +
src/profound/types/hostname_filter_param.py | 32 ++
src/profound/types/report_citations_params.py | 84 +--
.../types/report_stream_citations_params.py | 84 +--
src/profound/types/reports/__init__.py | 8 +
.../reports/web_search_result_query_params.py | 120 +++++
.../web_search_result_query_response.py | 21 +
.../web_search_result_stream_params.py | 120 +++++
.../web_search_result_stream_response.py | 19 +
.../types/root_domain_filter_param.py | 32 ++
src/profound/types/url_filter_param.py | 32 ++
tests/api_resources/reports/__init__.py | 1 +
.../reports/test_web_search_results.py | 297 ++++++++++
19 files changed, 1319 insertions(+), 183 deletions(-)
create mode 100644 src/profound/resources/reports/__init__.py
rename src/profound/resources/{ => reports}/reports.py (97%)
create mode 100644 src/profound/resources/reports/web_search_results.py
create mode 100644 src/profound/types/hostname_filter_param.py
create mode 100644 src/profound/types/reports/__init__.py
create mode 100644 src/profound/types/reports/web_search_result_query_params.py
create mode 100644 src/profound/types/reports/web_search_result_query_response.py
create mode 100644 src/profound/types/reports/web_search_result_stream_params.py
create mode 100644 src/profound/types/reports/web_search_result_stream_response.py
create mode 100644 src/profound/types/root_domain_filter_param.py
create mode 100644 src/profound/types/url_filter_param.py
create mode 100644 tests/api_resources/reports/__init__.py
create mode 100644 tests/api_resources/reports/test_web_search_results.py
diff --git a/.stats.yml b/.stats.yml
index f459b54a..63c328a4 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 42
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-fa3dc429f3f7158906222d24a29c12788ef7c4104522830bb33056f22e7b360e.yml
+configured_endpoints: 44
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-7ba9ec7f1d2145725b39fc658bc32263a3bce786827a2c1471b90702d1e3085d.yml
openapi_spec_hash: cde944522e91d60e77cf832cde66054c
-config_hash: 49f12dcc01ab5f70d3b39f508d96153b
+config_hash: 7eef30f341128d7bf491d472a777e46c
diff --git a/api.md b/api.md
index 35cb10b8..70079f9a 100644
--- a/api.md
+++ b/api.md
@@ -103,12 +103,15 @@ Types:
```python
from profound.types import (
+ HostnameFilter,
PromptIDFilter,
ReportInfo,
ReportResponse,
ReportResult,
+ RootDomainFilter,
TagNameFilter,
TopicNameFilter,
+ URLFilter,
ReportCitationsResponse,
ReportStreamCitationsResponse,
ReportStreamSentimentResponse,
@@ -118,17 +121,30 @@ from profound.types import (
Methods:
-- client.reports.citations(\*\*params) -> ReportCitationsResponse
-- client.reports.get_bots_report(\*\*params) -> ReportResponse
-- client.reports.get_bots_report_v2(\*\*params) -> ReportResponse
-- client.reports.get_referrals_report(\*\*params) -> ReportResponse
-- client.reports.get_referrals_report_v2(\*\*params) -> ReportResponse
-- client.reports.query_fanouts(\*\*params) -> ReportResponse
-- client.reports.sentiment(\*\*params) -> ReportResponse
-- client.reports.stream_citations(\*\*params) -> ReportStreamCitationsResponse
-- client.reports.stream_sentiment(\*\*params) -> ReportStreamSentimentResponse
-- client.reports.stream_visibility(\*\*params) -> ReportStreamVisibilityResponse
-- client.reports.visibility(\*\*params) -> ReportResponse
+- client.reports.citations(\*\*params) -> ReportCitationsResponse
+- client.reports.get_bots_report(\*\*params) -> ReportResponse
+- client.reports.get_bots_report_v2(\*\*params) -> ReportResponse
+- client.reports.get_referrals_report(\*\*params) -> ReportResponse
+- client.reports.get_referrals_report_v2(\*\*params) -> ReportResponse
+- client.reports.query_fanouts(\*\*params) -> ReportResponse
+- client.reports.sentiment(\*\*params) -> ReportResponse
+- client.reports.stream_citations(\*\*params) -> ReportStreamCitationsResponse
+- client.reports.stream_sentiment(\*\*params) -> ReportStreamSentimentResponse
+- client.reports.stream_visibility(\*\*params) -> ReportStreamVisibilityResponse
+- client.reports.visibility(\*\*params) -> ReportResponse
+
+## WebSearchResults
+
+Types:
+
+```python
+from profound.types.reports import WebSearchResultQueryResponse, WebSearchResultStreamResponse
+```
+
+Methods:
+
+- client.reports.web_search_results.query(\*\*params) -> WebSearchResultQueryResponse
+- client.reports.web_search_results.stream(\*\*params) -> WebSearchResultStreamResponse
# Logs
diff --git a/src/profound/_client.py b/src/profound/_client.py
index 2969d281..d61264a0 100644
--- a/src/profound/_client.py
+++ b/src/profound/_client.py
@@ -38,10 +38,10 @@
if TYPE_CHECKING:
from .resources import logs, agents, content, prompts, reports, organizations, knowledge_bases
from .resources.prompts import PromptsResource, AsyncPromptsResource
- from .resources.reports import ReportsResource, AsyncReportsResource
from .resources.logs.logs import LogsResource, AsyncLogsResource
from .resources.agents.agents import AgentsResource, AsyncAgentsResource
from .resources.content.content import ContentResource, AsyncContentResource
+ from .resources.reports.reports import ReportsResource, AsyncReportsResource
from .resources.organizations.organizations import OrganizationsResource, AsyncOrganizationsResource
from .resources.knowledge_bases.knowledge_bases import KnowledgeBasesResource, AsyncKnowledgeBasesResource
diff --git a/src/profound/resources/reports/__init__.py b/src/profound/resources/reports/__init__.py
new file mode 100644
index 00000000..5110e8be
--- /dev/null
+++ b/src/profound/resources/reports/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .reports import (
+ ReportsResource,
+ AsyncReportsResource,
+ ReportsResourceWithRawResponse,
+ AsyncReportsResourceWithRawResponse,
+ ReportsResourceWithStreamingResponse,
+ AsyncReportsResourceWithStreamingResponse,
+)
+from .web_search_results import (
+ WebSearchResultsResource,
+ AsyncWebSearchResultsResource,
+ WebSearchResultsResourceWithRawResponse,
+ AsyncWebSearchResultsResourceWithRawResponse,
+ WebSearchResultsResourceWithStreamingResponse,
+ AsyncWebSearchResultsResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "WebSearchResultsResource",
+ "AsyncWebSearchResultsResource",
+ "WebSearchResultsResourceWithRawResponse",
+ "AsyncWebSearchResultsResourceWithRawResponse",
+ "WebSearchResultsResourceWithStreamingResponse",
+ "AsyncWebSearchResultsResourceWithStreamingResponse",
+ "ReportsResource",
+ "AsyncReportsResource",
+ "ReportsResourceWithRawResponse",
+ "AsyncReportsResourceWithRawResponse",
+ "ReportsResourceWithStreamingResponse",
+ "AsyncReportsResourceWithStreamingResponse",
+]
diff --git a/src/profound/resources/reports.py b/src/profound/resources/reports/reports.py
similarity index 97%
rename from src/profound/resources/reports.py
rename to src/profound/resources/reports/reports.py
index 2a2452fa..c4a35312 100644
--- a/src/profound/resources/reports.py
+++ b/src/profound/resources/reports/reports.py
@@ -8,7 +8,7 @@
import httpx
-from ..types import (
+from ...types import (
report_citations_params,
report_sentiment_params,
report_visibility_params,
@@ -21,29 +21,41 @@
report_get_referrals_report_params,
report_get_referrals_report_v2_params,
)
-from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from .._utils import maybe_transform, async_maybe_transform
-from .._compat import cached_property
-from .._resource import SyncAPIResource, AsyncAPIResource
-from .._response import (
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._utils import maybe_transform, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from .._streaming import Stream, AsyncStream
-from .._base_client import make_request_options
-from ..types.report_response import ReportResponse
-from ..types.shared_params.pagination import Pagination
-from ..types.report_citations_response import ReportCitationsResponse
-from ..types.report_stream_citations_response import ReportStreamCitationsResponse
-from ..types.report_stream_sentiment_response import ReportStreamSentimentResponse
-from ..types.report_stream_visibility_response import ReportStreamVisibilityResponse
+from ..._streaming import Stream, AsyncStream
+from ..._base_client import make_request_options
+from .web_search_results import (
+ WebSearchResultsResource,
+ AsyncWebSearchResultsResource,
+ WebSearchResultsResourceWithRawResponse,
+ AsyncWebSearchResultsResourceWithRawResponse,
+ WebSearchResultsResourceWithStreamingResponse,
+ AsyncWebSearchResultsResourceWithStreamingResponse,
+)
+from ...types.report_response import ReportResponse
+from ...types.shared_params.pagination import Pagination
+from ...types.report_citations_response import ReportCitationsResponse
+from ...types.report_stream_citations_response import ReportStreamCitationsResponse
+from ...types.report_stream_sentiment_response import ReportStreamSentimentResponse
+from ...types.report_stream_visibility_response import ReportStreamVisibilityResponse
__all__ = ["ReportsResource", "AsyncReportsResource"]
class ReportsResource(SyncAPIResource):
+ @cached_property
+ def web_search_results(self) -> WebSearchResultsResource:
+ return WebSearchResultsResource(self._client)
+
@cached_property
def with_raw_response(self) -> ReportsResourceWithRawResponse:
"""
@@ -1088,6 +1100,10 @@ def visibility(
class AsyncReportsResource(AsyncAPIResource):
+ @cached_property
+ def web_search_results(self) -> AsyncWebSearchResultsResource:
+ return AsyncWebSearchResultsResource(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncReportsResourceWithRawResponse:
"""
@@ -2169,6 +2185,10 @@ def __init__(self, reports: ReportsResource) -> None:
reports.visibility,
)
+ @cached_property
+ def web_search_results(self) -> WebSearchResultsResourceWithRawResponse:
+ return WebSearchResultsResourceWithRawResponse(self._reports.web_search_results)
+
class AsyncReportsResourceWithRawResponse:
def __init__(self, reports: AsyncReportsResource) -> None:
@@ -2208,6 +2228,10 @@ def __init__(self, reports: AsyncReportsResource) -> None:
reports.visibility,
)
+ @cached_property
+ def web_search_results(self) -> AsyncWebSearchResultsResourceWithRawResponse:
+ return AsyncWebSearchResultsResourceWithRawResponse(self._reports.web_search_results)
+
class ReportsResourceWithStreamingResponse:
def __init__(self, reports: ReportsResource) -> None:
@@ -2247,6 +2271,10 @@ def __init__(self, reports: ReportsResource) -> None:
reports.visibility,
)
+ @cached_property
+ def web_search_results(self) -> WebSearchResultsResourceWithStreamingResponse:
+ return WebSearchResultsResourceWithStreamingResponse(self._reports.web_search_results)
+
class AsyncReportsResourceWithStreamingResponse:
def __init__(self, reports: AsyncReportsResource) -> None:
@@ -2285,3 +2313,7 @@ def __init__(self, reports: AsyncReportsResource) -> None:
self.visibility = async_to_streamed_response_wrapper(
reports.visibility,
)
+
+ @cached_property
+ def web_search_results(self) -> AsyncWebSearchResultsResourceWithStreamingResponse:
+ return AsyncWebSearchResultsResourceWithStreamingResponse(self._reports.web_search_results)
diff --git a/src/profound/resources/reports/web_search_results.py b/src/profound/resources/reports/web_search_results.py
new file mode 100644
index 00000000..3f36de7a
--- /dev/null
+++ b/src/profound/resources/reports/web_search_results.py
@@ -0,0 +1,510 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Any, Dict, List, Union, Iterable, Optional, cast
+from datetime import datetime
+from typing_extensions import Literal
+
+import httpx
+
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._utils import maybe_transform, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._streaming import Stream, AsyncStream
+from ..._base_client import make_request_options
+from ...types.reports import web_search_result_query_params, web_search_result_stream_params
+from ...types.shared_params.pagination import Pagination
+from ...types.reports.web_search_result_query_response import WebSearchResultQueryResponse
+from ...types.reports.web_search_result_stream_response import WebSearchResultStreamResponse
+
+__all__ = ["WebSearchResultsResource", "AsyncWebSearchResultsResource"]
+
+
+class WebSearchResultsResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> WebSearchResultsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
+ """
+ return WebSearchResultsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> WebSearchResultsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
+ """
+ return WebSearchResultsResourceWithStreamingResponse(self)
+
+ def query(
+ self,
+ *,
+ category_id: str,
+ end_date: Union[str, datetime],
+ metrics: List[Literal["count", "search_share"]],
+ start_date: Union[str, datetime],
+ date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"] | Omit = omit,
+ dimensions: List[
+ Literal[
+ "hostname",
+ "path",
+ "url",
+ "root_domain",
+ "date",
+ "region",
+ "topic",
+ "topic_id",
+ "model",
+ "tag",
+ "prompt",
+ "prompt_id",
+ "persona",
+ "search_query",
+ ]
+ ]
+ | Omit = omit,
+ filters: Iterable[web_search_result_query_params.Filter] | Omit = omit,
+ order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
+ pagination: Pagination | 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,
+ ) -> WebSearchResultQueryResponse:
+ """
+ Get web search results for a given category.
+
+ Args:
+ end_date: End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
+ ISO timestamp.
+
+ metrics: Metrics to include. `search_share` is the per-prompt occurrence rate.
+
+ start_date: Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
+ full ISO timestamp.
+
+ date_interval: Date interval for the report. (only used with date dimension)
+
+ dimensions: Dimensions to group the report by.
+
+ filters: List of filters to apply to the web search results report.
+
+ order_by: Custom ordering of the report results.
+
+ The order is a record of key-value pairs where:
+ - `key` is the field to order by, which can be a metric or dimension
+ - `value` is the direction of the order, either `asc` for ascending or `desc` for descending.
+
+ When not specified, the default order is the first metric in the query descending.
+
+ pagination: Pagination settings for the report results.
+
+ 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(
+ "/v1/reports/web-search-results",
+ body=maybe_transform(
+ {
+ "category_id": category_id,
+ "end_date": end_date,
+ "metrics": metrics,
+ "start_date": start_date,
+ "date_interval": date_interval,
+ "dimensions": dimensions,
+ "filters": filters,
+ "order_by": order_by,
+ "pagination": pagination,
+ },
+ web_search_result_query_params.WebSearchResultQueryParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=WebSearchResultQueryResponse,
+ )
+
+ def stream(
+ self,
+ *,
+ category_id: str,
+ end_date: Union[str, datetime],
+ metrics: List[Literal["count", "search_share"]],
+ start_date: Union[str, datetime],
+ date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"] | Omit = omit,
+ dimensions: List[
+ Literal[
+ "hostname",
+ "path",
+ "url",
+ "root_domain",
+ "date",
+ "region",
+ "topic",
+ "topic_id",
+ "model",
+ "tag",
+ "prompt",
+ "prompt_id",
+ "persona",
+ "search_query",
+ ]
+ ]
+ | Omit = omit,
+ filters: Iterable[web_search_result_stream_params.Filter] | Omit = omit,
+ order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
+ pagination: Optional[Pagination] | 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,
+ ) -> Stream[WebSearchResultStreamResponse]:
+ """Stream Web Search Results
+
+ Args:
+ end_date: End date for the report.
+
+ Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
+ ISO timestamp.
+
+ metrics: Metrics to include. `search_share` is the per-prompt occurrence rate.
+
+ start_date: Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
+ full ISO timestamp.
+
+ date_interval: Date interval for the report. (only used with date dimension)
+
+ dimensions: Dimensions to group the report by.
+
+ filters: List of filters to apply to the web search results report.
+
+ order_by: Custom ordering of the report results.
+
+ The order is a record of key-value pairs where:
+ - `key` is the field to order by, which can be a metric or dimension
+ - `value` is the direction of the order, either `asc` for ascending or `desc` for descending.
+
+ When not specified, the default order is the first metric in the query descending.
+
+ pagination: Offset-based pagination parameters.
+
+ 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
+ """
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
+ return self._post(
+ "/v1/reports/web-search-results/stream",
+ body=maybe_transform(
+ {
+ "category_id": category_id,
+ "end_date": end_date,
+ "metrics": metrics,
+ "start_date": start_date,
+ "date_interval": date_interval,
+ "dimensions": dimensions,
+ "filters": filters,
+ "order_by": order_by,
+ "pagination": pagination,
+ },
+ web_search_result_stream_params.WebSearchResultStreamParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=cast(
+ Any, WebSearchResultStreamResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[WebSearchResultStreamResponse],
+ )
+
+
+class AsyncWebSearchResultsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncWebSearchResultsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#accessing-raw-response-data-eg-headers
+ """
+ return AsyncWebSearchResultsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncWebSearchResultsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/cooper-square-technologies/profound-python-sdk#with_streaming_response
+ """
+ return AsyncWebSearchResultsResourceWithStreamingResponse(self)
+
+ async def query(
+ self,
+ *,
+ category_id: str,
+ end_date: Union[str, datetime],
+ metrics: List[Literal["count", "search_share"]],
+ start_date: Union[str, datetime],
+ date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"] | Omit = omit,
+ dimensions: List[
+ Literal[
+ "hostname",
+ "path",
+ "url",
+ "root_domain",
+ "date",
+ "region",
+ "topic",
+ "topic_id",
+ "model",
+ "tag",
+ "prompt",
+ "prompt_id",
+ "persona",
+ "search_query",
+ ]
+ ]
+ | Omit = omit,
+ filters: Iterable[web_search_result_query_params.Filter] | Omit = omit,
+ order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
+ pagination: Pagination | 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,
+ ) -> WebSearchResultQueryResponse:
+ """
+ Get web search results for a given category.
+
+ Args:
+ end_date: End date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
+ ISO timestamp.
+
+ metrics: Metrics to include. `search_share` is the per-prompt occurrence rate.
+
+ start_date: Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
+ full ISO timestamp.
+
+ date_interval: Date interval for the report. (only used with date dimension)
+
+ dimensions: Dimensions to group the report by.
+
+ filters: List of filters to apply to the web search results report.
+
+ order_by: Custom ordering of the report results.
+
+ The order is a record of key-value pairs where:
+ - `key` is the field to order by, which can be a metric or dimension
+ - `value` is the direction of the order, either `asc` for ascending or `desc` for descending.
+
+ When not specified, the default order is the first metric in the query descending.
+
+ pagination: Pagination settings for the report results.
+
+ 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(
+ "/v1/reports/web-search-results",
+ body=await async_maybe_transform(
+ {
+ "category_id": category_id,
+ "end_date": end_date,
+ "metrics": metrics,
+ "start_date": start_date,
+ "date_interval": date_interval,
+ "dimensions": dimensions,
+ "filters": filters,
+ "order_by": order_by,
+ "pagination": pagination,
+ },
+ web_search_result_query_params.WebSearchResultQueryParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=WebSearchResultQueryResponse,
+ )
+
+ async def stream(
+ self,
+ *,
+ category_id: str,
+ end_date: Union[str, datetime],
+ metrics: List[Literal["count", "search_share"]],
+ start_date: Union[str, datetime],
+ date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"] | Omit = omit,
+ dimensions: List[
+ Literal[
+ "hostname",
+ "path",
+ "url",
+ "root_domain",
+ "date",
+ "region",
+ "topic",
+ "topic_id",
+ "model",
+ "tag",
+ "prompt",
+ "prompt_id",
+ "persona",
+ "search_query",
+ ]
+ ]
+ | Omit = omit,
+ filters: Iterable[web_search_result_stream_params.Filter] | Omit = omit,
+ order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
+ pagination: Optional[Pagination] | 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,
+ ) -> AsyncStream[WebSearchResultStreamResponse]:
+ """Stream Web Search Results
+
+ Args:
+ end_date: End date for the report.
+
+ Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full
+ ISO timestamp.
+
+ metrics: Metrics to include. `search_share` is the per-prompt occurrence rate.
+
+ start_date: Start date for the report. Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or
+ full ISO timestamp.
+
+ date_interval: Date interval for the report. (only used with date dimension)
+
+ dimensions: Dimensions to group the report by.
+
+ filters: List of filters to apply to the web search results report.
+
+ order_by: Custom ordering of the report results.
+
+ The order is a record of key-value pairs where:
+ - `key` is the field to order by, which can be a metric or dimension
+ - `value` is the direction of the order, either `asc` for ascending or `desc` for descending.
+
+ When not specified, the default order is the first metric in the query descending.
+
+ pagination: Offset-based pagination parameters.
+
+ 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
+ """
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
+ return await self._post(
+ "/v1/reports/web-search-results/stream",
+ body=await async_maybe_transform(
+ {
+ "category_id": category_id,
+ "end_date": end_date,
+ "metrics": metrics,
+ "start_date": start_date,
+ "date_interval": date_interval,
+ "dimensions": dimensions,
+ "filters": filters,
+ "order_by": order_by,
+ "pagination": pagination,
+ },
+ web_search_result_stream_params.WebSearchResultStreamParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=cast(
+ Any, WebSearchResultStreamResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[WebSearchResultStreamResponse],
+ )
+
+
+class WebSearchResultsResourceWithRawResponse:
+ def __init__(self, web_search_results: WebSearchResultsResource) -> None:
+ self._web_search_results = web_search_results
+
+ self.query = to_raw_response_wrapper(
+ web_search_results.query,
+ )
+ self.stream = to_raw_response_wrapper(
+ web_search_results.stream,
+ )
+
+
+class AsyncWebSearchResultsResourceWithRawResponse:
+ def __init__(self, web_search_results: AsyncWebSearchResultsResource) -> None:
+ self._web_search_results = web_search_results
+
+ self.query = async_to_raw_response_wrapper(
+ web_search_results.query,
+ )
+ self.stream = async_to_raw_response_wrapper(
+ web_search_results.stream,
+ )
+
+
+class WebSearchResultsResourceWithStreamingResponse:
+ def __init__(self, web_search_results: WebSearchResultsResource) -> None:
+ self._web_search_results = web_search_results
+
+ self.query = to_streamed_response_wrapper(
+ web_search_results.query,
+ )
+ self.stream = to_streamed_response_wrapper(
+ web_search_results.stream,
+ )
+
+
+class AsyncWebSearchResultsResourceWithStreamingResponse:
+ def __init__(self, web_search_results: AsyncWebSearchResultsResource) -> None:
+ self._web_search_results = web_search_results
+
+ self.query = async_to_streamed_response_wrapper(
+ web_search_results.query,
+ )
+ self.stream = async_to_streamed_response_wrapper(
+ web_search_results.stream,
+ )
diff --git a/src/profound/types/__init__.py b/src/profound/types/__init__.py
index a085565a..1ee4404b 100644
--- a/src/profound/types/__init__.py
+++ b/src/profound/types/__init__.py
@@ -27,9 +27,11 @@
from .named_resource import NamedResource as NamedResource
from .persona_profile import PersonaProfile as PersonaProfile
from .report_response import ReportResponse as ReportResponse
+from .url_filter_param import URLFilterParam as URLFilterParam
from .agent_list_params import AgentListParams as AgentListParams
from .agent_list_response import AgentListResponse as AgentListResponse
from .agent_retrieve_params import AgentRetrieveParams as AgentRetrieveParams
+from .hostname_filter_param import HostnameFilterParam as HostnameFilterParam
from .prompt_answers_params import PromptAnswersParams as PromptAnswersParams
from .tag_name_filter_param import TagNameFilterParam as TagNameFilterParam
from .prompt_id_filter_param import PromptIDFilterParam as PromptIDFilterParam
@@ -40,6 +42,7 @@
from .topic_name_filter_param import TopicNameFilterParam as TopicNameFilterParam
from .persona_profile_behavior import PersonaProfileBehavior as PersonaProfileBehavior
from .report_visibility_params import ReportVisibilityParams as ReportVisibilityParams
+from .root_domain_filter_param import RootDomainFilterParam as RootDomainFilterParam
from .report_citations_response import ReportCitationsResponse as ReportCitationsResponse
from .knowledge_base_list_params import KnowledgeBaseListParams as KnowledgeBaseListParams
from .organization_list_response import OrganizationListResponse as OrganizationListResponse
diff --git a/src/profound/types/hostname_filter_param.py b/src/profound/types/hostname_filter_param.py
new file mode 100644
index 00000000..ada06a14
--- /dev/null
+++ b/src/profound/types/hostname_filter_param.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from typing_extensions import Literal, Required, TypedDict
+
+from .._types import SequenceNotStr
+
+__all__ = ["HostnameFilterParam"]
+
+
+class HostnameFilterParam(TypedDict, total=False):
+ """Filter by hostname"""
+
+ field: Required[Literal["hostname"]]
+
+ operator: Required[
+ Literal[
+ "is",
+ "not_is",
+ "in",
+ "not_in",
+ "contains",
+ "not_contains",
+ "matches",
+ "contains_case_insensitive",
+ "not_contains_case_insensitive",
+ ]
+ ]
+
+ value: Required[Union[str, SequenceNotStr[str]]]
diff --git a/src/profound/types/report_citations_params.py b/src/profound/types/report_citations_params.py
index def638ed..e1caca1f 100644
--- a/src/profound/types/report_citations_params.py
+++ b/src/profound/types/report_citations_params.py
@@ -8,9 +8,12 @@
from .._types import SequenceNotStr
from .._utils import PropertyInfo
+from .url_filter_param import URLFilterParam
+from .hostname_filter_param import HostnameFilterParam
from .tag_name_filter_param import TagNameFilterParam
from .prompt_id_filter_param import PromptIDFilterParam
from .topic_name_filter_param import TopicNameFilterParam
+from .root_domain_filter_param import RootDomainFilterParam
from .shared_params.pagination import Pagination
from .shared_params.path_filter import PathFilter
from .shared_params.prompt_filter import PromptFilter
@@ -23,14 +26,7 @@
from .shared_params.region_name_filter import RegionNameFilter
from .shared_params.analysis_type_filter import AnalysisTypeFilter
-__all__ = [
- "ReportCitationsParams",
- "Filter",
- "FilterHostnameFilter",
- "FilterURLFilter",
- "FilterRootDomainFilter",
- "FilterCitationCategoryFilter",
-]
+__all__ = ["ReportCitationsParams", "Filter", "FilterCitationCategoryFilter"]
class ReportCitationsParams(TypedDict, total=False):
@@ -94,72 +90,6 @@ class ReportCitationsParams(TypedDict, total=False):
"""Pagination settings for the report results."""
-class FilterHostnameFilter(TypedDict, total=False):
- """Filter by hostname"""
-
- field: Required[Literal["hostname"]]
-
- operator: Required[
- Literal[
- "is",
- "not_is",
- "in",
- "not_in",
- "contains",
- "not_contains",
- "matches",
- "contains_case_insensitive",
- "not_contains_case_insensitive",
- ]
- ]
-
- value: Required[Union[str, SequenceNotStr[str]]]
-
-
-class FilterURLFilter(TypedDict, total=False):
- """Filter by URL"""
-
- field: Required[Literal["url"]]
-
- operator: Required[
- Literal[
- "is",
- "not_is",
- "in",
- "not_in",
- "contains",
- "not_contains",
- "matches",
- "contains_case_insensitive",
- "not_contains_case_insensitive",
- ]
- ]
-
- value: Required[Union[str, SequenceNotStr[str]]]
-
-
-class FilterRootDomainFilter(TypedDict, total=False):
- """Filter by root domain"""
-
- field: Required[Literal["root_domain"]]
-
- operator: Required[
- Literal[
- "is",
- "not_is",
- "in",
- "not_in",
- "contains",
- "not_contains",
- "matches",
- "contains_case_insensitive",
- "not_contains_case_insensitive",
- ]
- ]
-
- value: Required[Union[str, SequenceNotStr[str]]]
-
-
class FilterCitationCategoryFilter(TypedDict, total=False):
"""Filter by citation category"""
@@ -183,7 +113,7 @@ class FilterCitationCategoryFilter(TypedDict, total=False):
Filter: TypeAlias = Union[
- FilterHostnameFilter,
+ HostnameFilterParam,
PathFilter,
RegionIDFilter,
RegionNameFilter,
@@ -192,8 +122,8 @@ class FilterCitationCategoryFilter(TypedDict, total=False):
ModelIDFilter,
TagIDFilter,
TagNameFilterParam,
- FilterURLFilter,
- FilterRootDomainFilter,
+ URLFilterParam,
+ RootDomainFilterParam,
AnalysisTypeFilter,
PromptTypeFilter,
PersonaIDFilter,
diff --git a/src/profound/types/report_stream_citations_params.py b/src/profound/types/report_stream_citations_params.py
index 2f980d8b..fe9f022c 100644
--- a/src/profound/types/report_stream_citations_params.py
+++ b/src/profound/types/report_stream_citations_params.py
@@ -8,9 +8,12 @@
from .._types import SequenceNotStr
from .._utils import PropertyInfo
+from .url_filter_param import URLFilterParam
+from .hostname_filter_param import HostnameFilterParam
from .tag_name_filter_param import TagNameFilterParam
from .prompt_id_filter_param import PromptIDFilterParam
from .topic_name_filter_param import TopicNameFilterParam
+from .root_domain_filter_param import RootDomainFilterParam
from .shared_params.pagination import Pagination
from .shared_params.path_filter import PathFilter
from .shared_params.prompt_filter import PromptFilter
@@ -23,14 +26,7 @@
from .shared_params.region_name_filter import RegionNameFilter
from .shared_params.analysis_type_filter import AnalysisTypeFilter
-__all__ = [
- "ReportStreamCitationsParams",
- "Filter",
- "FilterHostnameFilter",
- "FilterURLFilter",
- "FilterRootDomainFilter",
- "FilterCitationCategoryFilter",
-]
+__all__ = ["ReportStreamCitationsParams", "Filter", "FilterCitationCategoryFilter"]
class ReportStreamCitationsParams(TypedDict, total=False):
@@ -94,72 +90,6 @@ class ReportStreamCitationsParams(TypedDict, total=False):
"""Offset-based pagination parameters."""
-class FilterHostnameFilter(TypedDict, total=False):
- """Filter by hostname"""
-
- field: Required[Literal["hostname"]]
-
- operator: Required[
- Literal[
- "is",
- "not_is",
- "in",
- "not_in",
- "contains",
- "not_contains",
- "matches",
- "contains_case_insensitive",
- "not_contains_case_insensitive",
- ]
- ]
-
- value: Required[Union[str, SequenceNotStr[str]]]
-
-
-class FilterURLFilter(TypedDict, total=False):
- """Filter by URL"""
-
- field: Required[Literal["url"]]
-
- operator: Required[
- Literal[
- "is",
- "not_is",
- "in",
- "not_in",
- "contains",
- "not_contains",
- "matches",
- "contains_case_insensitive",
- "not_contains_case_insensitive",
- ]
- ]
-
- value: Required[Union[str, SequenceNotStr[str]]]
-
-
-class FilterRootDomainFilter(TypedDict, total=False):
- """Filter by root domain"""
-
- field: Required[Literal["root_domain"]]
-
- operator: Required[
- Literal[
- "is",
- "not_is",
- "in",
- "not_in",
- "contains",
- "not_contains",
- "matches",
- "contains_case_insensitive",
- "not_contains_case_insensitive",
- ]
- ]
-
- value: Required[Union[str, SequenceNotStr[str]]]
-
-
class FilterCitationCategoryFilter(TypedDict, total=False):
"""Filter by citation category"""
@@ -183,7 +113,7 @@ class FilterCitationCategoryFilter(TypedDict, total=False):
Filter: TypeAlias = Union[
- FilterHostnameFilter,
+ HostnameFilterParam,
PathFilter,
RegionIDFilter,
RegionNameFilter,
@@ -192,8 +122,8 @@ class FilterCitationCategoryFilter(TypedDict, total=False):
ModelIDFilter,
TagIDFilter,
TagNameFilterParam,
- FilterURLFilter,
- FilterRootDomainFilter,
+ URLFilterParam,
+ RootDomainFilterParam,
AnalysisTypeFilter,
PromptTypeFilter,
PersonaIDFilter,
diff --git a/src/profound/types/reports/__init__.py b/src/profound/types/reports/__init__.py
new file mode 100644
index 00000000..65fa696a
--- /dev/null
+++ b/src/profound/types/reports/__init__.py
@@ -0,0 +1,8 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .web_search_result_query_params import WebSearchResultQueryParams as WebSearchResultQueryParams
+from .web_search_result_stream_params import WebSearchResultStreamParams as WebSearchResultStreamParams
+from .web_search_result_query_response import WebSearchResultQueryResponse as WebSearchResultQueryResponse
+from .web_search_result_stream_response import WebSearchResultStreamResponse as WebSearchResultStreamResponse
diff --git a/src/profound/types/reports/web_search_result_query_params.py b/src/profound/types/reports/web_search_result_query_params.py
new file mode 100644
index 00000000..d727fc53
--- /dev/null
+++ b/src/profound/types/reports/web_search_result_query_params.py
@@ -0,0 +1,120 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, List, Union, Iterable
+from datetime import datetime
+from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
+from ..url_filter_param import URLFilterParam
+from ..hostname_filter_param import HostnameFilterParam
+from ..prompt_id_filter_param import PromptIDFilterParam
+from ..root_domain_filter_param import RootDomainFilterParam
+from ..shared_params.pagination import Pagination
+from ..shared_params.path_filter import PathFilter
+from ..shared_params.prompt_filter import PromptFilter
+from ..shared_params.tag_id_filter import TagIDFilter
+from ..shared_params.model_id_filter import ModelIDFilter
+from ..shared_params.topic_id_filter import TopicIDFilter
+from ..shared_params.region_id_filter import RegionIDFilter
+from ..shared_params.persona_id_filter import PersonaIDFilter
+
+__all__ = ["WebSearchResultQueryParams", "Filter", "FilterSearchQueryFilter"]
+
+
+class WebSearchResultQueryParams(TypedDict, total=False):
+ category_id: Required[str]
+
+ end_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """End date for the report.
+
+ Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
+ """
+
+ metrics: Required[List[Literal["count", "search_share"]]]
+ """Metrics to include. `search_share` is the per-prompt occurrence rate."""
+
+ start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Start date for the report.
+
+ Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
+ """
+
+ date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"]
+ """Date interval for the report. (only used with date dimension)"""
+
+ dimensions: List[
+ Literal[
+ "hostname",
+ "path",
+ "url",
+ "root_domain",
+ "date",
+ "region",
+ "topic",
+ "topic_id",
+ "model",
+ "tag",
+ "prompt",
+ "prompt_id",
+ "persona",
+ "search_query",
+ ]
+ ]
+ """Dimensions to group the report by."""
+
+ filters: Iterable[Filter]
+ """List of filters to apply to the web search results report."""
+
+ order_by: Dict[str, Literal["asc", "desc"]]
+ """Custom ordering of the report results.
+
+ The order is a record of key-value pairs where:
+ - `key` is the field to order by, which can be a metric or dimension
+ - `value` is the direction of the order, either `asc` for ascending or `desc` for descending.
+
+ When not specified, the default order is the first metric in the query descending.
+ """
+
+ pagination: Pagination
+ """Pagination settings for the report results."""
+
+
+class FilterSearchQueryFilter(TypedDict, total=False):
+ """Filter by web-search query string."""
+
+ field: Required[Literal["search_query"]]
+
+ operator: Required[
+ Literal[
+ "is",
+ "not_is",
+ "in",
+ "not_in",
+ "contains",
+ "not_contains",
+ "matches",
+ "contains_case_insensitive",
+ "not_contains_case_insensitive",
+ ]
+ ]
+
+ value: Required[Union[str, SequenceNotStr[str]]]
+
+
+Filter: TypeAlias = Union[
+ HostnameFilterParam,
+ PathFilter,
+ RegionIDFilter,
+ TopicIDFilter,
+ ModelIDFilter,
+ TagIDFilter,
+ URLFilterParam,
+ RootDomainFilterParam,
+ PersonaIDFilter,
+ PromptFilter,
+ PromptIDFilterParam,
+ FilterSearchQueryFilter,
+]
diff --git a/src/profound/types/reports/web_search_result_query_response.py b/src/profound/types/reports/web_search_result_query_response.py
new file mode 100644
index 00000000..8de7e0fe
--- /dev/null
+++ b/src/profound/types/reports/web_search_result_query_response.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+
+from ..._models import BaseModel
+from ..report_info import ReportInfo
+
+__all__ = ["WebSearchResultQueryResponse", "Data"]
+
+
+class Data(BaseModel):
+ dimensions: List[Optional[str]]
+
+ metrics: List[float]
+
+
+class WebSearchResultQueryResponse(BaseModel):
+ data: List[Data]
+
+ info: ReportInfo
+ """Base model for report information."""
diff --git a/src/profound/types/reports/web_search_result_stream_params.py b/src/profound/types/reports/web_search_result_stream_params.py
new file mode 100644
index 00000000..4999d9d9
--- /dev/null
+++ b/src/profound/types/reports/web_search_result_stream_params.py
@@ -0,0 +1,120 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, List, Union, Iterable, Optional
+from datetime import datetime
+from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
+from ..url_filter_param import URLFilterParam
+from ..hostname_filter_param import HostnameFilterParam
+from ..prompt_id_filter_param import PromptIDFilterParam
+from ..root_domain_filter_param import RootDomainFilterParam
+from ..shared_params.pagination import Pagination
+from ..shared_params.path_filter import PathFilter
+from ..shared_params.prompt_filter import PromptFilter
+from ..shared_params.tag_id_filter import TagIDFilter
+from ..shared_params.model_id_filter import ModelIDFilter
+from ..shared_params.topic_id_filter import TopicIDFilter
+from ..shared_params.region_id_filter import RegionIDFilter
+from ..shared_params.persona_id_filter import PersonaIDFilter
+
+__all__ = ["WebSearchResultStreamParams", "Filter", "FilterSearchQueryFilter"]
+
+
+class WebSearchResultStreamParams(TypedDict, total=False):
+ category_id: Required[str]
+
+ end_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """End date for the report.
+
+ Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
+ """
+
+ metrics: Required[List[Literal["count", "search_share"]]]
+ """Metrics to include. `search_share` is the per-prompt occurrence rate."""
+
+ start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """Start date for the report.
+
+ Accepts formats: YYYY-MM-DD, YYYY-MM-DD HH:MM, or full ISO timestamp.
+ """
+
+ date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"]
+ """Date interval for the report. (only used with date dimension)"""
+
+ dimensions: List[
+ Literal[
+ "hostname",
+ "path",
+ "url",
+ "root_domain",
+ "date",
+ "region",
+ "topic",
+ "topic_id",
+ "model",
+ "tag",
+ "prompt",
+ "prompt_id",
+ "persona",
+ "search_query",
+ ]
+ ]
+ """Dimensions to group the report by."""
+
+ filters: Iterable[Filter]
+ """List of filters to apply to the web search results report."""
+
+ order_by: Dict[str, Literal["asc", "desc"]]
+ """Custom ordering of the report results.
+
+ The order is a record of key-value pairs where:
+ - `key` is the field to order by, which can be a metric or dimension
+ - `value` is the direction of the order, either `asc` for ascending or `desc` for descending.
+
+ When not specified, the default order is the first metric in the query descending.
+ """
+
+ pagination: Optional[Pagination]
+ """Offset-based pagination parameters."""
+
+
+class FilterSearchQueryFilter(TypedDict, total=False):
+ """Filter by web-search query string."""
+
+ field: Required[Literal["search_query"]]
+
+ operator: Required[
+ Literal[
+ "is",
+ "not_is",
+ "in",
+ "not_in",
+ "contains",
+ "not_contains",
+ "matches",
+ "contains_case_insensitive",
+ "not_contains_case_insensitive",
+ ]
+ ]
+
+ value: Required[Union[str, SequenceNotStr[str]]]
+
+
+Filter: TypeAlias = Union[
+ HostnameFilterParam,
+ PathFilter,
+ RegionIDFilter,
+ TopicIDFilter,
+ ModelIDFilter,
+ TagIDFilter,
+ URLFilterParam,
+ RootDomainFilterParam,
+ PersonaIDFilter,
+ PromptFilter,
+ PromptIDFilterParam,
+ FilterSearchQueryFilter,
+]
diff --git a/src/profound/types/reports/web_search_result_stream_response.py b/src/profound/types/reports/web_search_result_stream_response.py
new file mode 100644
index 00000000..39af580a
--- /dev/null
+++ b/src/profound/types/reports/web_search_result_stream_response.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Union
+from typing_extensions import TypeAlias
+
+from ..._models import BaseModel
+
+__all__ = ["WebSearchResultStreamResponse", "SseSummaryEventData"]
+
+
+class SseSummaryEventData(BaseModel):
+ query: Dict[str, object]
+ """The normalized query used to build the stream."""
+
+ total_rows: int
+ """Total number of rows available before pagination is applied."""
+
+
+WebSearchResultStreamResponse: TypeAlias = Union[SseSummaryEventData, Dict[str, object]]
diff --git a/src/profound/types/root_domain_filter_param.py b/src/profound/types/root_domain_filter_param.py
new file mode 100644
index 00000000..18a5d5ab
--- /dev/null
+++ b/src/profound/types/root_domain_filter_param.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from typing_extensions import Literal, Required, TypedDict
+
+from .._types import SequenceNotStr
+
+__all__ = ["RootDomainFilterParam"]
+
+
+class RootDomainFilterParam(TypedDict, total=False):
+ """Filter by root domain"""
+
+ field: Required[Literal["root_domain"]]
+
+ operator: Required[
+ Literal[
+ "is",
+ "not_is",
+ "in",
+ "not_in",
+ "contains",
+ "not_contains",
+ "matches",
+ "contains_case_insensitive",
+ "not_contains_case_insensitive",
+ ]
+ ]
+
+ value: Required[Union[str, SequenceNotStr[str]]]
diff --git a/src/profound/types/url_filter_param.py b/src/profound/types/url_filter_param.py
new file mode 100644
index 00000000..9fefb857
--- /dev/null
+++ b/src/profound/types/url_filter_param.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from typing_extensions import Literal, Required, TypedDict
+
+from .._types import SequenceNotStr
+
+__all__ = ["URLFilterParam"]
+
+
+class URLFilterParam(TypedDict, total=False):
+ """Filter by URL"""
+
+ field: Required[Literal["url"]]
+
+ operator: Required[
+ Literal[
+ "is",
+ "not_is",
+ "in",
+ "not_in",
+ "contains",
+ "not_contains",
+ "matches",
+ "contains_case_insensitive",
+ "not_contains_case_insensitive",
+ ]
+ ]
+
+ value: Required[Union[str, SequenceNotStr[str]]]
diff --git a/tests/api_resources/reports/__init__.py b/tests/api_resources/reports/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/reports/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/reports/test_web_search_results.py b/tests/api_resources/reports/test_web_search_results.py
new file mode 100644
index 00000000..4b99ee2c
--- /dev/null
+++ b/tests/api_resources/reports/test_web_search_results.py
@@ -0,0 +1,297 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from profound import Profound, AsyncProfound
+from tests.utils import assert_matches_type
+from profound._utils import parse_datetime
+from profound.types.reports import (
+ WebSearchResultQueryResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestWebSearchResults:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_query(self, client: Profound) -> None:
+ web_search_result = client.reports.web_search_results.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_query_with_all_params(self, client: Profound) -> None:
+ web_search_result = client.reports.web_search_results.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ date_interval="hour",
+ dimensions=["hostname"],
+ filters=[
+ {
+ "field": "hostname",
+ "operator": "is",
+ "value": "string",
+ }
+ ],
+ order_by={"date": "asc"},
+ pagination={
+ "limit": 1,
+ "offset": 0,
+ },
+ )
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_query(self, client: Profound) -> None:
+ response = client.reports.web_search_results.with_raw_response.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ web_search_result = response.parse()
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_query(self, client: Profound) -> None:
+ with client.reports.web_search_results.with_streaming_response.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ web_search_result = response.parse()
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_stream(self, client: Profound) -> None:
+ web_search_result_stream = client.reports.web_search_results.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ web_search_result_stream.response.close()
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_stream_with_all_params(self, client: Profound) -> None:
+ web_search_result_stream = client.reports.web_search_results.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ date_interval="hour",
+ dimensions=["hostname"],
+ filters=[
+ {
+ "field": "hostname",
+ "operator": "is",
+ "value": "string",
+ }
+ ],
+ order_by={"date": "asc"},
+ pagination={
+ "limit": 1,
+ "offset": 0,
+ },
+ )
+ web_search_result_stream.response.close()
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_stream(self, client: Profound) -> None:
+ response = client.reports.web_search_results.with_raw_response.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ stream = response.parse()
+ stream.close()
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_stream(self, client: Profound) -> None:
+ with client.reports.web_search_results.with_streaming_response.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stream = response.parse()
+ stream.close()
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncWebSearchResults:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_query(self, async_client: AsyncProfound) -> None:
+ web_search_result = await async_client.reports.web_search_results.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_query_with_all_params(self, async_client: AsyncProfound) -> None:
+ web_search_result = await async_client.reports.web_search_results.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ date_interval="hour",
+ dimensions=["hostname"],
+ filters=[
+ {
+ "field": "hostname",
+ "operator": "is",
+ "value": "string",
+ }
+ ],
+ order_by={"date": "asc"},
+ pagination={
+ "limit": 1,
+ "offset": 0,
+ },
+ )
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_query(self, async_client: AsyncProfound) -> None:
+ response = await async_client.reports.web_search_results.with_raw_response.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ web_search_result = await response.parse()
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_query(self, async_client: AsyncProfound) -> None:
+ async with async_client.reports.web_search_results.with_streaming_response.query(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ web_search_result = await response.parse()
+ assert_matches_type(WebSearchResultQueryResponse, web_search_result, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_stream(self, async_client: AsyncProfound) -> None:
+ web_search_result_stream = await async_client.reports.web_search_results.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ await web_search_result_stream.response.aclose()
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_stream_with_all_params(self, async_client: AsyncProfound) -> None:
+ web_search_result_stream = await async_client.reports.web_search_results.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ date_interval="hour",
+ dimensions=["hostname"],
+ filters=[
+ {
+ "field": "hostname",
+ "operator": "is",
+ "value": "string",
+ }
+ ],
+ order_by={"date": "asc"},
+ pagination={
+ "limit": 1,
+ "offset": 0,
+ },
+ )
+ await web_search_result_stream.response.aclose()
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_stream(self, async_client: AsyncProfound) -> None:
+ response = await async_client.reports.web_search_results.with_raw_response.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ stream = await response.parse()
+ await stream.close()
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_stream(self, async_client: AsyncProfound) -> None:
+ async with async_client.reports.web_search_results.with_streaming_response.stream(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ metrics=["count"],
+ start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ stream = await response.parse()
+ await stream.close()
+
+ assert cast(Any, response.is_closed) is True
From 1005d390502569d4942200a7aa6cd7a6788f7e9d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 13 May 2026 18:17:49 +0000
Subject: [PATCH 08/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 63c328a4..211860ae 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-7ba9ec7f1d2145725b39fc658bc32263a3bce786827a2c1471b90702d1e3085d.yml
-openapi_spec_hash: cde944522e91d60e77cf832cde66054c
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-0b439734473945268ead334d0cd83de3f5f1e7a061c9ca3d24a737130f23689a.yml
+openapi_spec_hash: 66edb5fa119878aa42759aa0e86483f4
config_hash: 7eef30f341128d7bf491d472a777e46c
From f87c607a38323725f2cf6ac77225797c1c8d6a46 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 13 May 2026 21:17:44 +0000
Subject: [PATCH 09/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 211860ae..c7873543 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-0b439734473945268ead334d0cd83de3f5f1e7a061c9ca3d24a737130f23689a.yml
-openapi_spec_hash: 66edb5fa119878aa42759aa0e86483f4
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-d3a40c012f9c0dfeeebdda807a7e84870a2ed9954d2fca9a90a1b847f82e24a4.yml
+openapi_spec_hash: 2136abf438d5409277a59a5375f10e41
config_hash: 7eef30f341128d7bf491d472a777e46c
From 0d96799808f813835895c1739a7130f746523b7d Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 14 May 2026 14:17:45 +0000
Subject: [PATCH 10/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index c7873543..ba1650ec 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-d3a40c012f9c0dfeeebdda807a7e84870a2ed9954d2fca9a90a1b847f82e24a4.yml
-openapi_spec_hash: 2136abf438d5409277a59a5375f10e41
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-86b165c7b573e962e92bfb269f5236bab18601be503cdab8ccfef7c4f6301c3e.yml
+openapi_spec_hash: d3a62af0df628aaff9cccf1f7317a2df
config_hash: 7eef30f341128d7bf491d472a777e46c
From 736b8f4bdf0c97696fc4cc5c5af496d7632f7b2c Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 14 May 2026 18:17:35 +0000
Subject: [PATCH 11/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index ba1650ec..5c5d40d7 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-86b165c7b573e962e92bfb269f5236bab18601be503cdab8ccfef7c4f6301c3e.yml
-openapi_spec_hash: d3a62af0df628aaff9cccf1f7317a2df
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-d9a398b577370feb6f4bb598e306c988dddcae5cb88527bd501dccd9fb3a6b19.yml
+openapi_spec_hash: fc8a65269bd0f3c1c5ea14391e3aea4d
config_hash: 7eef30f341128d7bf491d472a777e46c
From d02ffc6a66a3d4f4d4b926532c0e22f02f77eceb Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 14 May 2026 21:17:34 +0000
Subject: [PATCH 12/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 5c5d40d7..316fe8f5 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-d9a398b577370feb6f4bb598e306c988dddcae5cb88527bd501dccd9fb3a6b19.yml
-openapi_spec_hash: fc8a65269bd0f3c1c5ea14391e3aea4d
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-b25ed97eb3467368ec3296ea9eda3833288be8740b7421a4a98a3d34e3c93dec.yml
+openapi_spec_hash: d7bdf00113c44b15b42817761566c5fd
config_hash: 7eef30f341128d7bf491d472a777e46c
From 7a38e3b9f9daf32979eeb65cad2d3640aae34c45 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Thu, 14 May 2026 22:17:42 +0000
Subject: [PATCH 13/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 316fe8f5..6a7b6f3b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-b25ed97eb3467368ec3296ea9eda3833288be8740b7421a4a98a3d34e3c93dec.yml
-openapi_spec_hash: d7bdf00113c44b15b42817761566c5fd
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-4937e6877981b1ebbddc71c6ccdd48ee0c6045e9bd7bf27be72a501ad21d470f.yml
+openapi_spec_hash: fa5f86d7c9d434feb812647c51286c6c
config_hash: 7eef30f341128d7bf491d472a777e46c
From 7258bb6255e42bf73bd5f004d99006ad43674b80 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 15 May 2026 01:17:37 +0000
Subject: [PATCH 14/15] codegen metadata
---
.stats.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 6a7b6f3b..c6ff9605 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 44
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-4937e6877981b1ebbddc71c6ccdd48ee0c6045e9bd7bf27be72a501ad21d470f.yml
-openapi_spec_hash: fa5f86d7c9d434feb812647c51286c6c
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-c0a8a60fb266537ae26999b8684f15f0d04b8f8f68c10e9c8b436ddbf0718462.yml
+openapi_spec_hash: 41991a62855a570749555b4f2e2a6a61
config_hash: 7eef30f341128d7bf491d472a777e46c
From 52b2330d89764cbc856c246dfeacf13b557632d0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 15 May 2026 01:18:02 +0000
Subject: [PATCH 15/15] release: 0.46.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 9 +++++++++
pyproject.toml | 2 +-
src/profound/_version.py | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index fc0d7ff8..563004f2 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.45.0"
+ ".": "0.46.0"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 28de30a7..fa117bc6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.46.0 (2026-05-15)
+
+Full Changelog: [v0.45.0...v0.46.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.45.0...v0.46.0)
+
+### Features
+
+* **api:** added filters and web search results ([a051830](https://github.com/cooper-square-technologies/profound-python-sdk/commit/a051830bf93f0e8602a2a88d9a963d6d177f3bd2))
+* **api:** api update ([4380770](https://github.com/cooper-square-technologies/profound-python-sdk/commit/43807702e18b8159fc041dd7e6e0c0e5d48fba9f))
+
## 0.45.0 (2026-05-12)
Full Changelog: [v0.44.0...v0.45.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.44.0...v0.45.0)
diff --git a/pyproject.toml b/pyproject.toml
index fdbd0b0f..d71b3b04 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "profound"
-version = "0.45.0"
+version = "0.46.0"
description = "The official Python library for the profound API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/profound/_version.py b/src/profound/_version.py
index dbcebb05..aa9401ad 100644
--- a/src/profound/_version.py
+++ b/src/profound/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "profound"
-__version__ = "0.45.0" # x-release-please-version
+__version__ = "0.46.0" # x-release-please-version