Size
Stay organized with collections
Save and categorize content based on your preferences.
Represents the dimensions of an AdUnit, LineItem, or Creative.
JSON representation |
{
"width": integer,
"height": integer,
"sizeType": enum (SizeType )
} |
Fields |
width |
integer
Required. The width of the Creative, AdUnit , or LineItem.
|
height |
integer
Required. The height of the Creative, AdUnit , or LineItem.
|
sizeType |
enum (SizeType )
Required. The SizeType of the Creative, AdUnit , or LineItem.
|
SizeType
The different Size types for an ad.
Enums |
SIZE_TYPE_UNSPECIFIED |
Default value. This value is unused. |
PIXEL |
Dimension based size, an actual height and width in pixels. |
ASPECT_RATIO |
Size is expressed as a ratio. For example, 4:1 could be met by a 100 x 25 sized image. |
INTERSTITIAL |
Out-of-page (Interstitial) size that is not related to the slot it is served. This must be used with 1x1 size. |
IGNORED |
Size is ignored. This must be used with 1x1 size. |
NATIVE |
Native size, which is a function of the how the client renders the creative. This must be used with 1x1 size. |
FLUID |
Fluid size. Automatically sizes the ad by filling the width of the enclosing column and adjusting the height as appropriate. This must be used with 1x1 size. |
AUDIO |
Audio size. Used with audio ads. This must be used with 1x1 size. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eSizeType represents the dimensions of an AdUnit, LineItem, or Creative and has required fields for width, height, and size type.\u003c/p\u003e\n"],["\u003cp\u003eThere are different size types for ads, including pixel, aspect ratio, interstitial, ignored, native, fluid, and audio, each with its own specific use case.\u003c/p\u003e\n"]]],[],null,["# Size\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [SizeType](#SizeType)\n\nRepresents the dimensions of an AdUnit, LineItem, or Creative.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"width\": integer, \"height\": integer, \"sizeType\": enum (/ad-manager/api/beta/reference/rest/v1/Size#SizeType) } ``` |\n\n| Fields ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `width` | `integer` Required. The width of the Creative, [AdUnit](/ad-manager/api/beta/reference/rest/v1/networks.adUnits#AdUnit), or LineItem. |\n| `height` | `integer` Required. The height of the Creative, [AdUnit](/ad-manager/api/beta/reference/rest/v1/networks.adUnits#AdUnit), or LineItem. |\n| `sizeType` | `enum (`[SizeType](/ad-manager/api/beta/reference/rest/v1/Size#SizeType)`)` Required. The SizeType of the Creative, [AdUnit](/ad-manager/api/beta/reference/rest/v1/networks.adUnits#AdUnit), or LineItem. |\n\nSizeType\n--------\n\nThe different Size types for an ad.\n\n| Enums ||\n|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `SIZE_TYPE_UNSPECIFIED` | Default value. This value is unused. |\n| `PIXEL` | Dimension based size, an actual height and width in pixels. |\n| `ASPECT_RATIO` | Size is expressed as a ratio. For example, 4:1 could be met by a 100 x 25 sized image. |\n| `INTERSTITIAL` | Out-of-page (Interstitial) size that is not related to the slot it is served. This must be used with 1x1 size. |\n| `IGNORED` | Size is ignored. This must be used with 1x1 size. |\n| `NATIVE` | Native size, which is a function of the how the client renders the creative. This must be used with 1x1 size. |\n| `FLUID` | Fluid size. Automatically sizes the ad by filling the width of the enclosing column and adjusting the height as appropriate. This must be used with 1x1 size. |\n| `AUDIO` | Audio size. Used with audio ads. This must be used with 1x1 size. |"]]