Guide

Apple Ads Platform API reports: the v5 report request rewritten, with the fields that changed

The Apple Ads Campaign Management API v5 stops answering on January 26, 2027. Reporting code is the part that breaks most quietly: the Apple Ads Platform API takes a different body, returns a different shape, and has cases where a straight port reads zero instead of failing.

Below is the campaign report request before and after, the response you get back, the edge cases we hit moving our own connector, and a dependency-free reader you can adapt. The request shapes are the ones our connector sends; the notes marked as observed come from read-only requests to our own ad account.

The campaign report request, side by side

Same authentication and the same access token. The endpoint, the context header and almost every key in the body change.

v5

POST https://api.searchads.apple.com/api/v5/reports/campaigns
Authorization: Bearer <access_token>
X-AP-Context: orgId=<orgId>
Content-Type: application/json

{
  "startTime": "2026-10-01",
  "endTime": "2026-10-31",
  "granularity": "DAILY",
  "timeZone": "ORTZ",
  "selector": {
    "orderBy": [{ "field": "campaignId", "sortOrder": "ASCENDING" }],
    "pagination": { "offset": 0, "limit": 1000 }
  },
  "returnRecordsWithNoMetrics": false,
  "returnRowTotals": false,
  "returnGrandTotals": false
}

Platform API

POST https://api.ads.apple.com/v1/reports/apps/campaigns/query
Authorization: Bearer <access_token>
X-AP-Context: adAccountId=<adAccountId>
Content-Type: application/json

