Skip to main content
POST
An AI agent reasons about your query, probes the database in real time, asks clarifying questions when needed, then runs the best final search. Unlike a one-shot search, Reasoning Search is conversational: you can answer questions and refine results across turns using the same session_id.

Credit Cost

Clarification turns (status: "needs_input") are free — the agent fee is only charged when a search actually runs.

Request Body

string
Natural language query (max 3000 characters). Required on the first call. On follow-up calls with a session_id, use it to refine the previous search (e.g. "now only in San Francisco").
string
Session identifier returned by a previous call. Send it back to answer questions or refine the same search.
object
Answers to the questions of a needs_input turn, as {question_id: answer}.
string
default:"people"
What to search: "people" or "companies".
integer
default:"25"
Number of results for the final search (1–100).
boolean
default:"false"
If true, results are enriched with fresh live data (1.5 credits per result instead of 0.75).
Pagination: this endpoint always returns the first max_results results. To get the next pages, take the applied_filters from the response and call /search/people or /search/companies with them, setting offset (e.g. offset: 25, offset: 50, …). You only pay the agent fee once — pagination is billed at the standard per-result rate.

Flow

1

Send your query

POST /search/reasoning with query. The response is either complete (results) or needs_input (questions).
2

Answer questions (if asked)

Send back session_id + answers. The agent continues and returns results.
3

Refine (optional)

Send session_id + a new query to refine the same search — the agent remembers the conversation.

POST /search/reasoning/stream takes the exact same body but returns Server-Sent Events, so your users see the agent think, probe the database and build the search in real time — instead of staring at a spinner for 20–60 seconds. Events arrive in this order: The three step types map naturally to UI elements:
  • thought{type, text}: the agent’s narration. Render as a status line.
  • action{type, tool, filters?, resolve?}: a database probe about to run (resolve_value, find_companies, probe_count, preview_results, then a final search). filters shows the exact filters being tested.
  • observation{type, tool, result}: the probe’s outcome, e.g. {"count": 183} for a probe_count.
Since SSE over POST isn’t supported by EventSource, consume the stream with fetch:
Python
A real stream looks like this:

Response

string
"complete" (results below) or "needs_input" (answer the questions).
string
Send it back to answer questions or refine the search.
string
Summary of what the agent searched for and why.
array
Only when status is needs_input. Each question has id, text and optional suggestions (display them as choice chips in your UI).
object
Only when status is complete. The final filters built by the agent. You can reuse them directly on /search/people or /search/companies to paginate.
integer
Total number of matching results.
integer
Number of results returned.
number
Total credits charged (agent fee + results).
array
Profiles or companies, same structure as /search/people / /search/companies.