Ad Groups

class ad_api.api.sb.AdGroups(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)

Use the Amazon Advertising API for Sponsored Brands for campaign, ad group, keyword, negative keyword, drafts, Stores, landing pages, and Brands management operations. For more information about Sponsored Brands, see the Sponsored Brands Support Center. For onboarding information, see the account setup topic.

list_ad_groups(self, **kwargs) ApiResponse:

Gets an array of ad groups associated with the client identifier passed in the authorization header, filtered by specified criteria.

Keyword Args
query startIndex:integer | Optional. Sets a cursor into the requested set of campaigns. Use in conjunction with the count parameter to control pagination of the returned array. 0-indexed record offset for the result set, defaults to 0.
query count:integer | Optional. Sets the number of AdGroup objects in the returned array. Use in conjunction with the startIndex parameter to control pagination. For example, to return the first ten ad groups set startIndex=0 and count=10. To return the next ten ad groups, set startIndex=10 and count=10, and so on. Defaults to max page size.
query name:string | Optional. The returned array includes only ad groups with the specified name.
query adGroupIdFilter:string | Optional. The returned array is filtered to include only ad groups with an identifier specified in the comma-delimited list.
query campaignIdFilter:string | Optional. The returned array is filtered to include only ad groups associated with the campaign identifiers in the specified comma-delimited list.
query creativeType:string | Optional. Filter by the type of creative the campaign is associated with. To get ad groups associated with non-video campaigns specify ‘productCollection’. To get ad groups associated with video campaigns, this must be set to ‘video’. Returns all ad groups if not specified. Available values : productCollection, video
Returns:
ApiResponse

### Example python

from ad_api.api.sb.ad_groups import AdGroups

res = AdGroups().list_ad_groups()

print(result)
get_ad_group(self, adGroupId, **kwargs) ApiResponse:

get_ad_group(self, adGroupId, **kwargs) -> ApiResponse

Gets an ad group specified by identifier.

Keyword Args
path adGroupId:number | Required. The identifier of an existing ad group.
Returns:
ApiResponse

### Example python

from ad_api.api.sb.ad_groups import AdGroups

ad_group_id = 144356535815171236

res = AdGroups().get_ad_group(
    adGroupId=ad_group_id
)

print(res)