Convert a human-friendly sentence like “founders at Series A fintech startups in NYC” into the structured filter object consumed by createLeadSearch.
POST /api/leads/search. Returns synchronously. Queries are trimmed and hard-capped at 500 characters.
The returned filters object is exactly the shape createLeadSearch expects — you can pass it through verbatim. The optional unsupported string surfaces any intent the LLM had to drop because the filter vocabulary does not express it (for example “actively hiring for AEs”). Always surface unsupported back to the human so they can refine their ask.
| Dimension | Values |
|---|---|
| Job title | free text |
| Seniority | founder, owner, c_suite, partner, vp, head, director, senior, manager, entry |
| Function | sales, marketing, engineering, product_management, finance, hr, operations, etc. |
| Location | countries, US cities/states |
| Company industry | free text (e.g. computer software, financial services) |
| Company keywords | free text (e.g. SaaS, B2B, AI, marketplace, agency) |
| Company size | headcount bands (1-10, 11-20, 21-50, etc.) |
| Revenue range | 100K through 10B |
| Funding round | seed, angel, series_a, series_b, etc. |
unsupported.
parseLeadFilters → createLeadSearch over hand-building filter objects — the LLM handles synonym expansion (e.g. “startup” → size 1-10 / 11-20 / 21-50 plus seed-to-series-A funding) and catches intent the raw vocabulary misses.Downstream chain:filters and unsupported from this call.unsupported aloud to the human — they may want to refine the query or accept the gap.filters plus the original nl_query to POST /api/leads/search. Keep nl_query so the server can generate a human-friendly title.400 "Query must be 500 characters or less": trim the query. This is rare in practice — most natural-language asks sit comfortably under 200 chars.No side effects. Safe to call; no DB writes, no background tasks.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Free-form natural-language query to be parsed.
Natural-language description of the desired audience. Example: "Founders at Series A fintech startups with 11-50 employees in New York". Trimmed server-side; hard-capped at 500 characters.
1 - 500Parsed filters (and optional unsupported-intent note).
LLM-parsed filters plus any unsupported intent the model had to drop.
Structured filter object with the same field shape consumed by POST /api/leads/search. Only the fields the LLM extracted are present — all are optional. Feed directly into the search endpoint.
Short, natural-language sentence describing any intent the LLM could not map to the structured filter vocabulary (e.g. "the query mentions 'actively hiring for engineers', which is not a supported filter"). Omitted entirely when everything mapped cleanly. Agents should surface this back to the human so they can refine the query.