Skip to main content
POST
Save company-search results into a list

Authorizations

Authorization
string
header
required

Your API token (af_…) as the Basic-auth username, with an empty password.

Body

application/json

Exactly one filter source (filters | savedSearchId | savedSearchName | query) and exactly one destination (listId | listName), plus limit.

limit
integer
required

Maximum number of matching companies to save (1-10000); the background job saves in pages of 100 and debits 2 credits per company saved as it goes (no upfront credit check).

Required range: 1 <= x <= 10000
filters
object

Literal filters, one of the four filter sources — the same vocabulary as POST /companies/search. Company filters in the search vocabulary: include/exclude fields take [{ status, value, label }] entries (label is required), list fields arrays of strings, ranges { min, max } and date ranges { start, end } — enum vocabularies come from GET /companies/filter-options, names and places from GET /companies/autocomplete. Must contain at least one non-empty value.

savedSearchId
string

Id of one of your COMPANY saved searches to take the filters from instead of filters (a people saved search answers 422 SAVED_SEARCH_TYPE_MISMATCH).

savedSearchName
string

Exact title of one of your company saved searches to take the filters from instead of filters; two searches sharing the title answer 409 SAVED_SEARCH_NAME_AMBIGUOUS.

Required string length: 1 - 255
query
string

Natural-language description of the companies to find (max 2000 chars), converted into filters server-side instead of filters; criteria that could not be mapped come back as unresolvedCriteria, and a query yielding no filter answers 422 QUERY_FILTERS_INVALID.

Required string length: 1 - 2000
listId
string

Id of an existing company list to save into (exactly one of listId / listName).

listName
string

Name of the destination company list, created when none exists; an existing list with the same name (case-insensitive) is reused, a name shared by several lists answers 409 LIST_NAME_AMBIGUOUS, and system list names answer 422 LIST_NAME_RESERVED.

Required string length: 1 - 255

Response

Success

listIds
string[]
required

The single destination company list id the save is writing into.

Required array length: 1 element