Skip to documentation
Browse documentation

Search Ads

Searches the Facebook Ad Library by keyword. Returns raw ad data including creative content, targeting info, spend data, and all metadata. Supports filtering by language, platform, media type, active status, date range, and sorting.

Capability ID fb-adlibrary.ad.search
Cost 1 credit per request
Maximum runtime 120 seconds
View raw Get an API key

POST /execute Shared execution endpoint

Input parameters

FieldTypeRequiredDescription
active string Optional Filter by active status: all, active, inactive (default: all)
country string Optional ISO country code (default: US)
end_date string Optional Filter ads with impressions until this date (YYYY-MM-DD)
languages array<string> Optional Filter by content language codes (e.g. ["en", "es"])
limit integer Optional Maximum number of ads to return (default: 50)
media_type string Optional Filter by media type: all, image, video, meme, none (default: all)
platforms array<string> Optional Filter by publisher platform: facebook, instagram, messenger, audience_network
query string Required Search keyword or phrase
sort_by string Optional Sort results: relevance, date, impressions (default: impressions)
start_date string Optional Filter ads with impressions from this date (YYYY-MM-DD)

Response

Successful output is returned in results[0].data. Raw platform output is intentionally open-ended and may evolve with the upstream source.

Illustrative sample The full redacted fixture is shown in the response panel.

Illustrative output fields

Derived from the sample above for orientation only. These observed fields are not a fixed response schema.

PathObserved typeExample
items array 3 items
items array 3 items
next_cursor string [redacted:token]
total_items integer 5

Execution behavior

A 200 response completed inline. A 202 response was queued; poll GET /jobs/:id until the job reaches completed or failed.

Resources