Facebook hub

Meta and Facebook Ad Library API

Keyword search across Meta's Ad Library, commercial ads included: query in, structured ad rows out, same envelope as the rest of the Facebook tag.

GET /v1/facebook/ad-library/ads/search

3 credits A not-found answer is still charged Service failures are free

About this endpoint

Meta's official Ad Library API (ads_archive) needs an access token, and ads that didn't reach the EU only come back if they're about social issues, elections or politics. This route reads the public Ad Library search instead, so a keyword search in the US returns ordinary commercial ads too.

GET /v1/facebook/ad-library/ads/search takes a required query string and returns matching Ad Library ads in the shared Social Fetch envelope. Optional filters narrow the page: sortBy (impressions, most-recent), searchType (keyword-unordered, exact-phrase), adType, country (two-letter code or ALL), language (two-letter code such as EN or ES), status, mediaType, plus startDate / endDate as YYYY-MM-DD. When data.page.hasMore is true, pass data.page.nextCursor as cursor on the next call. Bill from meta.creditsCharged.

This route is keyword ads search. For one known archive id or Ad Library URL, use GET /v1/facebook/ad-library/ads. To find advertisers by name, use company search; to list ads for a known page, use company ads. All of them share one Social Fetch API key.

Price

From $4.05 per 1,000 requests

3 credits per request, including when nothing is found. Errors are free.

Scale pack
$4.92 / 1,000
Growth pack
$7.08 / 1,000

The lowest rate is on annual plans; packs are pay as you go.

Example request

Send your API key in the x-api-key header. New accounts get 100 free credits, no card needed.

Request
cURL

Example response

A 200 response. Live responses have the same shape with current data.

Request
JSON

Meta and Facebook Ad Library API FAQ

How is this different from Meta's official Ad Library API?

Meta's ads_archive endpoint needs an access token, and ads that didn't reach the EU are only returned if they're about social issues, elections or politics. This route takes a Social Fetch API key and reads the public Ad Library search, so you can search commercial ads in countries such as the US.

What does the Facebook Ad Library Search API return?

A page of Ad Library ads that match your keyword query under data.ads, the echoed query under data.query, and pagination under data.page (hasMore, nextCursor, totalResultsEstimate). Each response uses the shared Social Fetch envelope with meta.requestId and meta.creditsCharged.

How do I call Facebook Ad Library keyword search?

Send GET /v1/facebook/ad-library/ads/search with x-api-key and a required query parameter. Optionally add sortBy, searchType, adType, country, language, status, mediaType, startDate, endDate, cursor, and trim. Full enums and examples are in the API docs.

How much does Facebook Ad Library ads search cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request. A page with no ads costs 0 credits. Some keywords return empty pages before later ads, so Social Fetch reads up to three consecutive empty pages within one request and only then reports hasMore: false.

Is this the same as getting one Facebook Ad Library ad by id?

No. GET /v1/facebook/ad-library/ads/search finds ads by keyword and filters. GET /v1/facebook/ad-library/ads returns a single ad when you already have an archive id or Ad Library URL.

Can I filter Ad Library search by country, language, status, or media?

Yes. country accepts ALL or a two-letter country code. language accepts a two-letter language code such as EN, ES, or FR. status accepts all, active, or inactive. mediaType accepts all, image, video, meme, image-and-meme, or none. Keep the same query and filters when you paginate with cursor.

How does pagination work on Facebook Ad Library search?

When data.page.hasMore is true, pass data.page.nextCursor as the cursor query param on the next request. Do not treat totalResultsEstimate as an exact count or as the only end-of-results signal.

Do I need a Meta ads account or Marketing API token to search?

No. You authenticate to Social Fetch with an API key. The route reads public Ad Library search results; it does not act on behalf of an ads account you manage.