PeumeAPI

Ads · Instagram

Search Facebook ad library ads by keyword

Searches the by keyword and returns matching ads.

$0.0028 per callUsually answers in a few seconds

Call it

curl https://api.peume.com/v1/call/instagram-search-facebook-ad-library-ads-by-keyword \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "query": "running",
    "sort_by": "total_impressions",
    "search_type": "keyword_unordered",
    "ad_type": "all",
    "country": "ALL",
    "status": "ACTIVE"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: instagram-search-facebook-ad-library-ads-by-keyword.

Parameters

queryRequiredstring

Keyword to search for

Example: running

sort_bystring

Order only. One of: total_impressions | relevancy_monthly_grouped. Defaults to impressions ranking (total_impressions). Controls result ORDER, not verified performance — does not guarantee non-null spend, impressions_text, or a positive impressions_index. Those fields are often null / -1 for commercial ads and are not verified performance metrics.

total_impressions · relevancy_monthly_grouped

Example: total_impressions

search_typestring

If you want to search by exact phrase or not

Example: keyword_unordered

ad_typestring

Search for all ads or only political and issue ads

Example: all

countrystring

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

Example: ALL

statusstring

Status of the ad. Defaults to ACTIVE.

Example: ACTIVE

media_typestring

Media type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme.

Example: ALL

start_datestring

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

Example: 2025-01-05

end_datestring

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

Example: 2025-02-16

cursorstring

Cursor to paginate through results

Example: AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj-

trimboolean

Set to true for a trimmed down version of the response

Example: false

Other ways to do it

Same job, other sources, cheapest first.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.