Sync-only by design — no AsyncMinerva support
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.
Validation (before any HTTP call)
The wrapper validates locally first, so customer-side bugs surface asMinervaValidationError without burning a quota credit:
querymust be 1–500 characterssizemust be in 1–100
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 asMinervaTransientError — 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
RemoteDisconnectedfamily) - Connect / read / write timeouts
- All
5xxHTTP responses
MinervaValidationError— local input validation failedMinervaAuthError—401/403API-key issueMinervaRateLimitError—429, use theretry_afterfield on the exception to back off, then retry; don’t bury it in a generic retry loop- Other
MinervaAPIErrorsubclasses for4xxresponses — 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 intomc.api.enrich to get
full profiles for the matched audience — no second resolve hop needed:
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:
- POST /person-search/v0/search → — kick off a search
- GET /person-search/v0/search/<id> → — fetch a prior search
- GET /person-search/v0/usage → — per-day usage tallies