M
MesmerTools
GET/v1/facebook/adLibrary/ad

Ad detail API

Single-ad detail by `ad_archive_id` (or an Ad Library URL containing `?id=…`). Unlike the list endpoints, the response uses **camelCase** top-level keys — `adArchiveID`, `pageID`, `isActive`, etc. — while `snapshot.*` stays snake_case.

Authentication

Include x-api-key: <your_key> in your request headers
Requests without a valid key get a 401 Unauthorized. Revoked keys return 403 Forbidden.
Get a key

Parameters

idEither/Or
string
Ad archive id (digits-only string). One of id or url is required.
urlEither/Or
string
Ad Library URL containing ?id=<n>.
get_transcriptOptional
boolean
Reserved for future video-transcript enrichment. Currently a no-op.
trimOptional
boolean
Drop snapshot.images/videos/cards.
You must supply one of id or url.

Example request

curl "https://mesmer.tools/api/v1/facebook/adLibrary/ad?id=1234567890123456" \
  -H "x-api-key: <YOUR_API_KEY>"

Try it now

Hits the live endpoint with your API key.

Saved locally in your browser. Mint a key in /admin/api-keys.

Response schema

Trimmed example — see Field reference for descriptions.

{
  "success": true,
  "credits_remaining": -1,
  "adArchiveID": "1234567890123456",
  "pageID": "232540286768801",
  "pageName": "Notion",
  "isActive": true,
  "startDate": 1775520000,
  "startDateString": "2026-04-04",
  "endDate": null,
  "endDateString": null,
  "publisherPlatform": [
    "facebook",
    "instagram"
  ],
  "snapshot": {
    "body": {
      "text": "Meet Notion AI — your second brain..."
    },
    "page_name": "Notion",
    "page_profile_picture_url": "https://...jpg",
    "cta_text": "Try for free",
    "link_url": "https://www.notion.so/product/ai",
    "images": [
      {
        "original_image_url": "https://...jpg",
        "resized_image_url": "https://...jpg"
      }
    ],
    "videos": [],
    "cards": []
  },
  "totalActiveTime": 1814400,
  "currency": "",
  "url": "https://www.facebook.com/ads/library/?id=1234567890123456"
}

Field reference

Top-level response fields you'll most likely use.

adArchiveID
string
Stable Ad Library archive id.
pageID
string
Advertiser's Facebook Page id.
pageName
string
Display name of the advertiser Page.
isActive
boolean
Whether the ad is currently running.
startDate
number
Unix epoch seconds — first-shown date.
endDate
number
Unix epoch seconds — last-shown date (null if active).
publisherPlatform
string[]
Surfaces — lowercase strings here ("facebook", "instagram").
snapshot
object
Creative payload — body text, images, videos, cta, link, cards. snake_case keys inside.
url
string
Public Ad Library URL for this archive id.
totalActiveTime
number
Seconds the ad has been active total.