facebook

Adlibrary › Search › Ads

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

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

50 credits per call.

Paginates by cursor: see Pagination.

get/v1/facebook/adlibrary/search/ads

Request

  • Base URL: https://api.insightsocial.app
  • URL: https://api.insightsocial.app/v1/facebook/adlibrary/search/ads
  • Auth: API key in header x-api-key

Query parameters

querystring required
Example:artificial intelligence

Search keyword or phrase to find ads in the Facebook Ad Library

sort_by'total_impressions' | 'relevancy_monthly_grouped'

Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.

search_type'keyword_unordered' | 'keyword_exact_phrase'

If you want to search by exact phrase or not

ad_type'all' | 'political_and_issue_ads'

Search for all ads or only political and issue ads

countrystring

This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.

status'ALL' | 'ACTIVE' | 'INACTIVE'

Status of the ad. Defaults to ACTIVE.

media_type'ALL' | 'IMAGE' | 'VIDEO' | 'MEME' | 'IMAGE_AND_MEME' | 'NONE'

Media type of the ad: ALL (default), IMAGE, VIDEO, MEME (an image with text on it), IMAGE_AND_MEME or NONE.

start_datestring

Impressions start date. Needs to be in YYYY-MM-DD format.

end_datestring

Impressions end date. Needs to be in YYYY-MM-DD format.

cursorstring

Cursor to paginate through results

trimboolean

Set to true for a lighter record with fewer fields.

dry_run'1'

Set to 1 to get the price of this call without making it: data.dry_run carries credits_min and credits_max. Nothing is charged.

Response

Success.

successtrue required
platformstring required
endpointstring required
schema_version'2' required
dataConventionsData required
unavailablestring[] required
credits_usedinteger required
credits_remaininginteger required
request_idstring required
cachedboolean required
idempotent_replayboolean required
charge_reasonstring required
free_callboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.