API Referencev1
Stable Release

InspectAd API

Integrate compliance checks directly into your ad creation pipeline. Check text, images, and landing pages against platform advertising policies with a single API call.

Agency plan required: API access is exclusively available to Agency plan subscribers. Upgrade your plan to generate API keys and use these endpoints.
Get API Key
Quick Startbash
curl -X POST https://inspectad.com/api/v1/check-text \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Lose 30 lbs in 2 weeks!",
    "platforms": ["meta"]
  }'

Authentication

The InspectAd API uses API keys for authentication. Include your key in the Authorization header as a Bearer token.

Generate keys from your Settings → API page. Keys are shown once at creation — store them securely.

Security: Never expose API keys in client-side code, public repos, or browser requests. Use environment variables or a secrets manager.
Example Requestbash
curl https://inspectad.com/api/v1/usage \
  -H "Authorization: Bearer sk_live_abc123def456..."

Base URL

All API endpoints are relative to the base URL below. All responses are JSON. CORS headers are included for server-to-server usage.

Base URLtext
https://inspectad.com/api/v1

Rate Limits

API requests are subject to rate limits (requests per minute) and plan-based usage limits (checks per month). Every response includes a usage object.

LimitValue
API requests300/min
Text checksPer plan
Image analysesPer plan
Landing page checksPer plan
Rate Limit Headersjson
HTTP/1.1 429 Too Many Requests
Retry-After: 30

{
  "error": "rate_limited",
  "message": "Too many requests. Retry after 30s."
}

Check Text

Analyze ad copy against platform advertising policies. Returns compliance findings, a pass/warn/fail decision, confidence score, and AI-generated compliant alternatives.

POST/api/v1/check-text

Parameters

textrequired
string

Ad copy to analyze (20–2,000 characters)

platformsrequired
string[]

Target platforms: "meta", "tiktok", "x", "youtube", "linkedin"

tone
string

Tone for suggestions: "Neutral", "Friendly", "Professional", "Playful" (default: "Neutral")

Requestbash
curl -X POST https://inspectad.com/api/v1/check-text \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Lose 30 lbs in 2 weeks with our miracle pill!",
    "platforms": ["meta", "tiktok"],
    "tone": "Neutral"
  }'
Responsejson
{
  "decision": "fail",
  "confidence": 92,
  "findings": [
    {
      "severity": "Fail",
      "snippet": "Lose 30 lbs in 2 weeks",
      "reason": "Unrealistic weight loss claims violate Meta Ad Standards.",
      "platform": "meta"
    }
  ],
  "suggestions": [
    "Transform your wellness journey — sustainable results you'll love."
  ],
  "platforms": ["meta", "tiktok"],
  "tone": "Neutral",
  "usage": { "used": 12, "limit": 100, "remaining": 88 }
}

Analyze Image

Analyze ad creatives for compliance issues, text overlay percentage, and platform specification adherence. Supports PNG, JPEG, and WebP up to 10 MB.

POST/api/v1/analyze-image

Parameters

imagerequired
file

Image file (PNG, JPEG, WebP — max 10 MB)

platforms
string

Comma-separated platforms (default: "meta")

Request (multipart/form-data)bash
curl -X POST https://inspectad.com/api/v1/analyze-image \
  -H "Authorization: Bearer sk_live_..." \
  -F "image=@ad-creative.png" \
  -F "platforms=meta,tiktok"
Responsejson
{
  "overallScore": 85,
  "dimensions": { "width": 1080, "height": 1080 },
  "format": "png",
  "fileSize": 524288,
  "textOverlayPercent": 15,
  "textContent": "CINEMATIC IMMERSION — True 4K Brilliance",
  "visualDescription": "Product shot with gradient background...",
  "contentFindings": [...],
  "platforms": ["meta", "tiktok"],
  "usage": { "used": 5, "limit": 25, "remaining": 20 }
}

Analyze Landing Page

