Skip to main content
GET
Facebook Ad Search

Authorizations

X-API-Key
string
header
required

Query Parameters

q
string | null
Maximum string length: 100
page_id
string | null
Pattern: ^[0-9]+$
search_type
enum<string>
default:keyword_unordered
Available options:
keyword_unordered,
keyword_exact_phrase
country
string
default:ALL
Pattern: ^([A-Za-z]{2}|[Aa][Ll][Ll])$
active_status
enum<string> | null

active keeps the ads that run now, inactive the ads that stopped, all both. Without it: active, or all when end_date is a day before today, since few ads of a past period still run.

Available options:
active,
inactive,
all
ad_type
enum<string>
default:all
Available options:
all,
political_and_issue_ads,
housing_ads,
employment_ads,
credit_ads
media_type
enum<string>
default:all
Available options:
all,
image,
video,
meme,
image_and_meme,
none
start_date
string<date> | null

The first day of a period, as YYYY-MM-DD. The search keeps the ads that ran on a day of the period, whenever they started: it does not select by the day an ad started. Each ad says that day as start_date. Days are the Ad Library's, which begin at midnight Pacific time.

end_date
string<date> | null

The last day of the period, as YYYY-MM-DD, counted in. The same day as start_date asks for one day.

limit
integer
default:30
Required range: 1 <= x <= 100
include_products
boolean
default:false
include_page_info
boolean
default:false
view
enum<string>
default:raw

Raw source fields (default), or compact ads with complete creative groups and no empty optional fields. No collection or credit difference.

Available options:
raw,
compact
include_ad_details
boolean
default:false

Fetch each returned ad's detail panel. Costs the ad-detail rate (normally 2 credits) per available panel, in addition to search. Up to 30 extra seconds; partial outcomes are reported per ad. Defaults to false.

include_creative_assets
boolean
default:false

Include an index of usable copy and media from the snapshot and its cards, with source paths. No extra credits; increases response size. Defaults to false.

platforms
string | null
Maximum string length: 120
languages
string | null
Maximum string length: 120
sort_by
enum<string>
default:total_impressions
Available options:
total_impressions,
relevancy_monthly_grouped
cursor
string | null
Required string length: 2 - 4200

Response

Successful Response

search_parameters
Search Parameters · object
required
search_information
SearchInformation · object
required
ads
MetaAd · object[]
required
response_metadata
Response Metadata · object
required