Facebook API

Facebook Ad details API

Look up a single Meta Ad Library ad by ID or URL and get the advertiser, creative text, call-to-action, platforms, and run dates as clean JSON.

POST/v1/run/facebook.ad_details
Uptime
100.00%
30d · 2 calls
Requests
2
30d · weekly, last 12 wks
Response
1.8s
median · 30d

Pricing

One price, in dollars

Try it

Make your first request

Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
  "data": {
    "active": true,
    "adArchiveId": "a1b2c3d4",
    "ctaText": "A short example description of this item.",
    "currency": "USD",
    "displayFormat": "example",
    "endDate": 42,
    "linkUrl": "https://example.com/page",
    "media": [
      {
        "height": 42,
        "type": "general",
        "url": "https://example.com/page",
        "videoUrl": "https://example.com/page",
        "width": 1024
      }
    ],
    "pageId": "a1b2c3d4",
    "pageName": "Example title",
    "pageProfilePicture": "https://example.com/image.jpg",
    "platforms": [
      "example"
    ],
    "sourceUrl": "https://example.com/page",
    "startDate": 42,
    "text": "A short example description of this item.",
    "title": "Example title"
  },
  "found": true
}
Response interface
interface FacebookAdDetailsResponse {
  data: {
    active?: boolean | null;
    adArchiveId: string;
    ctaText?: string | null;
    currency?: string | null;
    displayFormat?: string | null;
    endDate?: number | null;
    linkUrl?: string | null;
    media?: {
      height?: number;
      type: string;
      url: string;
      videoUrl?: string;
      width?: number;
    }[];
    pageId: string;
    pageName?: string | null;
    pageProfilePicture?: string;
    platforms?: string[] | null;
    sourceUrl: string;
    startDate?: number | null;
    text?: string | null;
    title?: string | null;
  } | null;
  found: boolean;
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

Request, response, and price

Last verified 2026-09-16 · uptime and latency measured over 30d
POST /v1/run/facebook.ad_details
curl -X POST https://api.getanyapi.com/v1/run/facebook.ad_details \
  -H "Authorization: Bearer $ANYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"962050096457659"}'
FieldTypeExample value
Request body
idstring"962050096457659"Meta Ad Library ad ID (e.g. "702369045530963"). Provide either id or url.
urlstringMeta Ad Library ad URL (e.g. "https://www.facebook.com/ads/library?id=1185617869915074"). Provide either id or url.
Response
dataobject
data.activebooleanWhether the ad is currently running.
data.adArchiveIdstringAd Library archive ID (stable identity). Populated whenever the provider has data for the entity.
data.ctaTextstringCall-to-action label. Populated whenever the provider has data for the entity.
data.currencystringSpend currency, may be empty.
data.displayFormatstringAd creative format. Populated whenever the provider has data for the entity.
data.endDateintegerRun end, epoch seconds.
data.linkUrlstringCreative destination URL. Populated whenever the provider has data for the entity.
data.mediaobject[]Creative attached to the ad: one element per image, video, or carousel card, in the order the ad presents them. Empty when the ad has none.
data.media[].heightintegerPixel height of the media item, when the lane reports it.
data.media[].typestringOne of photo, video, or gif.
data.media[].urlstringImage URL. For a video or GIF this is the poster/thumbnail frame.
data.media[].videoUrlstringPlayable video file URL. Present only for video and gif items.
data.media[].widthintegerPixel width of the media item, when the lane reports it.
data.pageIdstringAdvertiser page ID (stable identity). Populated whenever the provider has data for the entity.
data.pageNamestringAdvertiser page name. Populated whenever the provider has data for the entity.
data.pageProfilePicturestringProfile picture of the advertising page. This is the advertiser's identity image, not ad creative.
data.platformsstring[]Publisher platforms the ad runs on. Populated whenever the provider has data for the entity.
data.sourceUrlstringInspectable Meta Ad Library URL for this ad. Populated whenever the provider has data for the entity.
data.startDateintegerRun start, epoch seconds. Populated whenever the provider has data for the entity.
data.textstringAd body text. Populated whenever the provider has data for the entity.
data.titlestringCreative title. Populated whenever the provider has data for the entity.
foundboolean
Price
Price per requestUSD$0.0012
Price /1k reqUSD$1.20

FAQ

About the Facebook Ad details API

The AnyAPI Facebook Ad details API returns Facebook ad details data as normalized JSON from one POST call to /v1/run/facebook.ad_details. Look up a single Meta Ad Library ad by ID or URL and get the advertiser, creative text, call-to-action, platforms, and run dates as clean JSON. AnyAPI returns one normalized schema whichever source serves it. It costs from $1.20 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 100.0% of Facebook ad details calls through AnyAPI succeeded, with a median response time of 1.8 seconds across 2 measured calls.

It costs from $1.20 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.

Look up a single Meta Ad Library ad by ID or URL and get the advertiser, creative text, call-to-action, platforms, and run dates as clean JSON. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 100.0% of Facebook ad details calls through AnyAPI succeeded, with a median response time of 1.8 seconds across 2 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.