Get campaign reports

GET /accounts/{account_id}/reports/campaigns

Fetch reports for the observed campaigns in the given period.

Available on: AuditGUARD AlertGUARD PremiumGUARD EliteGUARD

Path parameters

Query parameters

  • period string Required

    Observed period for the report

    Values are TODAY, YESTERDAY, THIS_WEEK, LAST_WEEK, THIS_MONTH, LAST_MONTH, LAST_30_DAYS, or LAST_3_MONTHS.

  • sort string

    Sort the capaigns by a specified parameter. Use '-' prefix to indicate a descending sort. Default: '-total_clicks'.

    Values are last_seen, first_seen, total_clicks, invalid_clicks, or flagged_clicks.

  • offset number

    Paginating parameter. Offset the result by a specified number. Default: 0.

  • limit number

    Paginating parameter. Limit the number of result by a specified number. Max: 100. Default: 50.

  • query string

    Search campaigns by given query

  • ids[] array[string]

    Fetch all campaign reports for the given array of campaign IDs.

Responses

  • Successful operation

    Hide response attributes Show response attributes array[object]
    • id string

      Campaign ID from Google Ads

    • name string

      Campaign name

    • Total number of clicks for this campaign

    • Total number of normal clicks for this campaign

    • Total number of suspicious clicks for this campaign

    • Total number of flagged clicks for this campaign

    • Total number of invalid clicks for this campaign

    • first_seen string(date-time)

      Timestamp of the first occurrence of this campaign

    • last_seen string(date-time)

      Timestamp of the last occurrence of this campaign

GET /accounts/{account_id}/reports/campaigns
curl \
 -X GET https://api.clickguard.com/accounts/{account_id}/reports/campaigns?period=TODAY \
 -H "X-API-KEY: $API_KEY"
Response examples (200)
"{\n  \"id\": \"9263669976\",\n  \"name\": \"Remarketing\",\n  \"total_clicks\": 27,\n  \"normal_clicks\": 6,\n  \"invalid_clicks\": 11,\n  \"suspicious_clicks\": 5,\n  \"flagged_clicks\": 5,\n  \"first_seen\": \"2020-10-28T14:02:19.222Z\",\n  \"last_seen\": \"2021-03-02T16:22:34.584Z\"\n}"
Response examples (200)
[
  {
    "id": "string",
    "name": "string",
    "total_clicks": 42.0,
    "normal_clicks": 42.0,
    "suspicious_clicks": 42.0,
    "flagged_clicks": 42.0,
    "invalid_clicks": 42.0,
    "first_seen": "2024-05-04T09:42:00+00:00",
    "last_seen": "2024-05-04T09:42:00+00:00"
  }
]