back to API documentation

POST /api/v1/scan

Validate an HTML5 ad creative and receive a comprehensive analysis report.

Overview

The /scan endpoint performs thorough validation of your ad creative ZIP file. It analyzes the creative against over 40 checks including IAB standards, clickTag detection, file size limits, backup image requirements, animation specifications, SSL/HTTPS compliance, and accessibility standards.

The scan is non-destructive; no changes are made to your file. The endpoint returns analysis data only, making it ideal for validation workflows and compliance checking.

Request

Endpoint

POST https://adloom.io/api/v1/scan

Authentication

Include your API key in the request header:

X-API-Key: adl_your_api_key_here

Content type

Requests must use multipart/form-data encoding.

Parameters

file (required)

Type: File (ZIP)

Your ad creative as a ZIP file. Must contain an index.html at the root or in a subdirectory. Maximum total size 2 MB; initial load (HTML, CSS, JS) maximum 150 KB.

target_platform (optional)

Type: String

The target ad platform. If not specified, the scan will detect clickTags for all supported platforms. Valid values:

cm360, dv360, amazon_ad_server, adform, equativ, innovid, thetradedesk, amazon_dsp, yahoo_dsp, stackadapt, mediasmart

Example requests

Using curl

curl -X POST https://adloom.io/api/v1/scan \
  -H "X-API-Key: adl_your_api_key_here" \
  -F "file=@creative.zip" \
  -F "target_platform=cm360"

Using JavaScript/Node.js

const fs = require('fs');

const formData = new FormData();
formData.append('file', fs.createReadStream('creative.zip'));
formData.append('target_platform', 'cm360');

const response = await fetch('https://adloom.io/api/v1/scan', {
  method: 'POST',
  headers: {
    'X-API-Key': 'adl_your_api_key_here'
  },
  body: formData
});

const report = await response.json();
console.log(report);

Response

Status code

200 OK on success

Response fields

success

Type: Boolean

Indicates whether the scan was successful.

report

Type: Object

Contains the detailed validation report with the following fields:

filename (string): Original filename of the uploaded ZIP
targetPlatform (string): The platform specified in the request or detected platform
dimensions (object): Object with width and height properties detected from the creative
fileSize (number): Total ZIP file size in KB
entryFile (string): Path to the entry HTML file detected in the creative
score (number): Overall score from 0 to 100 indicating creative quality and compliance
clicktag (object): Contains clickTag analysis with: detected (boolean), type (string, e.g., "cm360"), variable (string, the variable name)
tests (array): Validation checks performed. Each test contains: category, name, status ("pass", "warn", or "fail"), expected, actual, and detail
categories (array): Summary of results grouped by category with key, label, and score
meta (object): Metadata including fileCount, hasBackupImage, hasMetaAdSize, and usesHttps

usage

Type: Object

Contains quota information with: used (number of scans used this month), limit (your monthly scan limit)

durationMs

Type: Number

Time taken to perform the scan in milliseconds.

Example response

{
  "success": true,
  "report": {
    "filename": "creative.zip",
    "targetPlatform": "cm360",
    "dimensions": {
      "width": 300,
      "height": 250
    },
    "fileSize": 145.2,
    "entryFile": "index.html",
    "score": 92,
    "clicktag": {
      "detected": true,
      "type": "cm360",
      "variable": "clickTag"
    },
    "tests": [
      {
        "category": "clicktag",
        "name": "ClickTag detected",
        "status": "pass",
        "expected": "ClickTag present",
        "actual": "ClickTag found (cm360 format)",
        "detail": ""
      },
      {
        "category": "weight",
        "name": "Initial load under 150KB",
        "status": "pass",
        "expected": "< 150 KB",
        "actual": "145.2 KB",
        "detail": ""
      },
      {
        "category": "backup",
        "name": "Backup image exists",
        "status": "pass",
        "expected": "Backup image required",
        "actual": "backup.jpg found",
        "detail": ""
      }
    ],
    "categories": [
      { "key": "structure", "label": "File structure", "score": 100 },
      { "key": "weight", "label": "Weight and size", "score": 95 },
      { "key": "clicktag", "label": "ClickTag", "score": 100 },
      { "key": "ssl", "label": "SSL and security", "score": 100 },
      { "key": "backup", "label": "Backup image", "score": 100 },
      { "key": "technology", "label": "Technology", "score": 90 },
      { "key": "dimensions", "label": "Dimensions", "score": 100 },
      { "key": "animation", "label": "Animation", "score": 85 },
      { "key": "accessibility", "label": "Accessibility", "score": 80 }
    ],
    "meta": {
      "fileCount": 5,
      "hasBackupImage": true,
      "hasMetaAdSize": true,
      "usesHttps": true
    }
  },
  "usage": {
    "used": 251,
    "limit": 1000
  },
  "durationMs": 245
}

Supported platforms

The /scan endpoint supports clickTag detection for 12 ad platforms across ad servers and DSPs.

Ad servers

cm360 - Google Campaign Manager 360
innovid - Innovid
amazon_ad_server - Amazon Ad Server
adform - Adform
equativ - Equativ (formerly Smart AdServer)

DSPs

dv360 - Google Display and Video 360 (DV360)
thetradedesk - The Trade Desk
amazon_dsp - Amazon DSP
yahoo_dsp - Yahoo DSP
stackadapt - StackAdapt
mediasmart - Mediasmart

Error handling

For detailed information on error responses, see the error handling guide.

400 Bad request

Missing or invalid file upload

401 Unauthorized

Invalid or missing API key

403 Forbidden

Your plan does not support this operation

422 Unprocessable entity

No index.html found in ZIP or invalid ZIP structure

429 Too many requests

Monthly scan quota exceeded

500 Server error

An internal server error occurred