By default, search API only returns id and version fields of first 50 matched documents.
per_page parameter can be used to limit the number of results returned.
If you wish to fetch other fields as well, you need to explicitly request them using projections.
Projections are requested by providing array of attribute names. If listed attributes exist,
they will be returned for each item in response (otherwise error will be returned).
Custom Fields projections
Custom fields in projections behaves exactly as describe in the section above. If the requested custom fields exist, they will be returned for each item in response, otherwise they will be ignored.
Before you proceed you need a list of unique identifiers of the custom fields that you’re going to request.
Notice that you can’t simply get all the custom fields by querying "custom_fields" attribute - the query will result with an error.
All the currently exposed indices support custom fields.
See the table below for the syntax:
Where customFieldId is a unique identifier of a contact’s custom field
Where customFieldId is a unique identifier of a sales account’s custom field