PeumeAPI

Finance & crypto · Facebook

Facebook Ad Search

Search the by keyword and get matching ads (advertiser, creative text, CTA, platforms, and run dates) with cursor pagination. `active` is the Ad Library status when the search ran; an ad can stop after that. On an active row `endDate` is not a stop date: every active row carries the same value, a recent midnight US Pacific time, so it equals `startDate` only for an ad that launched that day. `startDate` / `endDate` as inputs filter the dates the ad delivered (impressions), not the day it launched, and grouped results can still hold ads that started earlier: check each row's `startDate` yourself when you need a launch window. `country` is a loose filter: rows can be for advertisers and ads outside it (other markets, unrelated local businesses), and no field says which country an ad was served in, so filter on `pageName`, `linkUrl` and the creative text. Grouped `adCount` counts the ad copies collated into the row, not the advertiser's campaigns. Empty results come back with `data` null, not an empty object.

From $0.0012 per call

Call it

curl https://api.peume.com/v1/call/facebook-ad-search-2 \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "query": "your query",
    "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: facebook-ad-search-2.

Parameters

cursorstring

Opaque pagination cursor from a previous response's nextCursor. Pages can overlap: a page may repeat items an earlier page returned and is billed like any other, so de-duplicate by item id and stop when a page adds no new id.

countrystring

Two-letter country code to scope results. Omit for all countries.

adTypestring

Restrict to all ads (default) or only political and issue ads.

all · political_and_issue_ads

routestring

Upstream source to run on; omit for "tiger". tiger ($0.00079 per call, 97.7% uptime); lemur ($0.0011 per call, 99% uptime); giraffe ($0.0012 per call, 99.8% uptime); dolphin ($0.004 per call, 100% uptime); fox ($0.016 per call, 97.3% uptime). Output fields only some routes return: totalResults (lemur, giraffe). A route can refuse an input it cannot apply with a 400 source_unknown (not charged): retry on another route, or omit that input. Route `dolphin` has answered `sortBy`, `startDate`, `endDate` and `searchType` with HTTP 400: use another route when you need them.

tiger · lemur · giraffe · dolphin · fox

endDatestring

Filter to ads with impressions on or before this date, in YYYY-MM-DD format.

searchTypestring

Match mode for the query: loose keyword match (keyword_unordered, the default) or exact phrase (keyword_exact_phrase).

keyword_unordered · keyword_exact_phrase

queryRequiredstring

Keyword to search the for (e.g. "protein powder").

mediaTypestring

Creative media type filter.

ALL · IMAGE · VIDEO · MEME · IMAGE_AND_MEME · NONE

sortBystring

Sort order: impressions (highest first, the default) or recent (most recent).

impressions · recent

startDatestring

Filter to ads with impressions on or after this date, in YYYY-MM-DD format.

statusstring

Ad status filter.

ALL · ACTIVE · INACTIVE

Example: ACTIVE

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.