Run an on-demand mention search
Runs a one-time search for query across the workspace’s enabled sources over the last 1/7/30 days and AI-scores the results inline using the workspace’s company profile. Results belong to the search (they do NOT appear in the mentions feed); new results count against the monthly mention quota, while results the workspace already collected are flagged alreadyInWorkspace and are free.
Blocks up to waitMs (≤25s). Returns 200 with the full result envelope if it finishes in time, otherwise 202 with a searchId + pollUrl to poll GET /api/v2/search/{searchId}.
Responses carry remaining-quota headers (X-Octolens-Mentions-Remaining always; X-Octolens-Searches-Remaining on plans with a lifetime search cap) so clients can self-throttle before hitting the quota wall.
Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>.
Body
On-demand mention search request.
The search phrase.
1 - 500How far back to search: last 1, 7, or 30 days.
1d, 7d, 30d Subset of workspace-enabled platforms to search. Defaults to all enabled sources.
6464Sources subtracted from the resolved source list.
6464Per-call relevance disambiguation. Overrides the workspace's relevance context for this call only.
2000Comma-separated terms required to co-occur with the query.
500false = AND (default), true = OR for additionalTerms.
Comma-separated exclusions.
500Display filter: hide relevant results below this AI-relevance bar from the response. Does not affect what is saved or billed. Ignored when includeNonRelevant is true.
high, medium, low Display flag only. When true, mentions the AI judged NOT relevant are also returned (marked relevance: "not_relevant"). This does NOT change billing or persistence: every mention that reaches AI scoring is saved to the search and counts against the monthly quota regardless of this flag — it only controls what the response shows. Default false.
Result budget: drives how many candidates are fetched per source (min(maxResults, 100) each), AI-scored (which is what consumes mention quota), and returned. Default 100, cap 500.
1 <= x <= 500How long the request blocks before falling back to async (202 + poll). Default and max 25000.
0 <= x <= 25000Response
200 response
Completed on-demand search.
"completed"1d, 7d, 30d Per-stage funnel counts for a search.
