Skip to end of metadata
Go to start of metadata

Media Subtype Service

The AppNexus platform categorizes creatives by format, media type, and media subtype. Format defines the resource type of creatives (flash, image, etc.); media type defines the general display style of creatives (banner, expandable, video, etc.); and media subtype defines the specific display style of creatives (standard banner, MediaMind expandable, Standard VAST, etc.).

This read-only service allows you to view all of the supported media subtypes and the media types to which they belong.

To view all supported formats and media types, you can use the Creative Format Service and the Media Type Service.

On This Page

REST API

View all media subtypes:
GET https://api.appnexus.com/media-subtype

View a specific media subtype:
GET https://api.appnexus.com/media-subtype?id=MEDIA_SUBTYPE_ID

View media subtypes that belong to a specific media type:
GET https://api.appnexus.com/media-subtype?media_type.id=MEDIA_TYPE_ID

JSON Fields

Field

Type

Description

id

int

The ID of the media subtype.

name

string

The name of the media subtype, for example, "Standard Banner", "In-Banner Video", or "15-Second VAST".

last_modified

timestamp

The date and time when AppNexus last modified the media subtype.

media_type

object

The media type to which the subtype belongs. See Media Type below for more details.

permitted_sizes

array of objects

The permitted sizes for creatives of the media subtype. See Permitted Sizes below for more details. Note that not all media subtypes have permitted size requirements.

native_assets

array of objects

An array describing constraints on elements of native ads for this media subtype. Elements of a native ad can include the title, body content, and more. The format's constraints could be whether body content is required or recommended, or how long the text may be. See Native Assets below for more details.

Media Type

The media_type object contains the following fields. 

Field

Type

Description

id

int

The ID of media type.

name

string

The name of the media type, for example, "Banner" or "Video".

media_type_group_id

int

The group to which a media type belongs. This information is relevant for setting allowed media types on placements (see Placement Service). Only media types that belong to the same group can be allowed on a single placement.

uses_sizes

enum

The size requirement for creatives belonging to the media type. Possible values:

  • "always" - width and height are required when adding creatives (Banner and Expandable)
  • "sometimes" - width and height are sometimes required when adding creatives (Pop and Text)
  • "never" - width and height are not required when adding creatives (Interstitial, Video, and Skin)

Permitted Sizes

Each object in the permitted_sizes array contains the following fields.

FieldTypeDescription
platform_widthintThe actual rendering width, in pixels, for creatives of this media subtype. This is also the width that appears in reporting.
platform_heightintThe actual rendering height, in pixels, for creatives of this media subtype. This is also the height that appears in reporting.
validate_image_sizebooleanIf true, the image for creatives of this media subtype will be validated against the requirements defined by the following fields in this object: scaling_permitted, aspect_ratio_tolerance, min_image_width, max_image_width, min_image_height, and max_image_height.
scaling_permittedboolean

If true, the image for creatives of this media subtype must have the same aspect ratio as platform_width / platform_height.

If false, the image for creatives of this media subtype must have a width and height exactly matching platform_width and platform_height.

aspect_ratio_tolerancedouble

If validate_image_size and scaling_permitted are both true , the image can deviate from the aspect ratio of platform_width and platform_height by this amount. For example, the aspect ratio for a platform_width and platform_height of 254x133 is 1.19:1. If the aspect_ratio_tolerance is 0.03, an aspect ratio between 1.16:1 and 1.22:1 would be acceptable.

min_image_widthintIf validate_image_size is true, the minimum acceptable image width, in pixels, for creatives of this media subtype.
max_image_widthintIf validate_image_size is true , the maximum acceptable image width, in pixels, for creatives of this media subtype.
min_image_heightintIf validate_image_size is true , the minimum acceptable image height, in pixels, for creatives of this media subtype.
max_image_heightintIf validate_image_size is true , the maximum acceptable image height, in pixels, for creatives of this media subtype.

Native Assets

FieldTypeDescription
native_asset_nameenum

The name of the native asset. This can be one of:

  • "title"
  • "content"
  • "description"
  • "full_text"
  • "context"
  • "icon_img_url"
  • "main_media"
  • "cta"
  • "rating"
  • "click_fallback_url"
min_text_lengthint

The minimum allowable length of the text of the native asset for this media subtype, in characters.

max_text_lengthintThe maximium allowable length of the text of the native asset for this media subtype, in characters.
requirementenumWhether this asset is required by this particular media subtype. This field can contain several levels of "requiredness":
  • "required"
  • "recommended"
  • "optional"

Examples

View all media subtypes
View the "Standard VAST" media subtype (id 64)
View the media subtypes that belong to the "Banner" media type