Meta Ad Library API · Facebook ads search · Instagram ads search · competitor ads · ad creative, landing page and run dates.
Examples for the okdata Meta Ad Library API: search the ads running on Facebook, Instagram and Messenger by keyword, or list every ad one brand runs, with one API key. No Facebook login, no cookies and no browser.
Sign up free ($0.10 of free credit) · All Meta endpoints · Use it from Claude, Cursor or any MCP client
| Endpoint | What it returns | Price | Path |
|---|---|---|---|
| Ad Library search | Ads matching keywords: advertiser, headline, copy, images and videos, landing page, call to action, platforms, first and last shown dates. Filter by country, active or stopped, image or video. | $0.004 a call | GET /v1/meta/ads/search |
| Advertiser ads | The ads one Facebook page runs, by page ID or name. | $0.004 a call | GET /v1/meta/advertisers/ads/list |
| Ad detail | One ad by its Ad Library ID. | $0.004 a call | GET /v1/meta/ads/get |
export OKDATA_API_KEY=okd_...
curl -G "https://api.okdata.online/v1/meta/ads/search" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode 'query=portable espresso' -d country=USThe list is in data.items; pass page.next_cursor back as cursor for the next page (about 30 ads a page, one call each).
stale_ads.py searches active ads for a phrase and prints the ones that still mention it, oldest first:
python3 stale_ads.py "cyber monday" --country US --pages 6On 2026-12-03, three days after Cyber Monday, 53 of 72 active US ads it found still mentioned Cyber Monday, and the oldest had first run in November 2023. Write-up: Cyber Monday ended on Monday. On Thursday, 53 Meta ads still say it's on.
Swap the phrase for "black friday", "christmas" or your own brand name to audit your ads or a competitor's.
claude mcp add --transport http --scope user okdata https://api.okdata.online/mcp --header "Authorization: Bearer $OKDATA_API_KEY"Then ask in plain words, for example "what ads is Stanley 1913 running on Instagram in the US right now".
Meta 广告库 API · Facebook / Instagram 广告搜索 · 竞品广告监控 · 广告素材、落地页与投放时间。
okdata 的 Meta 广告库接口示例:按关键词搜 Facebook、Instagram、Messenger 上在投的广告,或列出某个品牌主页的全部广告,一个 API Key 调用,不用登录 Facebook、不用 Cookie。适合出海和跨境卖家看竞品素材。中文文档:https://okdata.online/zh/apis/meta/?src=gh-meta-ads · 注册送 $0.10 试用额度:https://okdata.online/zh/signup/?src=gh-meta-ads
MIT. The data comes from the okdata API; its terms apply to API use.