Insight Social
GET /v1/facebook/adlibrary/search/adsbeta

Facebook Ad Library Search API

Returns Facebook Ad Library ads matching a keyword, each with its creative text, images, sponsor info, and running status.

50 credits a call · cursor pagination · failed calls free · 10 free calls to start

curl "https://api.insightsocial.app/v1/facebook/adlibrary/search/ads?query=artificial+intelligence" \
-H "x-api-key: $INSIGHTSOCIAL_API_KEY"
200 OKJSON
{
"success": true,
"platform": "facebook",
"endpoint": "/v1/facebook/adlibrary/search/ads",
"schema_version": "2",
"data": {
"<field>": "<value>"
},
"pagination": {
"next_cursor": "<string | null>",
"has_more": "<boolean>"
},
"unavailable": [],
"credits_used": "<integer>"
}

When to use it

Use it to find ads across all advertisers by keyword; if you already know the advertiser, adlibrary/company/ads is more direct.

Parameters

Query parameters for GET /v1/facebook/adlibrary/search/ads. Send your key in the x-api-key header.

NameRequiredDescription
queryYesSearch keyword or phrase to find ads in the Facebook Ad Library
sort_byNoSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
search_typeNoIf you want to search by exact phrase or not
ad_typeNoSearch for all ads or only political and issue ads
countryNoThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
statusNoStatus of the ad. Defaults to ACTIVE.
media_typeNoMedia type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme.
start_dateNoImpressions start date. Needs to be in YYYY-MM-DD format.
end_dateNoImpressions end date. Needs to be in YYYY-MM-DD format.
cursorNoCursor to paginate through results
trimNoSet to true for a trimmed down version of the response

Response

This endpoint returns the platform's own fields in data, in snake_case, rather than a unified post or profile. The reference page lists them.

Every field, error and example is in the Facebook Ad Library Search API reference.

How much does the Facebook Ad Library Search API cost?

50 credits per successful call.

  • Failed calls are free

    A call that errors or finds nothing costs 0 credits.

  • Know the price first

    Add dry_run=1 and the response quotes the call without making it. Nothing is charged.

  • One balance

    API calls and Chrome extension exports share the same credits, on the free plan too.

Facebook Ad Library Search API: frequently asked questions

Send GET /v1/facebook/adlibrary/search/ads with the query parameter and your key in the x-api-key header. Returns Facebook Ad Library ads matching a keyword, each with its creative text, images, sponsor info, and running status.