Call it
curl https://api.peume.com/v1/call/search-facebook-and-instagram-ads-by-keyword \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"keyword": "webinar",
"country_code": "US"
}
}'const res = await fetch("https://api.peume.com/v1/call/search-facebook-and-instagram-ads-by-keyword", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"keyword": "webinar",
"country_code": "US"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-facebook-and-instagram-ads-by-keyword",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"keyword": "webinar",
"country_code": "US"
}
},
)
print(res.json()["output"])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: search-facebook-and-instagram-ads-by-keyword.
Parameters
keywordRequiredstringExample: webinar
country_codestringExample: US
continuation_tokenstringOther ways to do it
Same job, other sources, cheapest first.
Search the by keywordSearch publicly running Facebook and Instagram ads by keywordads for a keywordSearch the by keyword and get each ad's page, dates, platforms, text and media, with spend for political ads.Search Facebook ad library ads by keywordSearches the by keyword and returns matching ads.Scrape the by Page or search URLScrape publicly running Facebook and Instagram ads for a page or Ad Library search
