Skip to main content

benecaster_ai_search_daily_cap

Filter Premium ai-search

Filters one show’s daily limit on paid searches: how many searches from the benecaster_ai_search box may reach the provider per UTC day. The default is the podcaster’s Daily limit on paid searches on Settings → AI Search (500 until changed, 0 for No limit); 0 or less is no limit.

Read before every search that would reach the provider. A query answered from its saved vector or ranking never counts. Once a show has had its limit, its searches are answered results: [] with unavailable: true until midnight UTC, not an error, and pinned results still come back. Settings → AI Search and Dashboard → Needs Attention name a show that reached it today.

Parameters

Name Type Default Description
$cap int — Searches a UTC day; `0` or less is no limit. The saved setting by default
$show_id int — The show searched

Returns: int

Example

// A flagship show gets a higher daily limit on paid searches than the others.
add_filter( 'benecaster_ai_search_daily_cap', fn( int $cap, int $show_id ): int => 12 === $show_id ? 2000 : $cap, 10, 2 );

Notes

The count is a ceiling, not a meter: searches arriving at the same instant may count once, so a burst can run a few over. The podcaster's own searches from the production panel are never counted toward it, nor stopped by it. Walkthrough: Read, change or log AI Search's search results.

Affects

  • GET benecaster-ai-search/v1/search

Need this built rather than just documented? See our services →