API Documentation

Integrate AdScan ad tracking, boards, and company intelligence into your applications.

Authentication

All requests require an API key sent via the Authorization header:

Authorization: Bearer adscan_live_your_api_key_here

Create and manage API keys below or from the API Keys page in your dashboard.

Your API Keys

Base URL

https://adscan.ai/api/v1/trpc

All endpoint paths below are appended to this base URL.

Making Requests

AdScan uses the tRPC protocol. Each procedure is available at:

/api/v1/trpc/<router>.<procedure>

Encoding

Both raw JSON and {"json": { ... }}-wrapped input are accepted on all endpoints. The examples below use raw JSON for brevity.

Queries (read data)

Use GET with your parameters JSON-encoded in the input query parameter:

# No parameters
GET /api/v1/trpc/boards.list
Authorization: Bearer adscan_live_...

# With parameters (URL-encode the JSON)
GET /api/v1/trpc/brandSpy.getOverview?input={"companyName":"nike.com"}
Authorization: Bearer adscan_live_...

Mutations (write data)

Use POST with a JSON body:

POST /api/v1/trpc/boards.create
Authorization: Bearer adscan_live_...
Content-Type: application/json

{ "name": "My Board" }

Endpoints

Boards

GETboards.listList all your boards
POSTboards.createCreate a new board
POSTboards.updateUpdate board name or order
POSTboards.removeDelete a board
POSTboards.updateSlugSet a custom URL slug
POSTboards.updateDescriptionUpdate board description
POSTboards.togglePublicMake a board public or private
GETboards.checkSlugAvailabilityCheck if a slug is available

Ads (Saved)

