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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.5.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 24
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-57e1c56be0942c131ab5f24d8620de166d0721ef7f3423532abc7027e5a989e7.yml
openapi_spec_hash: e61f831e30d19590eb3138a1b1709d1d
config_hash: 80e7ee7ad8e3424616aca7189ffd5ae7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/parallel-web%2Fparallel-sdk-66ee13c3475d2c76f0956f258f0469903155b83ef02e839641be94cdc2014cf3.yml
openapi_spec_hash: 88af7b88725bead1f8ccdcaeb436fadb
config_hash: e17d82e9cb35004e5f9a9d3c4cf51aeb
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.5.1 (2026-04-22)

Full Changelog: [v0.5.0...v0.5.1](https://github.com/parallel-web/parallel-sdk-python/compare/v0.5.0...v0.5.1)

### Features

* **api:** manual updates ([86c7d33](https://github.com/parallel-web/parallel-sdk-python/commit/86c7d334df7c2018d0277fe3efa93fb7029f6a41))
* **api:** Mark search and extract as deprecated ([cfdea3b](https://github.com/parallel-web/parallel-sdk-python/commit/cfdea3b19622911e65c9359f0acdbd4b201d2d08))
* **api:** OpenAPI changes ([cfc5fb3](https://github.com/parallel-web/parallel-sdk-python/commit/cfc5fb373a46c73c2f79057b593712d7b847ee33))

## 0.5.0 (2026-04-21)

Full Changelog: [v0.4.2...v0.5.0](https://github.com/parallel-web/parallel-sdk-python/compare/v0.4.2...v0.5.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "parallel-web"
version = "0.5.0"
version = "0.5.1"
description = "The official Python library for the Parallel API"
dynamic = ["readme"]
license = "MIT"
Expand Down
24 changes: 16 additions & 8 deletions src/parallel/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ def extract(
"""
Extracts relevant content from specific web URLs.

The legacy Extract API reference is available
[here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract).
The legacy Extract API reference (`/v1beta/extract` endpoint) is available
[here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract), and
migration guide is
[here](https://docs.parallel.ai/extract/extract-migration-guide).

Args:
urls: URLs to extract content from. Up to 20 URLs.
Expand Down Expand Up @@ -322,8 +324,10 @@ def search(
"""
Searches the web.

The legacy Search API reference is available
[here](https://docs.parallel.ai/api-reference/legacy/search-beta/search).
The legacy Search API reference (`/v1beta/search` endpoint) is available
[here](https://docs.parallel.ai/api-reference/legacy/search-beta/search), and
migration guide is
[here](https://docs.parallel.ai/search/search-migration-guide).

Args:
search_queries: Concise keyword search queries, 3-6 words each. At least one query is required,
Expand Down Expand Up @@ -594,8 +598,10 @@ async def extract(
"""
Extracts relevant content from specific web URLs.

The legacy Extract API reference is available
[here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract).
The legacy Extract API reference (`/v1beta/extract` endpoint) is available
[here](https://docs.parallel.ai/api-reference/legacy/extract-beta/extract), and
migration guide is
[here](https://docs.parallel.ai/extract/extract-migration-guide).

Args:
urls: URLs to extract content from. Up to 20 URLs.
Expand Down Expand Up @@ -669,8 +675,10 @@ async def search(
"""
Searches the web.

The legacy Search API reference is available
[here](https://docs.parallel.ai/api-reference/legacy/search-beta/search).
The legacy Search API reference (`/v1beta/search` endpoint) is available
[here](https://docs.parallel.ai/api-reference/legacy/search-beta/search), and
migration guide is
[here](https://docs.parallel.ai/search/search-migration-guide).

Args:
search_queries: Concise keyword search queries, 3-6 words each. At least one query is required,
Expand Down
2 changes: 1 addition & 1 deletion src/parallel/_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__ = "parallel"
__version__ = "0.5.0" # x-release-please-version
__version__ = "0.5.1" # x-release-please-version
81 changes: 65 additions & 16 deletions src/parallel/resources/beta/beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import typing_extensions
from typing import List, Optional
from itertools import chain
from typing_extensions import Literal
Expand Down Expand Up @@ -113,10 +114,14 @@ def with_streaming_response(self) -> BetaResourceWithStreamingResponse:
"""
return BetaResourceWithStreamingResponse(self)

@typing_extensions.deprecated(
"Use client.extract instead. For more info, see https://docs.parallel.ai/extract/extract-migration-guide"
)
def extract(
self,
*,
urls: SequenceNotStr[str],
client_model: Optional[str] | Omit = omit,
excerpts: beta_extract_params.Excerpts | Omit = omit,
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
full_content: beta_extract_params.FullContent | Omit = omit,
Expand All @@ -138,6 +143,9 @@ def extract(
`search-extract-2025-10-10`.

Args:
client_model: The model generating this request and consuming the results. Enables
optimizations and tailors default settings for the model's capabilities.

excerpts: Include excerpts from each URL relevant to the search objective and queries.
Note that if neither objective nor search_queries is provided, excerpts are
redundant with full content.
Expand Down Expand Up @@ -181,6 +189,7 @@ def extract(
body=maybe_transform(
{
"urls": urls,
"client_model": client_model,
"excerpts": excerpts,
"fetch_policy": fetch_policy,
"full_content": full_content,
Expand All @@ -196,9 +205,13 @@ def extract(
cast_to=ExtractResponse,
)

@typing_extensions.deprecated(
"Use client.search instead. For more info, see https://docs.parallel.ai/search/search-migration-guide"
)
def search(
self,
*,
client_model: Optional[str] | Omit = omit,
excerpts: ExcerptSettingsParam | Omit = omit,
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
location: Optional[str] | Omit = omit,
Expand All @@ -222,6 +235,9 @@ def search(
Searches the web.

Args:
client_model: The model generating this request and consuming the results. Enables
optimizations and tailors default settings for the model's capabilities.

excerpts: Optional settings to configure excerpt generation.

fetch_policy: Policy for live fetching web results.
Expand Down Expand Up @@ -284,6 +300,7 @@ def search(
"/v1beta/search",
body=maybe_transform(
{
"client_model": client_model,
"excerpts": excerpts,
"fetch_policy": fetch_policy,
"location": location,
Expand Down Expand Up @@ -364,10 +381,14 @@ def with_streaming_response(self) -> AsyncBetaResourceWithStreamingResponse:
"""
return AsyncBetaResourceWithStreamingResponse(self)

@typing_extensions.deprecated(
"Use client.extract instead. For more info, see https://docs.parallel.ai/extract/extract-migration-guide"
)
async def extract(
self,
*,
urls: SequenceNotStr[str],
client_model: Optional[str] | Omit = omit,
excerpts: beta_extract_params.Excerpts | Omit = omit,
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
full_content: beta_extract_params.FullContent | Omit = omit,
Expand All @@ -389,6 +410,9 @@ async def extract(
`search-extract-2025-10-10`.

Args:
client_model: The model generating this request and consuming the results. Enables
optimizations and tailors default settings for the model's capabilities.

excerpts: Include excerpts from each URL relevant to the search objective and queries.
Note that if neither objective nor search_queries is provided, excerpts are
redundant with full content.
Expand Down Expand Up @@ -432,6 +456,7 @@ async def extract(
body=await async_maybe_transform(
{
"urls": urls,
"client_model": client_model,
"excerpts": excerpts,
"fetch_policy": fetch_policy,
"full_content": full_content,
Expand All @@ -447,9 +472,13 @@ async def extract(
cast_to=ExtractResponse,
)

@typing_extensions.deprecated(
"Use client.search instead. For more info, see https://docs.parallel.ai/search/search-migration-guide"
)
async def search(
self,
*,
client_model: Optional[str] | Omit = omit,
excerpts: ExcerptSettingsParam | Omit = omit,
fetch_policy: Optional[FetchPolicyParam] | Omit = omit,
location: Optional[str] | Omit = omit,
Expand All @@ -473,6 +502,9 @@ async def search(
Searches the web.

Args:
client_model: The model generating this request and consuming the results. Enables
optimizations and tailors default settings for the model's capabilities.

excerpts: Optional settings to configure excerpt generation.

fetch_policy: Policy for live fetching web results.
Expand Down Expand Up @@ -535,6 +567,7 @@ async def search(
"/v1beta/search",
body=await async_maybe_transform(
{
"client_model": client_model,
"excerpts": excerpts,
"fetch_policy": fetch_policy,
"location": location,
Expand All @@ -560,11 +593,15 @@ class BetaResourceWithRawResponse:
def __init__(self, beta: BetaResource) -> None:
self._beta = beta

self.extract = to_raw_response_wrapper(
beta.extract,
self.extract = ( # pyright: ignore[reportDeprecated]
to_raw_response_wrapper(
beta.extract, # pyright: ignore[reportDeprecated],
)
)
self.search = to_raw_response_wrapper(
beta.search,
self.search = ( # pyright: ignore[reportDeprecated]
to_raw_response_wrapper(
beta.search, # pyright: ignore[reportDeprecated],
)
)

@cached_property
Expand Down Expand Up @@ -611,11 +648,15 @@ class AsyncBetaResourceWithRawResponse:
def __init__(self, beta: AsyncBetaResource) -> None:
self._beta = beta

self.extract = async_to_raw_response_wrapper(
beta.extract,
self.extract = ( # pyright: ignore[reportDeprecated]
async_to_raw_response_wrapper(
beta.extract, # pyright: ignore[reportDeprecated],
)
)
self.search = async_to_raw_response_wrapper(
beta.search,
self.search = ( # pyright: ignore[reportDeprecated]
async_to_raw_response_wrapper(
beta.search, # pyright: ignore[reportDeprecated],
)
)

@cached_property
Expand Down Expand Up @@ -662,11 +703,15 @@ class BetaResourceWithStreamingResponse:
def __init__(self, beta: BetaResource) -> None:
self._beta = beta

self.extract = to_streamed_response_wrapper(
beta.extract,
self.extract = ( # pyright: ignore[reportDeprecated]
to_streamed_response_wrapper(
beta.extract, # pyright: ignore[reportDeprecated],
)
)
self.search = to_streamed_response_wrapper(
beta.search,
self.search = ( # pyright: ignore[reportDeprecated]
to_streamed_response_wrapper(
beta.search, # pyright: ignore[reportDeprecated],
)
)

@cached_property
Expand Down Expand Up @@ -713,11 +758,15 @@ class AsyncBetaResourceWithStreamingResponse:
def __init__(self, beta: AsyncBetaResource) -> None:
self._beta = beta

self.extract = async_to_streamed_response_wrapper(
beta.extract,
self.extract = ( # pyright: ignore[reportDeprecated]
async_to_streamed_response_wrapper(
beta.extract, # pyright: ignore[reportDeprecated],
)
)
self.search = async_to_streamed_response_wrapper(
beta.search,
self.search = ( # pyright: ignore[reportDeprecated]
async_to_streamed_response_wrapper(
beta.search, # pyright: ignore[reportDeprecated],
)
)

@cached_property
Expand Down
6 changes: 6 additions & 0 deletions src/parallel/types/beta/beta_extract_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
class BetaExtractParams(TypedDict, total=False):
urls: Required[SequenceNotStr[str]]

client_model: Optional[str]
"""The model generating this request and consuming the results.

Enables optimizations and tailors default settings for the model's capabilities.
"""

excerpts: Excerpts
"""Include excerpts from each URL relevant to the search objective and queries.

Expand Down
6 changes: 6 additions & 0 deletions src/parallel/types/beta/beta_search_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@


class BetaSearchParams(TypedDict, total=False):
client_model: Optional[str]
"""The model generating this request and consuming the results.

Enables optimizations and tailors default settings for the model's capabilities.
"""

excerpts: ExcerptSettingsParam
"""Optional settings to configure excerpt generation."""

Expand Down
Loading
Loading