{
  "timeRange": {
    "start": "2026-10-01",
    "end": "2026-10-31",
    "timeZone": "ORTZ",
    "granularity": "DAILY"
  },
  "pagination": { "offset": 0, "pageSize": 1000 }
}
v5Platform API
EndpointPOST /api/v5/reports/campaignsPOST /v1/reports/apps/campaigns/query
Context headerX-AP-Context: orgId=…X-AP-Context: adAccountId=…
Date rangestartTime, endTime at the top leveltimeRange.start, timeRange.end
Time zonetimeZone: ORTZtimeRange.timeZone: ORTZ (the account's time zone, the default) or UTC. ORTZ keeps the same calendar days as v5
Granularitygranularity: DAILY, up to 91 days per request (observed; 92 returns INVALID_INPUT)timeRange.granularity: DAILY, up to 90 days per request. Left out entirely for a one-day window
Pagingselector.pagination{offset, limit}, total in pagination.totalResultspagination{offset, pageSize} at the top level, total in pagination.totalCount. pageSize is documented up to 5000
Sortingselector.orderByNot sent. The request above is the one that worked for us
Which campaignsThe whole org in one callNo filter returns the whole ad account in one call. To narrow, filter on id (a string), not campaignId
Rows with no metricsreturnRecordsWithNoMetrics: falseLeave options out; by default the report omits rows that have no metrics
TotalsreturnRowTotals, returnGrandTotalsNot sent. Each row carries totalMetrics next to granularMetrics

One campaign, one day. The filter field is id and the value is a string; because the window is a single day, there is no granularity:

{
  "filters": [{ "field": "id", "operator": "EQUALS", "value": "<campaignId>" }],
  "timeRange": { "start": "2026-10-04", "end": "2026-10-04", "timeZone": "ORTZ" },
  "pagination": { "offset": 0, "pageSize": 1000 }
}

The response

The envelope changes from data.reportingDataResponse.row to result.rows, and the daily series is renamed. Values are elided:

v5

{
  "data": {
    "reportingDataResponse": {
      "row": [
        {
          "metadata": { "campaignId": <id>, "campaignName": "…" },
          "granularity": [
            {
              "date": "2026-10-01",
              "localSpend": { "amount": "…", "currency": "…" },
              "impressions": …, "taps": …,
              "totalInstalls": …, "tapInstalls": …, "viewInstalls": …
            }
          ]
        }
      ]
    }
  },
  "pagination": { "totalResults": … }
}

Platform API

{
  "result": {
    "rows": [
      {
        "metadata": {
          "id": <id>,
          "name": "…",
          "promotedObjectType": "APPSTORE_APP",
          "promotedObjectId": "<adamId>",
          "status": "ENABLED",
          "deleted": false,
          "dailyBudget": { "value": { "amount": "…", "currency": "…" } },
          "bidStrategy": { "bidStrategyType": "…" },
          "startTime": "…", "endTime": "…"
        },
        "totalMetrics": { "localSpend": { … }, "impressions": …, … },
        "granularMetrics": [
          {
            "date": "2026-10-01",
            "localSpend": { "amount": "…", "currency": "…" },
            "impressions": …, "taps": …,
            "totalInstalls": …, "tapInstalls": …, "viewInstalls": …
          }
        ]
      }
    ]
  },
  "pagination": { "offset": 0, "pageSize": …, "totalCount": … }
}
  • metadata.campaignId and metadata.campaignName become metadata.id and metadata.name. The campaign id is only in metadata.id.
  • granularity[] becomes granularMetrics[], and each row also has totalMetrics for the window.
  • The metric names you already read are the same: localSpend{amount, currency}, impressions, taps, totalInstalls, tapInstalls, viewInstalls. Rows also carry ttr, cpt, cpm, new downloads and redownloads, and pre-orders.
  • A day with no spend can come back without localSpend. Read a missing localSpend as zero in the account's currency, not as missing data.
  • Times in the report metadata came back shifted into the account's time zone, while GET /campaigns/{id} returns the same campaign's times without a zone (UTC). Take schedules from the campaign read, not from the report (observed).
  • Daily spend, impressions, taps and installs for the same days matched what v5 returned for the same campaign (observed).

Edge cases that turn into wrong numbers

Each of these either reads as zero or fails on a request that looks right.

  • What you see: Code that reads result.rows.length throws, or a window with no delivery is skipped

    What is going on: An empty report is result: {} with no rows key (observed), not result.rows: []. Treat a missing rows key as zero rows.

  • What you see: 400 INVALID_FIELD_ATTRIBUTE on a campaign filter

    What is going on: The documentation says to filter on campaignId; the API rejects it (observed). The field is id with a string value. For the whole account, send no filter at all.

  • What you see: A one-day request returns rows but no daily series

    What is going on: A one-day window is sent without granularity, and that day's figures arrive in totalMetrics instead of granularMetrics. Read totalMetrics as that day.

  • What you see: A long backfill is rejected

    What is going on: A DAILY request can span 90 days at most, both ends included — one day less than v5 accepted. Split the range into 90-day windows and ask once per window.

  • What you see: A deleted campaign's spend is missing

    What is going on: Whether deleted campaigns appear in the account-wide report is not confirmed. Our connector lists deleted campaigns (deleted EQUALS true on POST /campaigns/query) and asks again by id for any that changed during the window and are not in the rows. Asking by id for a campaign deleted before the window returned 200 with result: {}, not 404 (observed).

Empty report (observed):

{ "result": {}, "pagination": { "offset": 0, "pageSize": 0, "totalCount": 0 } }

Filtering on campaignId (observed):

HTTP 400
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": [
      {
        "code": "INVALID_FIELD_ATTRIBUTE",
        "message": "Filters contain unsupported fields campaignId",
        "info": { "invalidFields": ["campaignId"], "fields": ["filters[0].field"] }
      }
    ]
  }
}

Reading every page

  • Reports return pagination.totalCount. Stop when a page comes back empty, or when the rows you have reach totalCount; if there is no totalCount, stop on a page shorter than pageSize.
  • List endpoints (POST /campaigns/query and the like) are different: they return no totalCount, and pageSize in the response is the number of items returned, not what you asked for. Read lists until a page comes back empty.
  • Put a ceiling on the number of pages and fail when you reach it. Returning the rows you have so far would store the days you did not reach as zero spend and zero installs.

A campaign report reader that splits the range into 90-day windows, handles the one-day case and the empty report, and pages to the end. Node 18+, no dependencies; token comes from the usual client-credentials call:

const API = "https://api.ads.apple.com/v1";
const DAY = 86_400_000;