Check a landing page for compliance issues — SSL, privacy policy, disclaimers, mobile-friendliness, and content policy violations.

POST/api/v1/analyze-landing-page

Parameters

urlrequired
string

Full URL of the landing page to analyze

Requestbash
curl -X POST https://inspectad.com/api/v1/analyze-landing-page \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/offer" }'
Responsejson
{
  "url": "https://example.com/offer",
  "overallScore": 72,
  "technicalChecks": {
    "hasSSL": true,
    "hasMobileFriendly": true,
    "hasPrivacyPolicy": false,
    "hasTermsOfService": true
  },
  "contentChecks": { ... },
  "issues": [
    {
      "severity": "high",
      "category": "Privacy",
      "message": "No privacy policy link found."
    }
  ],
  "usage": { "used": 2, "limit": -1, "remaining": "unlimited" }
}

Get Usage

Retrieve your current month's usage counts and plan limits across all resource types.

GET/api/v1/usage
Requestbash
curl https://inspectad.com/api/v1/usage \
  -H "Authorization: Bearer sk_live_..."
Responsejson
{
  "plan": "agency",
  "planName": "Agency",
  "period": "2026-02",
  "usage": {
    "textChecks":        { "used": 142, "limit": "unlimited", "remaining": "unlimited" },
    "imageChecks":       { "used": 35,  "limit": "unlimited", "remaining": "unlimited" },
    "landingPageChecks": { "used": 8,   "limit": "unlimited", "remaining": "unlimited" },
    "videoAnalyses":     { "used": 3,   "limit": 20,          "remaining": 17 },
    "bulkChecks":        { "used": 0,   "limit": 100,         "remaining": 100 }
  },
  "platformsPerCheck": 4
}

Platforms

Use these enum values when specifying target platforms in your API calls.

ValuePlatform
metaMeta (Facebook & Instagram)
tiktokTikTok
youtubeYouTube / Google Ads
linkedinLinkedIn
xX (Twitter)
Examplejson
{
  "platforms": ["meta", "tiktok", "youtube"]
}

Error Codes

All errors return a consistent JSON envelope with an error code and human-readable message.

StatusCodeDescription
401authentication_requiredMissing or invalid Authorization header
401invalid_api_keyAPI key is invalid, expired, or revoked
403insufficient_scopeKey doesn't have permission for this endpoint
403plan_upgrade_requiredYour plan doesn't include API access
400validation_errorInvalid request parameters
429limit_exceededMonthly plan usage limit reached
429rate_limitedToo many requests (see Retry-After header)
500internal_errorSomething went wrong on our end
Error Responsejson
{
  "error": "limit_exceeded",
  "message": "Text check limit reached (100/100).",
  "usage": {
    "used": 100,
    "limit": 100,
    "remaining": 0
  },
  "upgradeUrl": "https://inspectad.com/pricing"
}

Code Examples

Full working examples for the most common languages. Replace sk_live_... with your actual API key.

Pythonpython
import requests

API_KEY = "sk_live_..."
BASE = "https://inspectad.com/api/v1"

resp = requests.post(
    f"{BASE}/check-text",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "text": "Limited time offer! Act now!",
        "platforms": ["meta", "tiktok"],
        "tone": "Professional"
    }
)

data = resp.json()
print(f"Decision: {data['decision']}")
print(f"Issues: {len(data['findings'])}")

for f in data["findings"]:
    print(f"  [{f['severity']}] {f['snippet']}")
    print(f"    {f['reason']}")
Node.js / TypeScripttypescript
const API_KEY = process.env.INSPECTAD_API_KEY!;
const BASE = "https://inspectad.com/api/v1";

const res = await fetch(`${BASE}/check-text`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    text: "Limited time offer! Act now!",
    platforms: ["meta", "tiktok"],
  }),
});

const data = await res.json();
console.log(`Decision: ${data.decision}`);
console.log(`Remaining: ${data.usage.remaining}`);