Facebook Hashtag Scraper - Ad Library Search by Hashtag avatar

Facebook Hashtag Scraper - Ad Library Search by Hashtag

Pricing

from $5.00 / 1,000 ad founds

Go to Apify Store
Facebook Hashtag Scraper - Ad Library Search by Hashtag

Facebook Hashtag Scraper - Ad Library Search by Hashtag

Search Meta Ad Library by hashtag. Returns matching ads, advertisers, creative assets, delivery details, and landing pages. MCP/API-ready.

Pricing

from $5.00 / 1,000 ad founds

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Search the Facebook (Meta) Ad Library by hashtag and turn each match into one structured dataset record. This Actor accepts an array of hashtags and returns the advertiser identity, ad copy, CTA, creative media URLs, delivery dates, active status, publisher platforms, and disclosed impressions or spend where Meta provides them. One record means one matched ad, which makes the dataset easy to review, compare, and pass into the next workflow step. It is an Apify Actor and usable through Apify MCP.

Best fit and connected workflows

This Actor fits workflows where the starting point is a hashtag and the goal is to inspect the ads attached to that tag:

  • Creative research on seasonal or product hashtags such as #blackfriday or #skincare
  • Advertiser discovery for a niche, category, or campaign theme
  • Live monitoring of ads across one or more hashtags
  • Review of disclosed reach, impressions, and spend where Meta provides them
  • Agent-driven research through Apify MCP with structured ad records returned in one step

A constructive workflow path looks like this: start with this Actor to identify the ads behind a hashtag, then use the returned advertiser or ad references to continue into Facebook Post Comments Scraper or Facebook Likes Scraper - Public Reactions & Profiles when the next question is about engagement signals around a returned Facebook record.

Practical scenario

Maya works on paid social research for a cosmetics brand. She starts with #skincare and wants a quick view of which advertisers are running ads around that term, what they are saying, and where the ads lead.

She runs the Actor with a hashtag list and a country filter. The dataset returns fields such as pageName, title, bodyText, ctaText, mediaType, publisherPlatforms, startDate, endDate, and adLibraryUrl. Maya uses pageName and bodyText to identify recurring advertisers, then opens adLibraryUrl on the most relevant records to review the creative in Meta's Ad Library and decide which brands to track next.

Input

FieldTypeDescription
hashtagsarray[string]Required. Hashtags to search in the Facebook Ad Library. The leading # is optional, and spaces inside a tag are removed. Each hashtag is searched independently.
maxResultsPerHashtagintegerMaximum ads returned for each hashtag. This also acts as the per-hashtag cost cap.
countrystringTwo-letter ISO country code for delivery scope, or ALL.
statusstringAd status filter: ACTIVE, INACTIVE, or ALL.
mediaTypestringCreative format filter such as ALL, IMAGE, VIDEO, MEME, or IMAGE_AND_MEME.
searchTypestringMatch mode: keyword_unordered or keyword_exact_phrase.
sortBystringOrdering: total_impressions or relevancy_monthly_grouped.
startDatestringLower bound for impressions delivery date in YYYY-MM-DD format.
endDatestringUpper bound for impressions delivery date in YYYY-MM-DD format.
includeRawbooleanAttaches the unmodified provider payload under raw for each ad when enabled.
providerOrderstringProvider order control for testing and fallback handling.

Focused input example

{
"hashtags": ["#blackfriday", "#skincare"],
"maxResultsPerHashtag": 100,
"country": "US",
"status": "ACTIVE",
"mediaType": "ALL",
"searchType": "keyword_unordered",
"sortBy": "total_impressions"
}

Output

The dataset contains one record per Facebook (Meta) Ad Library ad matching a searched hashtag. The overview views highlight advertiser, copy, status, media, and links. The full record includes delivery details, media URLs, disclosure fields, and provider provenance.

FieldTypeDescription
recordTypestringAlways ad.
inputHashtagstringThe hashtag as entered by the user.
querystringNormalized hashtag query sent to the Ad Library.
resultIndexintegerZero-based position within that hashtag's result set.
adArchiveIdstring or nullMeta Ad Library archive ID.
adLibraryUrlstring or nullDirect Ad Library link for the ad.
pageIdstring or nullFacebook page ID of the advertiser.
pageNamestring or nullAdvertiser page name.
pageProfileUrlstring or nullURL of the advertiser's Facebook page.
isActiveboolean or nullWhether the ad is currently running.
startDatestring or nullISO 8601 delivery start date.
endDatestring or nullISO 8601 delivery end date when known.
totalActiveDaysinteger or nullApproximate number of active days.
publisherPlatformsarray[string]Platforms where the ad ran.
displayFormatstring or nullRaw creative format reported by Meta.
mediaTypestring or nullDerived creative type.
titlestring or nullAd headline.
bodyTextstring or nullPrimary ad copy.
captionstring or nullLink caption under the creative.
ctaTextstring or nullCTA button label.
ctaTypestring or nullCTA button type.
linkUrlstring or nullDestination URL.
imageUrlsarray[string]Creative image URLs, including carousel cards.
videoUrlsarray[string]Creative video URLs, including carousel cards.
cardCountinteger or nullNumber of carousel cards.
categoriesarray[string]Ad categories reported by Meta.
containsSensitiveContentboolean or nullMeta sensitive-content flag.
currencystring or nullCurrency for disclosed spend.
spendnumber or nullDisclosed spend midpoint.
impressionsTextstring or nullDisclosed impressions range as text.
reachEstimatenumber or nullEstimated reach when disclosed.
collationCountinteger or nullCount of similar ads grouped with this one.
entityTypestring or nullAdvertiser entity type reported by Meta.
providerstringData provider that returned the record.
scrapedAtstringISO 8601 collection timestamp.

