- Helper Methods
- adSizes
adSizes
This helper method will return the ids and names of the different ad sizes in Adbeat's database.
Note: IDs returned by this method are subject to change at any time. So it's best not to "hardcode" these IDs into your applications.
Request Cost: 1 unit, Result Cost: none
URL Format
http://api.adbeat.com/v3/{api-key}/adSizes
http://api.adbeat.com/v3/{api-key}/adSizes/{adSizeId}
Parameters
Parameter Name |
Meaning |
Default Value |
Notes |
adSizeId |
filter |
(no filtering) |
Returns results for this specific ad size. |
Return Fields
Field Name |
Example |
Notes |
adSizeId |
300x250 |
ID used for other API requests. |
adSizeName |
300x250 |
User-friendly name for display in UI. |
apiUnits |
1 |
The number of API units consumed by this request. |
Usage Example(s)
To get a list of all ad sizes do this:
http://api.adbeat.com/v3/{api-key}/adSizes
JSON Response
{
"statusCode": 200,
"numHits": 26,
"hits": [{
"adSizeName": "120x240",
"adSizeId": "120x240"
}, {
"adSizeName": "120x600",
"adSizeId": "120x600"
}, {
"adSizeName": "125x125",
"adSizeId": "125x125"
}, {
"adSizeName": "160x600",
"adSizeId": "160x600"
}, {
"adSizeName": "168x28",
"adSizeId": "168x28"
}, {
"adSizeName": "168x42",
"adSizeId": "168x42"
}, {
"adSizeName": "180x150",
"adSizeId": "180x150"
}, {
"adSizeName": "192x53",
"adSizeId": "192x53"
}, {
"adSizeName": "200x200",
"adSizeId": "200x200"
}, {
"adSizeName": "216x36",
"adSizeId": "216x36"
}, {
"adSizeName": "216x54",
"adSizeId": "216x54"
}, {
"adSizeName": "234x60",
"adSizeId": "234x60"
}, {
"adSizeName": "240x400",
"adSizeId": "240x400"
}, {
"adSizeName": "250x250",
"adSizeId": "250x250"
}, {
"adSizeName": "300x100",
"adSizeId": "300x100"
}, {
"adSizeName": "300x250",
"adSizeId": "300x250"
}, {
"adSizeName": "300x50",
"adSizeId": "300x50"
}, {
"adSizeName": "300x600",
"adSizeId": "300x600"
}, {
"adSizeName": "300x75",
"adSizeId": "300x75"
}, {
"adSizeName": "320x50",
"adSizeId": "320x50"
}, {
"adSizeName": "336x280",
"adSizeId": "336x280"
}, {
"adSizeName": "468x60",
"adSizeId": "468x60"
}, {
"adSizeName": "720x300",
"adSizeId": "720x300"
}, {
"adSizeName": "728x90",
"adSizeId": "728x90"
}, {
"adSizeName": "Other",
"adSizeId": "other"
}, {
"adSizeName": "Unknown",
"adSizeId": "unknown"
}],
"apiUnits": 1,
"statusMsg": "successful adSizes request",
"requestParameters": {},
"handler": "adSizes"
}
You can also get a the name of a specific ad size by passing the adSizeId
like this:
http://api.adbeat.com/v3/{api-key}/adSizes/300x250
JSON Response
{
"statusCode": 200,
"numHits": 1,
"hits": [{
"adSizeName": "300x250",
"adSizeId": "300x250"
}],
"apiUnits": 1,
"statusMsg": "successful adSizes/300x250 request",
"requestParameters": {
"adSizeId": "300x250"
},
"handler": "adSizes"
}