// DAILY covers at most 90 days per request, both ends included.
function windows(since, until) {
  const out = [];
  const end = Date.parse(`${until}T00:00:00Z`);
  for (let t = Date.parse(`${since}T00:00:00Z`); t <= end; t += 90 * DAY) {
    const last = Math.min(t + 89 * DAY, end);
    out.push([new Date(t).toISOString().slice(0, 10), new Date(last).toISOString().slice(0, 10)]);
  }
  return out;
}

export async function campaignReport({ token, adAccountId, since, until }) {
  const pageSize = 1000;
  const days = [];
  for (const [start, end] of windows(since, until)) {
    const oneDay = start === end;
    const rows = [];
    for (let page = 0; ; page++) {
      if (page >= 50) throw new Error("report did not end; not returning a partial window");
      const res = await fetch(`${API}/reports/apps/campaigns/query`, {
        method: "POST",
        headers: {
          authorization: `Bearer ${token}`,
          "x-ap-context": `adAccountId=${adAccountId}`,
          "content-type": "application/json",
        },
        body: JSON.stringify({
          timeRange: { start, end, timeZone: "ORTZ", ...(oneDay ? {} : { granularity: "DAILY" }) },
          pagination: { offset: rows.length, pageSize },
        }),
      });
      if (!res.ok) throw new Error(`report: ${res.status} ${await res.text()}`);
      const body = await res.json();
      const got = body.result?.rows ?? []; // an empty report is result: {}
      rows.push(...got);
      const total = body.pagination?.totalCount;
      if (got.length === 0 || (total != null ? rows.length >= total : got.length < pageSize)) break;
    }
    for (const r of rows) {
      // A one-day window has no granularMetrics; the day is in totalMetrics.
      const series = oneDay ? (r.totalMetrics ? [{ ...r.totalMetrics, date: start }] : []) : (r.granularMetrics ?? []);
      for (const d of series) days.push({ campaignId: String(r.metadata?.id), ...d });
    }
  }
  return days;
}

Keyword and search term reports

v5Platform API
Keyword reportPOST /reports/campaigns/{id}/keywords with returnRowTotals: truePOST /v1/reports/apps/keywords/query with filters campaignId EQUALS (a number), the same timeRange rules (ORTZ, 90-day DAILY windows, no granularity for one day). Rows: metadata{id, text, matchType, adGroupId} plus totalMetrics
Search term reportPOST /reports/campaigns/{id}/searchtermsPOST /v1/reports/apps/searchterms/query with campaignId EQUALS and timeZone ORTZ, the same window rules. The term is metadata.searchTermText. One term can come back split across keywords and ad groups; sum by term

These two follow Apple's documentation and have not been run against a live account yet. The documentation also asked for campaignId on the campaign report, which the API rejected, so if a keyword or search term request returns 400 INVALID_FIELD_ATTRIBUTE, check the filter field first. Empty results are result: {} here too.

Rate limits

  • Every response carries ratelimit-limit, ratelimit-remaining and ratelimit-reset headers (they came back lowercase). A 429 carries Retry-After; when it is missing, wait for ratelimit-reset.
  • On our read-only calls the report endpoint reported a lower limit than the campaign, ad group and keyword queries. Asking once per 90-day window for the whole account, instead of once per campaign, keeps report calls few.
  • Our connector waits out short limits only: a 429 that asks for more than 15 seconds is not retried in place, and the call fails with the time it may be retried.

Check the port against v5 before switching

Until January 26 both APIs answer. Run the new reader next to the old one on the same account and compare spend and installs per campaign per day. The bar we set before switching was two weeks with no difference. To find the report calls in your code, paste it into the check tool, and for everything else that changes, read the shutdown guide.

Paste your code and find the v5 calls →

What else changes when v5 shuts down →

How Loop Marketing handles it

Loop Marketing's Apple Ads connector already reads reports through the Platform API with the cases above handled, and compares them against v5 on our own account. If rewriting an in-house report job is not worth it, connecting the account is the other route.

Free trial. No credit card to begin.