Skip to content

feat: split Store search from the Store listing - #1273

Merged
vdusek merged 4 commits into
masterfrom
claude/adoring-einstein-vezua6
Dec 2, 2026
Merged

vdusek merged 4 commits into
masterfrom
claude/adoring-einstein-vezua6

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor
  • New store().search(search, ...): the API answers a Store search with one page of at most 100 Actors by relevance, ignores offset and reports the returned count as total, so it returns a StoreSearchResult with items and limit only.
  • search and sort_by on list() and iterate() are deprecated for removal in v4, with a DeprecationWarning. Nothing is removed, since 3.x is released.
  • Fixes iterate(search=...), which repeated the same page without end; it now makes one request.

JS implementation: apify/apify-client-js#1267

Closes: #1270

…sting

`GET /v2/store` answers a request with `search` differently from one
without it. A search returns the best matches as a single page of at
most 100 Actors, ordered by relevance. It ignores `offset`, and reports
the number of Actors returned as `total`. `store().iterate(search=...)`
therefore requested the same page again and again, since the iterator
stops only at a page with no rows.

`StoreCollectionClient.search()` now covers the search:

- one request with the query, `limit` and the `category`, `username`,
  `pricing_model` and `include_unrunnable_actors` filters, and no
  `offset`
- returns a `StoreSearchResult` with `items` and the `limit` the API
  applied; `total` and `offset` of the response are left out, as they
  don't mean what they mean on a listing page
- an empty query raises `ValueError`, as the API answers it with the
  listing

The `search` and `sort_by` arguments of `list()` and `iterate()` are
deprecated, each with a `DeprecationWarning`, for removal in v4. The API
ignores `sort_by`. Until then, `iterate(search=...)` makes a single
request and yields that one page, and `list(search=...)` works as
before.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAGtCcLFHtTvqReATBj
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Dec 2, 2026
@vdusek vdusek changed the title feat: add Store search method, deprecate search and sort_by in listing feat: split Store search from the Store listing Dec 2, 2026
Comment thread tests/integration/test_store.py Resolved
Comment thread docs/02_concepts/08_pagination.mdx Resolved
Remove the integration test for a query without matches, which asserts
what the API returns for it, and the `hasattr` assertions on the search
result, which a dataclass can't fail.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAGtCcLFHtTvqReATBj
- Every page request of `iterate` sets the log context again, as it did
  when the callback went through the wrapped `list`. A client call
  between two pages no longer leaves its method name and resource ID on
  the next page request.
- An empty `search` gets no deprecation warning, since it is not a
  search and the `search` method rejects it.
- `StoreActor` is imported at runtime, so the annotations of
  `StoreSearchResult` resolve.
- The `iterate` docstring says that `offset` and `chunk_size` have no
  effect with the deprecated `search`, the helper explains its
  `stacklevel`, and the docstrings write Apify Store as a proper noun.
- Tests: the single-page test fails fast on a regression, the `sort_by`
  test proves a second page is requested, and the integration tests no
  longer expect exact item counts from the live search.
- Docs: a "Search Apify Store" section with sync and async examples.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAGtCcLFHtTvqReATBj
@Pijukatel
Pijukatel requested a review from vdusek December 2, 2026 09:34
@Pijukatel
Pijukatel marked this pull request as ready for review December 2, 2026 09:34
@Pijukatel
Pijukatel requested a review from szaganek as a code owner December 2, 2026 09:34

@vdusek vdusek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vdusek
vdusek merged commit 9d9df3d into master Dec 2, 2026
32 checks passed
@vdusek
vdusek deleted the claude/adoring-einstein-vezua6 branch December 2, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split Store search from the Store listing

3 participants