AuditQuery
Request body for the Query Change History endpoint.
Declaration
object AuditQueryProperties
| Name | Type | Description |
|---|---|---|
filters | [AuditFilter] | An array of filter conditions applied to the audit log. Every request requires a filter on |
sorting | [AuditSorting] | An array of sort directives. Each entry is an AuditSorting object specifying a |
pagination | Pagination | Controls the page offset and page size for the response. See Pagination. Uses |
options | AuditQuery.Options | A flat key-value map of additional query controls. See AuditQuery.Options. All keys and values are strings. See the Option Key table below. |
Overview
The AuditQuery object is the request payload for POST /v1/change-history/query (Query Change History). Every valid request must include at least one filters entry targeting eventTime using BETWEEN, GREATER_THAN, or LESS_THAN. All other fields are optional and default to reasonable values when omitted.
Example
A minimal valid request looks like this:
{
"filters": [
{
"field": "eventTime",
"operator": "BETWEEN",
"value": [
"2025-03-01",
"2025-03-31"
]
}
],
"pagination": {
"offset": 0,
"pageSize": 50
}
}Filterable Field | Supported Operators | Accepted Values |
|---|---|---|
|
| ISO 8601 date strings, for example, |
|
| Not a closed enum. A string matching the name of the API entity that changed, such as |
|
|
|
|
|
|
|
| Campaign ID string(s). Available when |
|
| Ad group ID string(s). Available when |
|
| User ID string(s) |
|
| Transaction ID string(s) |
|
| The specific entity that changed. |
|
| Ad account ID string(s). Available when entityType is Campaign or AdGroup. |
Option Key | Accepted Values | Default | Description |
|---|---|---|---|
|
|
| When |
|
|
| Controls how the API interprets |
|
|
| Controls entity metadata in change detail responses. |
Discussion
Required Filter
{
"field": "eventTime",
"operator": "BETWEEN",
"value": [
"2025-01-01",
"2025-01-31"
]
}Combine filters
The API combines multiple filters entries with logical AND. For example, to retrieve only Campaign UPDATE events in a time window:
{
"filters": [
{
"field": "eventTime",
"operator": "BETWEEN",
"value": [
"2025-03-01",
"2025-03-31"
]
},
{
"field": "entityType",
"operator": "IN",
"value": [
"Campaign"
]
},
{
"field": "eventType",
"operator": "IN",
"value": [
"UPDATE"
]
}
]
}To retrieve all changes within a specific campaign across any entity type (ad groups, keywords, ads):
{
"filters": [
{
"field": "eventTime",
"operator": "BETWEEN",
"value": [
"2025-03-01",
"2025-03-31"
]
},
{
"field": "campaignId",
"operator": "EQUALS",
"value": "789012"
}
]
}To retrieve changes made by a specific user across multiple ad groups:
{
"filters": [
{
"field": "eventTime",
"operator": "BETWEEN",
"value": [
"2025-03-01",
"2025-03-31"
]
},
{
"field": "adGroupId",
"operator": "IN",
"value": [
"345678",
"345679"
]
},
{
"field": "userId",
"operator": "EQUALS",
"value": "12345678"
}
]
}Handle time zones
When timeZone is "ORTZ", the server converts the eventTime filter values from the org’s configured timezone to UTC before executing the query. The eventTime values returned in the response are always in UTC regardless of this setting.
Performance Tips
Set
needTotalsto"false"on high-volume queries where you don’t need an accurate total count. Skipping the COUNT query can substantially reduce response latency.Apply
entityTypeandeventTypefilters to limit result set size before paginating.