Platforms · Facebook

Facebook Ad Library Company Ads Scraper API

Returns ads from one company or page in the Facebook Ad Library, ordered by impressions or recency depending on sort_by. spend and reach_estimate are populated for POLITICAL and issue ads only and read null on commercial advertisers. engagement.views carries Facebook's audience REACH ESTIMATE, not a view count (an ad has no public view count); it is null on commercial advertisers and the same figure rides post.ext.ad.reach_estimate under its real name. published_at is the ad's first-run DATE: the 07:00:00Z clock component is an artefact of Facebook's US Pacific day boundary and carries no sub-day meaning.

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

Inputs

  • pageId: Facebook page ID of the advertiser
  • companyName: The name of the company. Can either use this or pageId
  • country: This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
  • status: Status of the ad. Defaults to ACTIVE.
  • media_type: Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.
  • language: Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc
  • publisher_platforms: Comma list. Only ads shown on these placements: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, THREADS, OCULUS. Filtered results read newest first unless sort_by=total_active_time. Keep paging with next_cursor.
  • start_date: Start date to search for. Format: YYYY-MM-DD
  • end_date: End date to search for. Format: YYYY-MM-DD
  • cursor: Leave it out for the first page. For the next page, send next_cursor from the previous answer.
  • trim: Set to true for a trimmed down version of the response
  • since: Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`.
  • until: Only rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`.

What comes back

  • result_status (string): success, or not_available when the item does not exist, was removed or is not public.
  • count (integer): How many posts this answer holds.
  • posts[].id (string): The item's ID on the platform.
  • posts[].url (string): Link to it on the platform.
  • posts[].text (string): Its text.
  • posts[].published_at (string): When it was published (ISO 8601).
  • posts[].language (string): Its language code.
  • posts[].deleted (boolean): Whether it was deleted.
  • posts[].author_name (string): The author's display name.
  • posts[].author_avatar_url (string): The author's picture.
  • posts[].view_count (number): Views.
  • posts[].media[].url (string): Its media.
  • posts[].media[].thumbnail_url (string): Its media's thumbnail.
  • posts[].content_type (string): What it is: post.
  • posts[].platform (string): The platform's name.
  • posts[].source_data (object): Everything the platform sent for this row, as it came.
  • posts[].source_data.computed.content_category (string): Keyword-classified content category (e.g. tech, food, gaming). Null when undetectable.
  • posts[].source_data.computed.engagement_rate (number): Computed engagement rate (0..1).
  • posts[].source_data.computed.estimated_reach (number): Estimated reach based on views or follower count. Null when uncomputable.
  • posts[].source_data.computed.language (string): ISO 639-1 language code detected from the post text. Null when undetectable.
  • posts[].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.
  • posts[].source_data.post.author.avatar_url (string): URL to author profile picture
  • posts[].source_data.post.author.display_name (string): Author display name
  • posts[].source_data.post.content.media_urls (any): URL(s) of the primary media. Single string for video/photo posts; array of strings for carousels.
  • posts[].source_data.post.content.text (string): Post caption, description, or text content
  • posts[].source_data.post.content.thumbnail_url (string): URL to thumbnail image
  • posts[].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).
  • posts[].source_data.post.ext.ad.byline (any)
  • posts[].source_data.post.ext.ad.caption (any): The ad's caption.
  • posts[].source_data.post.ext.ad.categories (any): The ad's content categories.
  • posts[].source_data.post.ext.ad.cta_text (any): The call-to-action button text.
  • posts[].source_data.post.ext.ad.cta_type (any): The call-to-action type, such as `LEARN_MORE`.
  • posts[].source_data.post.ext.ad.currency (any): ISO 4217 currency code of the spend figures.
  • posts[].source_data.post.ext.ad.display_format (any): The ad's display format, such as `DCO`.
  • posts[].source_data.post.ext.ad.end_date_iso (any): When the ad stopped, ISO 8601.
  • posts[].source_data.post.ext.ad.eu_reach_breakdown (any)
  • posts[].source_data.post.ext.ad.eu_total_reach (any)
  • posts[].source_data.post.ext.ad.impressions_text (any)
  • posts[].source_data.post.ext.ad.is_active (any): True when the ad is still running.
  • posts[].source_data.post.ext.ad.is_partnership_ad (any)
  • posts[].source_data.post.ext.ad.link_url (any): Where the ad sends people.
  • posts[].source_data.post.ext.ad.page_categories (any): The advertiser page's categories.
  • posts[].source_data.post.ext.ad.page_id (any): Id of the advertiser's page.
  • posts[].source_data.post.ext.ad.page_like_count (any): Followers or likes of the advertiser's page.
  • posts[].source_data.post.ext.ad.page_profile_uri (any): Link to the advertiser's page.
  • posts[].source_data.post.ext.ad.partnership (any)
  • posts[].source_data.post.ext.ad.publisher_platforms (any): Where the ad ran.
  • posts[].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.
  • posts[].source_data.post.ext.ad.spend (any): Spend range the library reports. The shape differs by library and is null when it hides spend.
  • posts[].source_data.post.ext.ad.sponsor_instagram_username (any)
  • posts[].source_data.post.ext.ad.target_ages (any)
  • posts[].source_data.post.ext.ad.target_gender (any)
  • posts[].source_data.post.ext.ad.target_locations (any)
  • posts[].source_data.post.ext.ad.targeted_or_reached_countries (any): Countries the ad targeted or reached.
  • posts[].source_data.post.ext.ad.targets_eu (any)
  • posts[].source_data.post.ext.ad.title (any): The ad's headline.
  • posts[].source_data.post.ext.ad.total_active_time_seconds (any)
  • posts[].source_data.post.ext.ad.video_hd_url (any): Link to the high-definition video.
  • posts[].source_data.post.ext.ad.video_sd_url (any): Link to the standard-definition video.
  • posts[].source_data.post.flags.deleted (boolean): Whether the post is tombstoned (always present)
  • posts[].source_data.post.id (string)
  • posts[].source_data.post.published_at (any): Post creation timestamp as an ISO 8601 UTC string.
  • posts[].source_data.post.url (string)
  • next_cursor (string): Send it as cursor to get the next page; null when there is none.
  • has_more (boolean): Whether there is another page.

Good to know

  • The price depends on what the call returns: from 5 credits to 35 credits.
  • Each call returns one page of about 10 posts. To get the next page, send next_cursor from the answer as cursor.
  • The same call repeated within 30 minutes may get the same answer, so data can be up to 30 minutes old.
  • Send one of: pageId, companyName.

Example call

GET /api/v1/data/facebook/adlibrary-company-ads?companyName=Lululemon&trim=true

Questions

How much does the Facebook Ad Library Company Ads API cost?

Each page costs 5 to 35 credits, depending on what it returns. A call that finds nothing, or fails, costs nothing.

What do I send?

Give one of pageId and companyName. 12 more inputs are optional: pageId, companyName, country, status, media_type, language, publisher_platforms, start_date, end_date, trim, since and until. Inputs go in the query string of a GET, or as JSON in a POST, along with your API key.

How do I get the next page?

Each call returns one page of about 10 rows. The answer carries next_cursor: send it back as cursor to get the page after. Each page is charged on its own, and an empty page is free.

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