Skip to navigation

How a search works

A search runs in the background and takes about two to three minutes. The API gives you a request_id straight away, and you ask for the outcome when you are ready.

The three steps

1

Submit

POST /searches takes your objective and an Idempotency-Key. It charges the search fee and answers 202 with the request_id. The response also carries a Location header with the URL to poll.

2

Poll

GET /searches/{request_id} tells you where the search is. Wait 10 seconds between reads. The Retry-After header says so while the search is running.

3

Buy

POST /results returns the full, unmasked phone numbers of a DONE search and charges for them once.

Statuses

StatusMeaningWhat to do
IN_PROGRESSThe search is queued or runningKeep polling
DONEThe search finished. result lists every match, phone numbers maskedDecide whether to buy
FAILEDThe search could not finish. error says whyYour fee is refunded. Submit again with a new Idempotency-Key if you want to retry

DONE and FAILED never change. A failed search is a successful read, so the HTTP status is 200.

What a finished search shows

{
"status": "success",
"data": {
"request_id": "3f1c2a7e-8b41-4c1d-9a55-6d2f0e7b9c10",
"status": "DONE",
"created_at": "2026-12-02T09:30:00Z",
"result": {
"query_id": "q_7d2e1f4a",
"matched_count": 2,
"returned_count": 2,
"users": [
{
"identifier": "u_91a0c4",
"phone_number": "091*****728",
"match_score": 0.93,
"category": "investment",
"match_explanation": "Trades gold regularly."
}
],
"search_cost_toman": 50000,
"results_unit_price_toman": 400,
"results_cost_toman": 800,
"results_charged": false,
"searched_at": "2026-12-02T09:32:41Z",
"processing_time_ms": 161000
},
"error": null
},
"error": null
}
  • Phone numbers show their first and last three digits. A number that cannot be masked safely comes back null or fully starred, never in the clear.
  • results_cost_toman is what Buy results will charge.
  • results_charged turns true once you have bought the results.
  • A search that matched nobody is a real answer: matched_count is 0 and the fee is not refunded.

What a failed search shows

{
"status": "success",
"data": {
"request_id": "3f1c2a7e-8b41-4c1d-9a55-6d2f0e7b9c10",
"status": "FAILED",
"created_at": "2026-12-02T09:30:00Z",
"result": null,
"error": {
"code": 5021,
"message": "The audience service failed or timed out",
"refunded": true
}
},
"error": null
}
error.codeMeaning
5021The audience service failed or timed out
5000An internal failure, or the search was abandoned

refunded is true once your fee is back in the wallet. If it is false, the refund is not confirmed yet: read the search again.

One search at a time

An account runs one search at a time. Submitting a second one while the first is IN_PROGRESS answers 409 with code 4092, and nothing is charged. Wait for the first to finish.

How long results are kept

A finished search can be read and bought for 7 days. After that, both calls answer 404 (code 4043).