GETads.listSearch and filter your saved ads (ads you've saved to boards via the extension or API). For discovering new ads, use brandSpy endpoints.
GETads.getDetailsGet full ad details by hash
POSTads.addToBoardSave an ad to a board
POSTads.removeFromBoardRemove an ad from a board
POSTads.deletePermanently delete an ad
GETads.listBoardsContainingFind which boards contain an ad
GETads.getFilterValuesGet available filter options
GETads.listTopCompaniesSearch advertisers by name to find the exact company name for brandSpy queries
GETads.getClonePayloadGet AI clone payload for an ad

Companies

POSTcompanies.followFollow a company for notifications
POSTcompanies.unfollowUnfollow a company
GETcompanies.listFollowedList companies you follow
GETcompanies.isFollowingCheck if you follow a company

Brand Spy (Ad Discovery & Competitor Intelligence)

GETbrandSpy.listTopAdvertisersDiscover top advertisers globally ranked by reach. Accepts optional search and limit params.
GETbrandSpy.getOverviewFull competitor overview: stats, demographics, media breakdown, top ads, and landing pages
GETbrandSpy.getAdCopiesRanked ad copy texts with performance scores, reach, and run duration
GETbrandSpy.getHeadlinesRanked headlines with performance scores (same filters as getAdCopies)
GETbrandSpy.getLandingPagesLanding page distribution — which URLs a competitor drives traffic to
GETbrandSpy.getTimelineAd launch timeline with thumbnails
GETbrandSpy.getHeaderBrand header info (logo, name, total ads, total reach)

Notifications

GETnotifications.listList your notifications
GETnotifications.unreadCountGet unread notification count
POSTnotifications.markReadMark notifications as read
GETnotifications.listRulesList notification rules
POSTnotifications.upsertRuleCreate or update a notification rule
POSTnotifications.deleteRuleDelete a notification rule

Teams

GETteams.listList your teams
GETteams.getGet team details
POSTteams.createCreate a new team
POSTteams.updateUpdate team settings
POSTteams.deleteDelete a team
GETteams.listMembersList team members
POSTteams.inviteByEmailInvite a user by email
POSTteams.removeMemberRemove a team member

API Keys

GETapiKeys.listList your API keys
POSTapiKeys.createCreate a new API key
POSTapiKeys.revokeRevoke an API key

AI Images

GETaiImages.listList your generated AI images
POSTaiImages.deleteDelete a generated image

Clone Products

GETcloneProducts.listList your products
GETcloneProducts.getGet a specific product
POSTcloneProducts.createCreate a new product
POSTcloneProducts.updateUpdate a product
POSTcloneProducts.deleteDelete a product
POSTcloneProducts.setDefaultSet a product as default
POSTcloneProducts.inspectWebsiteInspect a website for product info

Brand Images

GETbrandImages.listList your brand assets
POSTbrandImages.deleteDelete a brand asset

Brand Spy (Ad Discovery & Competitor Research)

The brandSpy.* endpoints let you discover ads and analyze competitors across the entire AdScan database. Unlike ads.list(which only returns ads you've saved), Brand Spy gives you access to all indexed ads.

Company name must match stored name

Brand Spy matching is case-insensitive but must match the stored advertiser name (e.g. "madgicx.com" works but "Madgicx" is a different advertiser with fewer ads). Use ads.listTopCompanies first to find the correct name, then pass it to Brand Spy endpoints.

# Step 1: Find the exact company name
GET /api/v1/trpc/ads.listTopCompanies?input={"name":"madgicx"}
# Returns: { "companies": [{ "name": "madgicx.com", ... }] }

# Step 2: Use the exact name for Brand Spy
GET /api/v1/trpc/brandSpy.getOverview?input={"companyName":"madgicx.com"}

Brand Spy shared filters

All brandSpy.* endpoints (except listTopAdvertisers) accept these filters:

ParameterTypeRequiredDescription
companyNamestringyesExact company name (use ads.listTopCompanies to find it)
dateFromstringnoISO date (e.g. "2025-01-01")
dateTostringnoISO date (e.g. "2025-12-31")
statusstringno"active", "inactive", or "all"
mediaTypestringno"image", "video", or "all"
languagestringnoLanguage code filter

Additional parameters by endpoint

EndpointExtra paramsReturns
getOverview(shared filters only)Stats, demographics, media breakdown, top 5 ads, top 5 landing pages
getAdCopiessortBy: "adCount" | "reach" | "longestRunning" | "performanceScore", cursor, limitRanked ad copy texts with performance scores
getHeadlinesSame as getAdCopiesRanked headlines with performance scores
getLandingPagessortBy: "adCount" | "distribution", cursor, limitLanding pages with ad count and traffic distribution %
getTimelinetimeRange: "1week" | "1month" | "3months" | "6months" | "1year", cursor, limitTimeline of ad launches with thumbnails
getHeader(shared filters only)Brand name, logo, total ads, total reach
listTopAdvertiserslimit (number), search (string) — no companyName neededTop advertisers ranked by reach with ad counts and platforms

Searching Saved Ads

ads.listonly returns ads you've previously saved to boards (via the Chrome extension or the ads.addToBoard API). To discover new ads across all advertisers, use the Brand Spy endpoints above.

All parameters are optional — combine them freely.

ParameterTypeDescription
searchQuerystringSearch ad copy, headlines, advertiser names, and landing page URLs
boardIdnumber | "ALL"Filter to a specific board, or "ALL" for all your boards
platformsstring[]facebook, instagram, youtube, linkedin, tiktok
formatsstring[]video, image, carousel, dco, dpa, other
companyNamesstring[] | "FOLLOWED"Filter by advertiser names, or "FOLLOWED" for companies you follow
adTypesstring[]Filter by category (use ads.getFilterValues to see available types)
languagesstring[]Filter by language
ctaTypesstring[]Filter by call-to-action text (e.g. "Shop Now", "Learn More")
isPartnershipbooleanFilter for partnership/influencer ads
viewsMin / viewsMaxnumberFilter by estimated reach range
dateFrom / dateTostring (ISO)Filter by date range
sortBystringrecommended, date, views, likes, or comments
limitnumberResults per page (default: 20)
cursornumberPass nextCursor from previous response to get next page

Playground

Test the ads.list endpoint live. Enter your API key, set filters, and hit Send.

curl "https://adscan.ai/api/v1/trpc/ads.list?input=%7B%22limit%22%3A5%7D" \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

Examples

Competitive analysis workflow

Step 1: Find the exact company name using ads.listTopCompanies.

curl 'https://adscan.ai/api/v1/trpc/ads.listTopCompanies?input={"name":"madgicx"}' \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

# Response includes: { "companies": [{ "name": "madgicx.com", "adCount": 322, ... }] }

Step 2: Use the exact name with Brand Spy to get competitor overview.

curl 'https://adscan.ai/api/v1/trpc/brandSpy.getOverview?input={"companyName":"madgicx.com","status":"active"}' \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

Response:

{
  "result": {
    "data": {
      "stats": { "totalAds": 322, "totalReach": 1500000, "imageAds": 200, "videoAds": 122 },
      "mediaTypeBreakdown": { "image": 62, "video": 38 },
      "demographics": { "gender": [...], "country": [...] },
      "topLandingPages": [{ "url": "https://madgicx.com/pricing", "adCount": 45 }],
      "topAds": [{ "id": 1234, "reach": 250000, "body": "..." }]
    }
  }
}

Get top performing ad copy

curl 'https://adscan.ai/api/v1/trpc/brandSpy.getAdCopies?input={"companyName":"madgicx.com","sortBy":"performanceScore","limit":5}' \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

Response:

{
  "result": {
    "data": {
      "copies": [
        {
          "body": "Stop wasting ad spend. Madgicx optimizes your campaigns automatically.",
          "adCount": 12,
          "totalReach": 800000,
          "daysRunning": 90,
          "performanceScore": 95.2
        }
      ],
      "total": 48,
      "hasMore": true,
      "nextCursor": 10
    }
  }
}

Discover top advertisers globally

curl 'https://adscan.ai/api/v1/trpc/brandSpy.listTopAdvertisers?input={"limit":5}' \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

Response:

{
  "result": {
    "data": [
      {
        "advertiserId": 100,
        "company": "nike.com",
        "adCount": 2400,
        "totalViews": 50000000,
        "brandLogo": "https://media.adscan.ai/...",
        "platforms": ["facebook", "instagram"]
      }
    ]
  }
}

List boards

curl 'https://adscan.ai/api/v1/trpc/boards.list' \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

Search your saved ads

ads.listsearches only ads you've saved to boards. Use searchQuery to search across ad copy, headlines, and advertiser names.

curl 'https://adscan.ai/api/v1/trpc/ads.list?input={"searchQuery":"free trial","boardId":"ALL","limit":5}' \
  -H "Authorization: Bearer adscan_live_your_api_key_here"

Create a board

curl -X POST "https://adscan.ai/api/v1/trpc/boards.create" \
  -H "Authorization: Bearer adscan_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "name": "My New Board" }'

Follow a company

curl -X POST "https://adscan.ai/api/v1/trpc/companies.follow" \
  -H "Authorization: Bearer adscan_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "companyName": "Nike" }'

Error Handling

The API returns standard HTTP status codes:

StatusMeaning
200Success
401Invalid or missing API key
403Not allowed to access this resource
404Resource not found
429Rate limit exceeded
500Internal server error

Error responses include a JSON body with an error object containing a message field.

Rate Limits

API requests are rate-limited to prevent abuse. If you exceed the limit you will receive a 429 response. Contact support if you need higher limits for your integration.

Support

Questions or issues? Reach us at [email protected]