Summary
apify actors search --limit 1 returns count: 1 with an empty items[] array, even though matches exist. More broadly: count always equals the requested --limit, not the number of Actors actually returned, and the deficit grows with --offset.
Reproduced directly against https://api.apify.com/v2/store with curl, so this is an API issue, not a CLI bug — but filing here because there's no public issue tracker for the API. Happy to be redirected to the right team if there's a better venue.
Repro via the CLI
$ npx apify actors search test --json --limit 1
{
"total": 18737,
"count": 1,
"offset": 0,
"limit": 1,
"items": [] ← empty despite total: 18737
}
Same pattern at --limit 5 shows the deficit grows with --offset:
| --offset |
--limit |
count |
items.length |
missing |
| 0 |
5 |
5 |
4 |
1 |
| 5 |
5 |
5 |
2 |
3 |
| 10 |
5 |
5 |
1 |
4 |
Repro at the API level (CLI-independent)
$ curl -s "https://api.apify.com/v2/store?search=test&limit=1"
{"data":{"total":18737,"count":1,"offset":0,"limit":1,"items":[]}}
$ curl -s "https://api.apify.com/v2/store?search=test&limit=1&offset=1"
{"data":{"total":18737,"count":1,"offset":1,"limit":1,"items":[{"name":"axe-accessibility-tester",...}]}}
The offset-0 result is consistently missing on first-page requests that have any filtered survivors.
Likely cause (inferred — please verify)
count is computed before page filtering (echoes min(limit, total - offset))
- Items are filtered after the page window is selected, and the window is never refilled
- So
count reports the slot count and items.length reports survivors; they drift apart
Expected behaviour
count should equal items.length for the returned page
- A request with
limit ≥ 1, offset = 0, and total > 0 must return the top result, not an empty array
- If items are filtered out post-window, the page should be refilled up to
limit
Impact
Agents and scripts that branch on count or total to decide "did we find anything?" will incorrectly conclude no Actors matched, then either thrash on alternative searches or fall through to building a new Actor when one already exists. The top-ranked Actor at offset 0 is also unreachable on any first-page request whenever there are filtered survivors — worst possible item to drop.
Workaround
Use --limit 10 (or higher) for any discovery use case, and trust items[] over count. Treat empty items[] as the only true "no results" signal.
Environment
apify-cli/1.6.1 (commit 91d9a13), Node 24.11.1, Windows
- Reproduced against
api.apify.com on 2026-05-28
Summary
apify actors search --limit 1returnscount: 1with an emptyitems[]array, even though matches exist. More broadly:countalways equals the requested--limit, not the number of Actors actually returned, and the deficit grows with--offset.Reproduced directly against
https://api.apify.com/v2/storewithcurl, so this is an API issue, not a CLI bug — but filing here because there's no public issue tracker for the API. Happy to be redirected to the right team if there's a better venue.Repro via the CLI
$ npx apify actors search test --json --limit 1
{
"total": 18737,
"count": 1,
"offset": 0,
"limit": 1,
"items": [] ← empty despite total: 18737
}
Same pattern at
--limit 5shows the deficit grows with--offset:Repro at the API level (CLI-independent)
$ curl -s "https://api.apify.com/v2/store?search=test&limit=1"
{"data":{"total":18737,"count":1,"offset":0,"limit":1,"items":[]}}
$ curl -s "https://api.apify.com/v2/store?search=test&limit=1&offset=1"
{"data":{"total":18737,"count":1,"offset":1,"limit":1,"items":[{"name":"axe-accessibility-tester",...}]}}
The offset-0 result is consistently missing on first-page requests that have any filtered survivors.
Likely cause (inferred — please verify)
countis computed before page filtering (echoesmin(limit, total - offset))countreports the slot count anditems.lengthreports survivors; they drift apartExpected behaviour
countshould equalitems.lengthfor the returned pagelimit ≥ 1,offset = 0, andtotal > 0must return the top result, not an empty arraylimitImpact
Agents and scripts that branch on
countortotalto decide "did we find anything?" will incorrectly conclude no Actors matched, then either thrash on alternative searches or fall through to building a new Actor when one already exists. The top-ranked Actor at offset 0 is also unreachable on any first-page request whenever there are filtered survivors — worst possible item to drop.Workaround
Use
--limit 10(or higher) for any discovery use case, and trustitems[]overcount. Treat emptyitems[]as the only true "no results" signal.Environment
apify-cli/1.6.1(commit91d9a13), Node 24.11.1, Windowsapi.apify.comon 2026-05-28