Skip to main content
GET
Flexible live insights query

Request contract

  • Method and path: GET /apis/v1/ads/insights
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/ads/insights
  • connectionId: query; required
  • objectId: query; optional
  • query: query; optional
  • adAccountId: query; optional
  • reportType: query; optional
  • dataLevel: query; optional
  • dimensions: query; optional
  • metrics: query; optional
  • page: query; optional
  • pageSize: query; optional
  • customerId: query; optional
  • pageToken: query; optional
  • level: query; optional
  • fields: query; optional
  • breakdowns: query; optional
  • actionBreakdowns: query; optional
  • actionAttributionWindows: query; optional
  • actionReportTime: query; optional
  • useUnifiedAttributionSetting: query; optional
  • filtering: query; optional
  • datePreset: query; optional
  • fromDate: query; optional
  • toDate: query; optional
  • timeIncrement: query; optional
  • limit: query; optional
  • after: query; optional
  • Runtime facts: fe60122939c67dc98a3a6ac6b97bd5c326b526105150c8959304dd2160d4dd09
Complete OpenAPI definition Effective request and pricing declaration (including authentication and referenced schemas):

Cost and request rules

A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

connectionId
string
required

The ads connection (adc_...) the request runs on: one of yours, from GET /apis/v1/ads/connections. On a request with a JSON body it may be sent as a top-level body member instead.

Pattern: ^adc_[0-9A-Za-z]+$
objectId
string

Meta only (required there): insights node (act_, campaign id, ad set id or ad id). Must be yours: it is checked through the connection before the request is sent, and an id that is not yours answers not_found.

query
string

Google only (required there): the GAQL SELECT statement to run.

Maximum string length: 10000
adAccountId
string

Google: platform ad account ID (Google customer ID, digits only) when the connection has several Google Ads accounts. TikTok (required there): the advertiser id.

reportType
enum<string>
default:BASIC

TikTok only: report_type.

Available options:
BASIC,
AUDIENCE
dataLevel
enum<string>

TikTok only (required there): data_level.

Available options:
AUCTION_ADVERTISER,
AUCTION_CAMPAIGN,
AUCTION_ADGROUP,
AUCTION_AD
dimensions
string

TikTok only (required there): 1-4 comma-separated TikTok dimensions (e.g. country_code, campaign_id, stat_time_day).

metrics
string

TikTok only (required there): comma-separated TikTok metrics (e.g. reach,impressions,frequency,spend).

page
integer
default:1

TikTok only: page number.

Required range: x >= 1
pageSize
integer
default:100

TikTok only: rows per page.

Required range: 1 <= x <= 1000
customerId
string

Alias of adAccountId, kept for existing callers

pageToken
string

Google only: cursor from paging.nextPageToken of the previous page.

level
enum<string>

Row granularity

Available options:
ad,
adset,
campaign,
account
fields
string

Comma-separated Graph insights fields (e.g. spend,impressions,frequency,website_purchase_roas). Omitted = Meta's default set.

breakdowns
string

Meta only: comma-separated Graph breakdowns (e.g. age,gender or publisher_platform). Returns 400 on TikTok (add the breakdown to dimensions with reportType=AUDIENCE, e.g.

actionBreakdowns
string

Comma-separated Graph action breakdowns; segments the actions[] arrays in each row.

actionAttributionWindows
string

Comma-separated Meta attribution windows. Action values are returned keyed per window.

actionReportTime
string

When actions are counted: impression, conversion or mixed.

useUnifiedAttributionSetting
boolean

Use the ad sets' own attribution settings for action counting.

filtering
string

JSON array of filter objects: [{"field", "operator", "value"}]. Applied server-side by Meta or TikTok (TikTok fields e.g. campaign_ids, adgroup_ids, ad_ids).

datePreset
string

Meta date_preset (e.g. last_7d, last_30d, this_month). Mutually exclusive with fromDate/toDate.

fromDate
string<date>

Start of range (YYYY-MM-DD); requires toDate. Required on TikTok.

toDate
string<date>

End of range (YYYY-MM-DD); requires fromDate.

timeIncrement
string

Days per row (1-90), monthly, or all_days.

limit
integer
default:25

Rows per page

Required range: 1 <= x <= 500
after
string

Cursor from paging.after of the previous page.

Response

Insight rows (raw platform shape)

adAccountId
string

TikTok responses only: the advertiser queried.

customerId
string

Google responses only: the customer the query ran against.

data
object[]
fieldMask
string | null

Google responses only: the selected fields echoed by Google.

objectId
string

Meta responses only.

paging
object