meta_ads_get_activities

Get Meta Ads Activities

Meta

Description

Retrieve change history (who changed what, and when) for a Meta ad account, or for one campaign, ad set or ad. Hopkin records Meta's activity log continuously and keeps it for 25 months, backfilling up to two years when an account is first synced, so start_date can reach well past the last 7 days. Check coverage.complete_from: if the requested window starts earlier, coverage.note says so — no events before that date does not mean nothing changed. An account synced more than 15 minutes ago is refreshed from Meta first; refresh=true forces it. Dates are UTC and end_date includes the whole day. Paginated: when nextCursor is present, call again with the same parameters plus cursor=<nextCursor>.

Read-onlyIdempotentOpen-world

Usage

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "meta_ads_get_activities",
    "arguments": {
      "account_id": "123456789",
      "reason": "View recent account changes"
    }
  }
}

Parameters

NameTypeRequiredDescription
account_id string Required The ad account ID (with or without act_ prefix)minLength: 1
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (8)
NameTypeRequiredDescription
entity_id string Optional Filter to one campaign, ad set or ad ID. With no start_date, the entity's full recorded history is searched (up to two years).minLength: 1
entity_type string Optional Filter to one level: ACCOUNT, CAMPAIGN, AD_SET or AD.
ACCOUNT CAMPAIGN AD_SET AD
start_date string Optional Start date, YYYY-MM-DD (UTC). Defaults to 7 days ago. Any date within the recorded history works; check coverage.complete_from.pattern: ^\d{4}-\d{2}-\d{2}$
end_date string Optional End date, YYYY-MM-DD (UTC), inclusive of the whole day. Defaults to today.pattern: ^\d{4}-\d{2}-\d{2}$
limit integer Optional Number of activities per page (default: 20, max: 100)min: 1, max: 100
cursor string Optional Pagination cursor from the previous response; pass it with otherwise identical parameters.minLength: 1
refresh boolean Optional Sync this account from Meta before reading, even if it was synced in the last 15 minutes. Defaults to false.
connection_id string Optional Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs.

Examples

Account activities

{
  "account_id": "123456789",
  "reason": "View recent account changes"
}

hopkin meta activities get --account 123456789

Campaign history

{
  "account_id": "123456789",
  "entity_id": "23842453456789",
  "entity_type": "CAMPAIGN",
  "reason": "View campaign change history"
}

hopkin meta activities get --account 123456789 --entity-id 23842453456789 --entity-type CAMPAIGN

Date range

{
  "account_id": "123456789",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "reason": "January activity"
}

hopkin meta activities get --account 123456789 --start-date 2024-01-01 --end-date 2024-01-31