Skip to main content
Person Search accepts a plain-English audience description (“CFOs at Series B fintech startups in NYC”) and returns the matching Minerva PIDs plus coverage statistics for how many of them have email, phone, LinkedIn, etc.

SDK wrapper is sync-only

AsyncMinerva.api.person_search (and its _get / _usage siblings) raise NotImplementedError. The endpoint runs for several seconds per call server-side and is metered per UTC day, so allowing concurrent fan-out via asyncio.gather(...) would make it trivial to drain the daily quota in a single client-side mistake. Use the sync Minerva client.

Async REST workflow

The REST API also provides a segment-backed async workflow for searches that need the complete matching PID set. It is not yet wrapped by Minerva or AsyncMinerva.
  1. Submit an async search.
  2. Poll status and inspect the segment-size estimate.
  3. Unlock the full segment and page its PIDs.
The results endpoint returns at most 100 PIDs per page. The initial unlock applies to the entire completed segment—not only the first page—and charges only organization-level net-new PIDs for the current billing year. Subsequent GET pages do not re-bill.

Validation (before any HTTP call)

The wrapper validates locally first, so customer-side bugs surface as MinervaValidationError without burning a quota credit:
  • query must be 1–500 characters
  • size must be in 1–100
Pass dry_run=True to validate + get back the PersonSearchRequest model without firing the call.

Retrying transient errors

Person Search is one of Minerva’s slowest endpoints — it makes its own upstream LLM calls to parse your query, which can take several seconds and is more exposed to transient network drops than the other data-plane methods. The SDK does not auto-retry, but it classifies network drops, read/connect timeouts, and 5xx responses as MinervaTransientError — a subclass of MinervaAPIError — so you can write a tight retry loop without catching things you don’t want to retry (auth failures, input validation, etc.). The recommended pattern uses tenacity:
MinervaTransientError covers:
  • Connection drops mid-response (the RemoteDisconnected family)
  • Connect / read / write timeouts
  • All 5xx HTTP responses
It does not cover (correctly, since retrying makes no difference):
  • MinervaValidationError — local input validation failed
  • MinervaAuthError401/403 API-key issue
  • MinervaRateLimitError429, use the retry_after field on the exception to back off, then retry; don’t bury it in a generic retry loop
  • Other MinervaAPIError subclasses for 4xx responses — your input is the problem

Writing good queries

See the API reference for the canonical guide: Writing good queries → The page documents:
  • Supported attribute categories (role, industry, company, career history, location, education, age, income, contact channels)
  • Three worked examples with progressively more complexity
  • Tips on how to phrase queries the parser handles well

Feeding results into other SDK methods

Person Search returns PIDs. Plug them straight into mc.api.enrich to get full profiles for the matched audience — no second resolve hop needed:
This is the fastest path from “describe an audience” → “have their profile data” — the enrich call is keyed by PID, so it skips the match pipeline server-side (same optimization as mc.workflows.resolve_then_enrich).

Full schema

The request body fields (query, size), response shape (search_id, results, total_count, contact-coverage stats), and error responses are documented under the API Reference: