Skip to main content
List every filter field you can pass to clay search create --filters, along with each field’s type, description, allowed values, and usage guidance. Use it to build a valid search instead of guessing at field names or intent.
clay search fields --source-type <type>

Flags

FlagDescription
--source-type <type>What to search for. One of people or companies.

Output

{
  "sourceType": "people",
  "fields": [
    {
      "name": "job_title_keywords",
      "type": "string[]",
      "description": "Keywords to match against a person's job title.",
      "allowedValues": ["..."]
    }
  ],
  "guidance": {
    "behavior": ["..."],
    "fieldGuidance": [
      {
        "id": "job-title",
        "text": "Use job_title_keywords for role matching.",
        "fields": ["job_title_keywords"]
      }
    ],
    "createExamples": [
      {
        "intent": "Growth engineers in San Francisco",
        "request": {
          "source_type": "people",
          "filters": { "job_title_keywords": ["growth engineer"] }
        }
      }
    ]
  }
}
FieldTypeDescription
sourceTypestringThe source type the fields belong to.
fields[].namestringFilter field name to use as a key in --filters.
fields[].typestringHuman-readable type, e.g. string[], string, number, or boolean.
fields[].descriptionstringWhat the field matches. Omitted when not set.
fields[].allowedValuesstring[]Present only for enum fields; the closed set of accepted values. Omitted for non-enum fields.
guidance.behaviorstring[]General guidance on how filters behave.
guidance.fieldGuidance[]objectPer-topic guidance; fields lists the field names each note applies to.
guidance.createExamples[].intentstringPlain-language description of what the example search finds.
guidance.createExamples[].requestobjectA request shaped like the clay search create payload.
Read the guidance before creating a search — the field list alone does not explain which field to use for a given intent.

Errors

CodeExitNotes
validation_error2--source-type is not people or companies.
auth_forbidden3The API key lacks access, or the public-API beta is not enabled for the workspace.

Examples

clay search fields --source-type people
clay search fields --source-type companies | jq '.guidance.fieldGuidance[] | .id'
clay search fields --source-type people | jq '.guidance.createExamples[0].request'
clay search fields --source-type companies | jq '.fields[] | select(.allowedValues) | .name'