curl -X POST "https://prospect-api.smartlead.ai/api/v1/search-email-leads/search-contacts/select-with-cap" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"searchFilters": {"title": ["VP Sales"], "country": ["United States"]}, "maxPerCompany": 1, "limit": 400}'
{
"success": true,
"message": "Bulk selection computed",
"data": {
"selected_lead_ids": ["5f22b0c8cff47e0001616f81", "5f22b0c8cff47e0001616f99"],
"selected_count": 2,
"distinct_companies": 2,
"companies_capped": 1,
"skipped_count": 3,
"truncated": false
}
}
Smart Prospect
Select Contacts per Company API
Pick at most N contacts per company from a search, for example one lead per company - POST /search-contacts/select-with-cap
POST
/
api
/
v1
/
search-email-leads
/
search-contacts
/
select-with-cap
curl -X POST "https://prospect-api.smartlead.ai/api/v1/search-email-leads/search-contacts/select-with-cap" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"searchFilters": {"title": ["VP Sales"], "country": ["United States"]}, "maxPerCompany": 1, "limit": 400}'
{
"success": true,
"message": "Bulk selection computed",
"data": {
"selected_lead_ids": ["5f22b0c8cff47e0001616f81", "5f22b0c8cff47e0001616f99"],
"selected_count": 2,
"distinct_companies": 2,
"companies_capped": 1,
"skipped_count": 3,
"truncated": false
}
}
Credit cost: Free. It returns contact IDs only. Fetching them with Fetch Contacts spends credits as usual.
This endpoint requires your API key: pass it as the
api_key query parameter, or in an X-API-Key or Authorization: Bearer header (see Authentication).- Run Search Contacts and keep its
filter_id. - Call this endpoint with the same filters as
searchFilters,maxPerCompany: 1and the number of contacts you want aslimit. - Call Fetch Contacts with
filter_idandidset toselected_lead_ids. Use Estimate Fetch Cost first to check the cost.
Request Body
The filters, exactly as you sent them to Search Contacts.
Which contacts of a company come first:
{"field": "relevance" | "email_deliverability" | "last_modified", "order": "asc" | "desc"}. Default relevance.curl -X POST "https://prospect-api.smartlead.ai/api/v1/search-email-leads/search-contacts/select-with-cap" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"searchFilters": {"title": ["VP Sales"], "country": ["United States"]}, "maxPerCompany": 1, "limit": 400}'
Response Fields
All fields are underdata.
Response Codes
{
"success": true,
"message": "Bulk selection computed",
"data": {
"selected_lead_ids": ["5f22b0c8cff47e0001616f81", "5f22b0c8cff47e0001616f99"],
"selected_count": 2,
"distinct_companies": 2,
"companies_capped": 1,
"skipped_count": 3,
"truncated": false
}
}
