Watch a search run
Start the simulated search below. The left side is what your code sends. The right side is what the search reports back. Try cancelling part-way through.This is a simulation. The companies, counts and credits are illustrative, and the real pace depends on the request.
Statuses
The last three are terminal statuses: once a search reaches one, it does not change again, and
credits_charged is final.
Three moments are worth telling apart:
- Accepted is the
202response. The search exists and has anid. - Working is
queuedfollowed byrunning. Data providers are being called and credits are being spent. - Finished is a terminal status. No more work will start.
Stop reasons
When a search finishes,stop_reason tells you why. It is null while the search is in progress.
A
failed search can also have a stop_reason of null, for example when it ran past its time limit. Read error for the explanation.
Progress
While a search runs,progress counts what has happened to the candidates so far:
integer
Candidates checked so far.
integer
Matched every requirement and were added to the results.
integer
Failed at least one requirement.
integer
Could not be confirmed on every requirement. Not returned. See Evidence and verdicts.
integer
Matched every requirement, but
limit or a spend limit had already been reached.integer
Contacts found, for company searches with personas and people searches with enrichment.
candidates cannot be turned into a percentage. To show progress, use accepted out of limit.
Reading results while it runs
Results are only ever added, never changed or removed, and they appear as soon as they are accepted. You do not need to wait for the search to finish before reading them. Most integrations use this loop:1
Poll status
Every 2 seconds, slowing to every 10. Stop when
status is terminal.2
Read new results
Call results with
after set to the last next_cursor you saw. You get only what was found since then.3
Read the rest after the search ends
Once the status is terminal, keep reading results until
has_more is false.Cancelling
POST .../cancel stops a search from starting new work.
- Cancellation is not instant. Provider calls already in progress may finish, add results and be charged. The response is
202withcancel_requested: true, and the search reachescancelledonce that work has finished. - Cancelling a finished search returns it unchanged with
200. - What was already charged stays charged. What was found stays readable.
Closing your connection, timing out a request or stopping your polling loop does not cancel a search. The search keeps running and spending until it finishes or you cancel it.
Failure and partial results
A failed search is not an empty search. If a search fails after finding 12 companies, those 12 are still in its results anderror explains what went wrong:
How long results last
A search and its results stay readable after it finishes.expires_at is the time after which they are no longer available, or null when no expiry is set. Store what you need in your own system rather than treating a search as permanent storage.
Next steps
Poll and paginate
Code for the polling loop and cursor pagination.
Errors and retries
Idempotency and safe retries.

