POST /v3/audience/query/advertiser → Advertiser.audiences

Overview

Property Value
REST endpoint POST /v3/audience/query/advertiser
GraphQL query Advertiser.audiences
Return type AudiencesConnection

Request and filter field mapping

REST field GraphQL argument GraphQL type Required Notes
AdvertiserId Parent: Query.advertiser(id: ID!) N/A Required Enter via advertiser(id: "<advertiser-id>") { audiences(...) }.
SearchTerms where AudienceFilterInput Optional Map each term to name, id, or description filters (e.g. where: { name: { contains: "retail" } }). REST requires every term to match across ID/name/description.
SortFields order [AudienceSortInput!] Optional Sort keys: id, name, description, lastUpdatedAt.
PageStartIndex after String Optional N/A
PageSize first Int Optional N/A

Response field mapping

REST response field GraphQL field GraphQL type Nullable Notes
Result nodes [Audience!] Nullable N/A
Result.AdvertiserId nodes.advertiser.id ID! Not nullable N/A
Result.AudienceId nodes.id ID! Not nullable N/A
Result.AudienceName nodes.name String! Not nullable N/A
Result.Description nodes.description String Nullable N/A
Result.IncludedDataGroupIds nodes.targetingDataGroups.edges[included=true].node.id [ID!]! Not nullable N/A
Result.ExcludedDataGroupIds nodes.targetingDataGroups.edges[included=false].node.id [ID!]! Not nullable N/A
Result.LastUpdatedAtUTC nodes.lastUpdatedAt DateTime! Not nullable N/A
Result.IsAutoGenerated nodes.isAutoGenerated Boolean! Not nullable N/A
Result.GeoForCounts N/A N/A N/A Deprecated on REST
Result.UniqueUserCount N/A N/A N/A Deprecated on REST
Result.PersonsCount N/A N/A N/A Deprecated on REST
Result.HouseholdCount N/A N/A N/A Deprecated on REST
Result.SuccessfullyRetrievedCounts N/A N/A N/A Deprecated on REST
ResultCount N/A N/A N/A N/A
TotalFilteredCount totalCount Int! Not nullable N/A
TotalUnfilteredCount N/A N/A N/A N/A

Code examples

REST example

POST /v3/audience/query/advertiser HTTP/1.1
Content-Type: application/json
TTD-Auth: AUTH_TOKEN_PLACEHOLDER

{
  "AdvertiserId": "<advertiser-id>",
  "SearchTerms": ["retail"],
  "PageStartIndex": 0,
  "PageSize": 25
}

GraphQL example

POST /graphql HTTP/1.1
Content-Type: application/json
TTD-Auth: AUTH_TOKEN_PLACEHOLDER
query AdvertiserAudiences {
  advertiser(id: "<advertiser-id>") {
    audiences(
      first: 25
      where: { name: { contains: "retail" } }
    ) {
      nodes {
        id
        name
        description
        lastUpdatedAt
        isAutoGenerated
      }
      totalCount
      pageInfo {
        hasNextPage
        endCursor
      }
    }
  }
}