Platforms · Facebook

Facebook Ad Library Ad Scraper API

Returns one ad from the Facebook Ad Library. spend, reach_estimate and currency are populated by Facebook for POLITICAL and issue ads only and read null or empty on a commercial ad; Facebook publishes no per-ad impression count outside that same political set, so there is no impressions figure to return. post.author.username is null by design: an Ad Library record carries the page NAME, not its handle, and a name is not a handle. An ad has no public view count, so engagement.views carries Facebook's audience REACH ESTIMATE where one exists (political and issue ads) and is null everywhere else; the same figure is on post.ext.ad.reach_estimate under its real name, and computed.engagement_rate is derived from it rather than from any real engagement.

GET /api/v1/data/facebook/adlibrary-ad · 5 credits per call · The same call repeated within 30 minutes may get the same answer, so data can be up to 30 minutes old.

Inputs

  • id (required): Facebook Ad Library ad ID.
  • trim: Set to true for a trimmed down version of the response

What comes back

  • result_status (string): success, or not_available when the item does not exist, was removed or is not public.
  • source_data.computed.content_category (string): Keyword-classified content category (e.g. tech, food, gaming). Null when undetectable.
  • source_data.computed.engagement_rate (number): Computed engagement rate (0..1).
  • source_data.computed.estimated_reach (number): Estimated reach based on views or follower count. Null when uncomputable.
  • source_data.computed.language (string): ISO 639-1 language code detected from the post text. Null when undetectable.
  • source_data.computed.save_rate (number): Saves divided by views, rounded to six places. Present only when the post has both a save count and a view count above zero.
  • source_data.post.author.avatar_url (string): URL to author profile picture
  • source_data.post.author.display_name (string): Author display name
  • source_data.post.content.media_urls (any): URL(s) of the primary media. Single string for video/photo posts; array of strings for carousels.
  • source_data.post.content.text (string): Post caption, description, or text content
  • source_data.post.content.thumbnail_url (string): URL to thumbnail image
  • source_data.post.engagement.views (number): View count (if available). For Instagram video/reels this is the play count: the headline 'Views' the IG app shows. Note: since mid-July 2026 Instagram's play count is Instagram-only. It no longer includes Facebook crosspost views (Meta-side change; the app UI changed identically).
  • source_data.post.ext.ad.caption (any): The ad's caption.
  • source_data.post.ext.ad.categories (any): The ad's content categories.
  • source_data.post.ext.ad.cta_text (any): The call-to-action button text.
  • source_data.post.ext.ad.cta_type (any): The call-to-action type, such as `LEARN_MORE`.
  • source_data.post.ext.ad.currency (any): ISO 4217 currency code of the spend figures.
  • source_data.post.ext.ad.display_format (any): The ad's display format, such as `DCO`.
  • source_data.post.ext.ad.end_date_iso (any): When the ad stopped, ISO 8601.
  • source_data.post.ext.ad.eu_reach_breakdown (any)
  • source_data.post.ext.ad.eu_total_reach (any)
  • source_data.post.ext.ad.is_active (any): True when the ad is still running.
  • source_data.post.ext.ad.link_url (any): Where the ad sends people.
  • source_data.post.ext.ad.page_categories (any): The advertiser page's categories.
  • source_data.post.ext.ad.page_id (any): Id of the advertiser's page.
  • source_data.post.ext.ad.page_like_count (any): Followers or likes of the advertiser's page.
  • source_data.post.ext.ad.page_profile_uri (any): Link to the advertiser's page.
  • source_data.post.ext.ad.publisher_platforms (any): Where the ad ran.
  • source_data.post.ext.ad.reach_estimate (any): Reach estimate the library reports. The shape differs by library and is null when it hides reach.
  • source_data.post.ext.ad.spend (any): Spend range the library reports. The shape differs by library and is null when it hides spend.
  • source_data.post.ext.ad.target_ages (any)
  • source_data.post.ext.ad.target_gender (any)
  • source_data.post.ext.ad.target_locations (any)
  • source_data.post.ext.ad.targets_eu (any)
  • source_data.post.ext.ad.title (any): The ad's headline.
  • source_data.post.ext.ad.video_hd_url (any): Link to the high-definition video.
  • source_data.post.ext.ad.video_sd_url (any): Link to the standard-definition video.
  • source_data.post.flags.deleted (boolean): Whether the post is tombstoned (always present)
  • source_data.post.id (string)
  • source_data.post.published_at (any): Post creation timestamp as an ISO 8601 UTC string.
  • source_data.post.url (string)
  • source_data (object): Everything the platform sent for this call, as it came.

Good to know

  • Each call costs 5 credits. A call that finds nothing, or fails, is free.
  • The same call repeated within 30 minutes may get the same answer, so data can be up to 30 minutes old.

Example call

GET /api/v1/data/facebook/adlibrary-ad?id=1702938977100376&trim=true

Questions

How much does the Facebook Ad Library Ad API cost?

Each call costs 5 credits. A call that finds nothing, or fails, costs nothing.

What do I send?

You must send id. 1 more input is optional: trim. Inputs go in the query string of a GET, or as JSON in a POST, along with your API key.

How fresh is the data?

The same call repeated within 30 minutes may get the same answer, so data can be up to 30 minutes old.

Do I need a Facebook account or developer app?

No. You call SocialHz with your SocialHz API key, and the same key works for every platform.

Can I try it before paying?

Yes. Signing up gives you 10 free credits, with no card needed.

Related Facebook endpoints

More Facebook scraper APIs