An AdUnitSize represents the size of an ad in an ad unit. This also represents the
environment and companions of a particular ad in an ad unit. In most cases, it is a simple size
with just a width and a height (sometimes representing an aspect ratio).
The full (including companion sizes, if applicable) display string of the size, e.g. "300x250" or "300x250v (180x150)"
isAudio
xsd:boolean
Whether the inventory size is audio. If set to true, Size will be set to "1x1"
and EnvironmentType will be set to EnvironmentType.VIDEO_PLAYER regardless of
user input.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-13 UTC."],[],[],null,["# type AdUnitSize (v202508)\n\n**Service** \n**InventoryService** [SuggestedAdUnitService](/ad-manager/api/reference/v202508/SuggestedAdUnitService.AdUnitSize) **Dependencies** \n[AdUnit](/ad-manager/api/reference/v202508/InventoryService.AdUnit) [AdUnitSize](/ad-manager/api/reference/v202508/InventoryService.AdUnitSize) [getAdUnitSizesByStatement()](/ad-manager/api/reference/v202508/InventoryService#getAdUnitSizesByStatement) \n▼\n**AdUnitSize**\n\nAn `AdUnitSize` represents the size of an ad in an ad unit. This also represents the\nenvironment and companions of a particular ad in an ad unit. In most cases, it is a simple size\nwith just a width and a height (sometimes representing an aspect ratio).\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202508`\n\n| Field ----- ||\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `size` | ` `[Size](/ad-manager/api/reference/v202508/InventoryService.Size)` ` The permissible creative size that can be served inside this ad unit. |\n| ### `environmentType` | ` `[EnvironmentType](/ad-manager/api/reference/v202508/InventoryService.EnvironmentType)` ` The environment type of the ad unit size. The default value is [EnvironmentType.BROWSER](/ad-manager/api/reference/v202508/InventoryService.EnvironmentType#BROWSER). *** ** * ** *** **Enumerations** `BROWSER` : A regular web browser. `VIDEO_PLAYER` : Video players. \u003cbr /\u003e |\n| ### `companions` | ` `[AdUnitSize](/ad-manager/api/reference/v202508/InventoryService.AdUnitSize)`[]` The companions for this ad unit size. Companions are only valid if the environment is [EnvironmentType.VIDEO_PLAYER](/ad-manager/api/reference/v202508/InventoryService.EnvironmentType#VIDEO_PLAYER). If the environment is [EnvironmentType.BROWSER](/ad-manager/api/reference/v202508/InventoryService.EnvironmentType#BROWSER) including companions results in an error. |\n| ### `fullDisplayString` | ` `xsd:`string` The full (including companion sizes, if applicable) display string of the size, e.g. `\"300x250\"` or `\"300x250v (180x150)\"` |\n| ### `isAudio` | ` `xsd:`boolean` Whether the inventory size is audio. If set to true, `Size` will be set to `\"1x1\"` and `EnvironmentType` will be set to [EnvironmentType.VIDEO_PLAYER](/ad-manager/api/reference/v202508/InventoryService.EnvironmentType#VIDEO_PLAYER) regardless of user input. |"]]