facebook-ad-library/
ad

The Facebook Ad Library Ad API collects one public Facebook Ad Library ad from its ad URL, returning creative text, advertiser context, media, delivery timing, and visible signals as a normalized record.

Facebook Ad Library Ad API

Ad Library URL
Creative and advertiser context
Public delivery signals
0.6 credits / result
Ready
Ready

Enter parameters and send a request. The task status and normalized results will appear here.

README

Facebook Ad Library Ad

Facebook Ad Library ads are public advertising records with creative text, advertiser identity, media, calls to action, delivery timing, active status, and available reach or spend signals. These fields support selected-ad enrichment, creative review, public delivery monitoring, and point-in-time comparison.

Facebook Ad Library Ad API Features

  • Direct Ad Library URL resolutionResolve one public /ads/library URL with a numeric id query parameter into at most one normalized ad record.
  • Creative and advertiser contextReturn the ad archive ID, creative title and text, advertiser Page identity, public Page URL, call to action, and destination link when exposed.
  • Delivery and visible signalsPreserve start and end times, active status, publisher platforms, country context, Page likes, reach, currency, and spend when the public record provides them.
  • Normalized multi-card mediaSelect available snapshot or first-card text for the standard fields and deduplicate image and video assets found across the snapshot and cards without presenting a complete variant table.

Facebook Ad Library Ad API Parameters

ParametersRequiredDescription
urlRequiredRequired public Facebook Ad Library ad URL. Use the canonical https://www.facebook.com/ads/library/?id={numeric_id} form; one request accepts one URL.

How to Use the Facebook Ad Library Ad API

Submit one public Ad Library URL to the Facebook Ad Library Ad API, track the asynchronous task, and read the normalized ad record from the standard result envelope.

  1. Prepare one public Facebook Ad Library URL whose path is /ads/library and whose query contains a numeric id.
  2. Submit url to /v1/facebook-ad-library/ad and capture the returned task_id.
  3. Poll /v1/tasks/{task_id} until the task succeeds or returns a failure.
  4. Read data.results.items; the Facebook Ad Library Ad API returns at most one record, so next_cursor normally remains null and has_more remains false.
curl -X POST "https://api.socq.ai/v1/facebook-ad-library/ad" \
  -H "Authorization: Bearer $SOCQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.facebook.com/ads/library/?id=702369045530963"}'

# Poll GET /v1/tasks/{task_id}
# Read data.results.items; this operation returns at most one item

Facebook Ad Library Ad API Use Cases

  • Enrich a selected ad: Use the archive ID, advertiser identity, creative title, body text, media, CTA, destination URL, and input URL to complete an existing ad record.
  • Review creative assets and destinations: Inspect deduplicated image or video references from the Facebook Ad Library Ad API together with display format, CTA text, CTA type, and the public destination link for a known ad.
  • Review public delivery context: Use active status, start and end times, publisher platforms, country values, and available reach or spend fields to examine the public delivery context.
  • Preserve point-in-time ad snapshots: Store creative, advertiser, delivery, visible signal, input URL, and collected_at fields for later comparison of the same known ad.

Facebook Ad Library Ad API Pro Tips

  • Submit an Ad Library URL with the exact /ads/library path and a numeric id query parameter; Page URLs, Page IDs, post URLs, and raw ad IDs are not accepted inputs.
  • Treat a succeeded task with no record as a valid unavailable or not-found outcome when the submitted URL is syntactically valid.
  • Handle reach, spend, Page likes, media, end_at, advertiser profile URL, CTA, and country values as optional public fields instead of converting missing values to zero.
  • For ads with multiple cards or creatives, use the normalized name and text as representative fields and inspect the deduplicated media list without assuming it is a complete per-variant table.

Beyond the Facebook Ad Library Ad API, use these APIs when you need a different type of public Facebook Ad Library data.

Explore other platforms

Combine Facebook Ad Library data with public data from other supported social platforms.

Facebook Ad Library Ad API — FAQ

Facebook Ad Library Ad API retrieves one public ad from a submitted Ad Library URL. It returns normalized creative text, advertiser context, media, delivery timing, calls to action, and available public signals.

Submit one public URL in the canonical https://www.facebook.com/ads/library/?id={numeric_id} form. The path must be /ads/library and the id query parameter must be numeric.

A record can contain the ad archive ID and URL, creative title and text, advertiser Page fields, media, delivery dates and status, publisher platforms, country values, CTA details, destination URL, Page likes, reach, currency, spend, and collection context.

A syntactically valid URL can point to an unavailable or not-found public ad. In that case, the task can succeed without creating a placeholder result.

The normalized name and text select available snapshot or first-card values, while media contains unique assets found across the snapshot and cards. The record is not a complete table of every creative variant.

The Facebook Ad Library Ad API charges 0.6 SocQ credits for each successfully returned ad record. A task that returns no result has no result charge.

By SocQ · Updated