# Search Automations

Searches automations by name and optional status, ordered by stable ID with offset pagination. includeStats adds the four overview contact counts (active, started, finished, ended on open) at four queries per automation on the page; leave it off unless the counts are needed. Use get-automation for the graph and current revision, get-automation-statistics for one automation including goal conversions.

## Input schema:

```json
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "default": "",
      "maxLength": 250
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "enum": [
        "draft",
        "paused",
        "scheduled",
        "active",
        null
      ]
    },
    "offset": {
      "type": "integer",
      "default": 0,
      "minimum": 0
    },
    "limit": {
      "type": "integer",
      "default": 25,
      "minimum": 1,
      "maximum": 100
    },
    "includeStats": {
      "type": "boolean",
      "default": false
    },
    "accountId": {
      "type": [
        "null",
        "integer"
      ],
      "default": null,
      "minimum": 1
    }
  },
  "additionalProperties": false
}
```

## Output schema:

```json
{
  "type": "object",
  "required": [
    "items",
    "nextOffset"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "contactsActive": {
            "type": "integer"
          },
          "contactsStarted": {
            "type": "integer"
          },
          "contactsFinished": {
            "type": "integer"
          },
          "contactsEndedOnOpen": {
            "type": "integer"
          }
        }
      }
    },
    "nextOffset": {
      "type": [
        "integer",
        "null"
      ]
    }
  }
}
```