Illustrative output record

{
"recordType": "ad",
"inputHashtag": "#blackfriday",
"query": "#blackfriday",
"resultIndex": 0,
"adArchiveId": "123456789",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=123456789",
"pageName": "Acme Store",
"pageProfileUrl": "https://www.facebook.com/acmestore",
"isActive": true,
"startDate": "2026-01-01T00:00:00.000Z",
"publisherPlatforms": ["facebook", "instagram"],
"displayFormat": "video",
"mediaType": "VIDEO",
"title": "Black Friday Blowout",
"bodyText": "Save on selected items this weekend.",
"ctaText": "Shop Now",
"ctaType": "SHOP_NOW",
"linkUrl": "https://acme.example/sale",
"videoUrls": ["https://video.example/1.mp4"],
"impressionsText": "10K-15K",
"provider": "scrapecreators",
"scrapedAt": "2026-01-01T12:34:56.000Z"
}

How it works

The Actor searches the Meta Ad Library by hashtag and returns matched ad creatives as normalized dataset records. The live contract shows two data providers: ScrapeCreators as the primary route and SociaVault as the fallback. It uses cursor pagination and stops when it reaches the per-hashtag result cap or when no more results are available. The input schema also supports optional raw payload capture for records that need provider-level detail.

Pricing

Facebook Hashtag Scraper - Ad Library Search by Hashtag uses Pay per event pricing plus Apify platform usage. The live pricing tab shows the current rates for the Actor and the platform usage that applies to your run. In the event contract, Actor Start is charged when a run begins and Ad found is charged for each matched ad saved to the dataset.

A simple example in words: if you search three hashtags and each hashtag returns fifty ads, the execution processes one hundred fifty ad-found events, plus the run-start event. Your final cost follows the live Pricing tab and the number of returned ads.

Use with AI agents (MCP)

This Actor is available through Apify MCP as a tool for hashtag-based Meta Ad Library search. It accepts structured hashtag input and returns normalized ad records that an agent can read, summarize, compare, or hand off to another workflow.

Identity: khadinakbar/facebook-hashtag-scraper

Tool description: search the Facebook (Meta) Ad Library by hashtag and return matched ad creatives with advertiser, copy, media, delivery, and disclosure fields.

Find the ads running on #skincare in the US, return active results first, and summarize the advertiser names, CTA text, media type, and any disclosed impressions from the dataset records.

Output interpretation: each dataset item represents one matching ad. Use inputHashtag and query to trace the search term, pageName and pageProfileUrl to identify the advertiser, and adLibraryUrl to open the original ad. provider and scrapedAt describe where and when the record was collected. If includeRaw is enabled, the record also carries the provider's original payload in raw.

Scope: this tool searches hashtag-matched ads in the Meta Ad Library. It is designed for advertising research, not organic hashtag posts.

Pagination and cost guidance: the Actor paginates through results until it reaches maxResultsPerHashtag or exhausts available ads. Because charging is per returned ad, a smaller per-hashtag cap keeps the billed event count tightly aligned with the records you need.

Example with the Apify API

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: process.env.APIFY_TOKEN,
});
const input = {
hashtags: ['#blackfriday'],
maxResultsPerHashtag: 10,
country: 'US',
status: 'ACTIVE',
};
const run = await client.actor('khadinakbar/facebook-hashtag-scraper').call(input);
const dataset = client.dataset(run.defaultDatasetId);
const items = await dataset.listItems();
console.log('Dataset ID:', run.defaultDatasetId);
for (const item of items.items) {
console.log(item.pageName, item.title, item.adLibraryUrl);
}

Best results and outcome guidance

Use a focused hashtag list when you want a clean comparison set. Add country when delivery scope matters, and pair startDate and endDate when you want a specific campaign window. Choose status: "ACTIVE" for live monitoring and sortBy: "total_impressions" when you want higher-reach ads near the top. Turn on includeRaw when you need provider payload detail for debugging or deeper inspection.

Continue the workflow

  • Then use Facebook Likes Scraper to continue from Facebook Hashtag Scraper - Ad Library Search by Hashtag discovery into engagement data for the selected records.
  • Then use Facebook Marketplace Scraper to continue from Facebook Hashtag Scraper - Ad Library Search by Hashtag discovery into content data for the selected records.

Design note

I found that the dataset contract is centered on one record per ad, and the visible overview view combines advertiser, hashtag, copy, status, and link fields into a compact review table. That made it clear that the README should foreground ad-level records rather than campaign-level aggregates.

FAQ

Is this Actor for organic Facebook hashtag posts or ads?
It searches the Facebook (Meta) Ad Library by hashtag and returns matching ads.

What input fits the workflow if I have several research terms?
Pass a hashtag array. Each hashtag is searched independently and capped independently.

How do I narrow results to a market?
Use the country field with a two-letter ISO code such as US, GB, or DE.

How do I separate live ads from completed ads?
Use status: "ACTIVE", status: "INACTIVE", or status: "ALL".

How can I review creative formats only?
Set mediaType to IMAGE, VIDEO, MEME, or IMAGE_AND_MEME.

Can I connect this Actor to comment or reaction workflows?
Yes. When a returned record has a usable Facebook page or post reference, you can pass it into Facebook Post Comments Scraper or Facebook Likes Scraper - Public Reactions & Profiles for downstream engagement review.

Responsible use

This Actor works with Meta's public Ad Library and returns ad transparency data. Use the results in line with applicable laws, Meta's terms, and your own data governance requirements. When you share or store dataset items, treat disclosed ad data, URLs, and advertiser details as sourced records and preserve provenance through adLibraryUrl, provider, and scrapedAt.