<!--
{
  "availability" : [
    "Apple Ads Platform API: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Apple-Ads-Platform-API",
  "identifier" : "/documentation/Apple-Ads-Platform-API/AuditFilter",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple Ads Platform API"
    ],
    "preciseIdentifier" : "data:apple-ads-platform-api:AuditFilter"
  },
  "title" : "AuditFilter"
}
-->

# AuditFilter

A single filter condition in an audit query request, specifying the field to filter on, the comparison operator, and one or more values to match against.

```
object AuditFilter
```

## Discussion

The `AuditFilter` object is the building block for narrowing change history query results. Each filter targets a single field and applies the specified operator against the provided values. The system combines multiple filters in the same request with logical AND.

Every `AuditQuery` request requires an `eventTime` filter:

```json
{ "field": "eventTime", "operator": "BETWEEN", "value": ["2025-03-01", "2025-03-31"] }
{ "field": "eventTime", "operator": "GREATER_THAN", "value": "2025-03-01T00:00:00.000Z" }
{ "field": "eventTime", "operator": "LESS_THAN", "value": "2025-03-31T23:59:59.999Z" }
```

Use `IN` for categorical filters:

```json
{ "field": "entityType", "operator": "IN", "value": ["Campaign", "AdGroup"] }
{ "field": "eventType", "operator": "IN", "value": ["UPDATE"] }
{ "field": "userType", "operator": "IN", "value": ["CUSTOMER_API"] }
```

Each field accepts only certain operators and value formats, summarized below.

|Field        |Operator                              |Accepted Values                                                                                                                                                                                                                                                                                                                                               |
|-------------|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`eventTime`  |`BETWEEN`, `GREATER_THAN`, `LESS_THAN`|ISO 8601 timestamps. Maximum lookback is 6 months. `BETWEEN` requires two values. `GREATER_THAN` and `LESS_THAN` each take a single timestamp.                                                                                                                                                                                                                |
|`entityType` |`IN`                                  |Not a closed enum. A string matching the name of the API entity that changed, such as `Campaign`, `AdGroup`, `Keyword`, `NegativeKeyword`, `Ad`, `Creative`, `AdAccount`, `Org`, or `LocationGroup`. See <doc://com.apple.apple-ads-platform-api/documentation/Apple-Ads-Platform-API/change-history-endpoints> for the entity types this endpoint reports on.|
|`entityId`   |`EQUALS`, `IN`                        |Entity ID string(s). Identifies the specific entity that changed.                                                                                                                                                                                                                                                                                             |
|`eventType`  |`IN`                                  |`CREATE`, `UPDATE`, `DELETE`                                                                                                                                                                                                                                                                                                                                  |
|`userType`   |`IN`                                  |`CUSTOMER`, `CUSTOMER_API`, `APPLE_SUPPORT`                                                                                                                                                                                                                                                                                                                   |
|`userId`     |`EQUALS`, `IN`                        |User ID string(s).                                                                                                                                                                                                                                                                                                                                            |
|`txnId`      |`EQUALS`, `IN`                        |Transaction ID string(s). Matches `transactionId` in `AuditSummary` response rows.                                                                                                                                                                                                                                                                            |
|`adAccountId`|`EQUALS`, `IN`                        |Ad account ID string(s). Available when `entityType` is `Campaign` or `AdGroup`.                                                                                                                                                                                                                                                                              |
|`campaignId` |`EQUALS`, `IN`                        |Campaign ID string(s). Available when `entityType` is `AdGroup`, `Keyword`, or `NegativeKeyword`.                                                                                                                                                                                                                                                             |
|`adGroupId`  |`EQUALS`, `IN`                        |Ad group ID string(s). Available when `entityType` is `Keyword` or `NegativeKeyword`.                                                                                                                                                                                                                                                                         |

### Example

```json
{
  "field": "campaignId",
  "operator": "IN",
  "value": ["123456789", "987654321"]
}
```

## Topics

### Dictionaries

[`object AuditFilter.Value`](/documentation/Apple-Ads-Platform-API/AuditFilter/Value-data.dictionary)

One or more filter values, provided as a string or array of strings.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)