Meta Ad Library API: Facebook & Instagram Ad Search JSON + MCP
What this Meta Ad Library API returns
Meta's official Ad Library API is built primarily for political and EU transparency reporting and requires identity verification, Meta App setup, and OAuth token management—while leaving out many commercial creative fields that DTC brands, agencies, and ecommerce researchers need.
Ecommerce Data API exposes 4 structured Meta Ad Library JSON endpoints (1 billing unit each) behind a single API key and Remote MCP server, returning active and historical Facebook & Instagram ad creatives, copy, CTA buttons, platforms, start/end timestamps, and destination URLs.
| Endpoint | Input | Cost | Returns | MCP Tool |
|---|---|---|---|---|
| Meta Ads Search | keyword, country, status | 1 unit | Matching active or inactive Facebook & Instagram ads with copy, creatives, CTA, platforms, and landing URL | meta_ads_search |
| Meta Advertiser Search | keyword | 1 unit | Matching Facebook Pages and advertiser page_id values with follower/like counts and categories | meta_advertisers_search |
| Meta Page Ads List | pageId, country, status | 1 unit | Full active or historical ad creatives running from a specific brand's Facebook Page | meta_ads_list |
| Meta Ad Details | adId | 1 unit | Complete structured record for a single Meta Ad Library ID, including carousel cards and media URLs | meta_ads_detail |
See real responses
Saved responses captured from the live API on 2026-11-30, not live calls. Create a key to query any ASIN or keyword.
/v1/meta/ads/search200 OK{
"keyword": "yoga mat",
"country": "US",
"status": "ACTIVE"
}{
"request_id": "249695b9-0e39-4899-8ccc-f3b0f7e7a8c9",
"data": {
"ads": [
{
"id": "1562214281773014",
"page_id": "22437985072",
"page_name": "Alibaba.com",
"page_likes": 28926736,
"active": true,
"platforms": [
"FACEBOOK",
"INSTAGRAM"
],
"display_format": "DPA",
"cta_text": "Shop now",
"cta_type": "SHOP_NOW",
"caption": "app.alibaba.com",
"link_url": "http://app.alibaba.com/",
"start_at": "2026-08-17T07:00:00.000Z",
"end_at": "2026-11-30T08:00:00.000Z",
"source_url": "https://www.facebook.com/ads/library/?id=1562214281773014"
}
]
}
}Request examples
1. Search active Facebook & Instagram ads by keyword (1 unit)
curl --request POST \
--url https://ecommercedataapi.com/v1/meta/ads/search \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"keyword": "yoga mat",
"country": "US",
"status": "ACTIVE"
}'2. Find an advertiser's page_id and pull all their running ads (1 + 1 units)
curl --request POST \
--url https://ecommercedataapi.com/v1/meta/advertisers/search \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"keyword": "Anker"
}'curl --request POST \
--url https://ecommercedataapi.com/v1/meta/ads/list \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"pageId": "22437985072",
"country": "US",
"status": "ACTIVE"
}'Official Meta Ad Library API vs. Ecommerce Data API
| Approach | Onboarding & Access | Commercial Ad Fields | Entry Pricing | AI Agent / MCP Ready |
|---|---|---|---|---|
| Official Meta Ad Library API | Requires Meta Developer app, ID verification, and long-lived token refresh | Focused on political / EU transparency; limited global commercial coverage | Free (with strict policy & access limits) | No |
| Custom Browser Scrapers | Frequent login walls, GraphQL token churn, and residential proxy overhead | Fragile DOM parsing; breaks on Meta UI changes | High proxy + engineering upkeep | Rarely |
| Ecommerce Data API | Instant API key; zero Meta App Review | Normalized JSON (creatives, media, cta_type, platforms, link_url, start_at) | $9/mo Starter or one-time call packs | Yes (meta_ads_* via Remote MCP) |
Common ecommerce & growth workflows
- Track DTC & competitor ad hooks weekly. Resolve a competitor's
page_idwithPOST /v1/meta/advertisers/search, then schedulePOST /v1/meta/ads/listto detect new creative angles, landing pages, and longest-running winning ads (start_at). - Validate ad-driven products against marketplace demand. Cross-check winning Facebook/Instagram ad creatives with Amazon Product Data API, Walmart API, TikTok Shop API, and 1688 API using the same credit balance.
- Run automated creative audits in Claude or Cursor. Connect our Remote MCP server (
https://ecommercedataapi.com/mcp) via browser OAuth so your AI assistant can callmeta_ads_search,meta_ads_list, andmeta_ads_detaildirectly.
Billing and boundaries
- Every Meta Ad Library endpoint consumes 1 billing unit per successful call. Invalid schemas return HTTP
400and are not billed; valid calls returning empty results (RESULT_NOT_FOUND) are billed. See Errors and rate limits. - Endpoints return publicly visible Meta Ad Library records only. They do not access private Meta Ads Manager accounts, ROAS, CPA, or audience targeting settings.
FAQ
Do I need a Facebook Developer account or Meta App Review? No. Create an Ecommerce Data API key and query all four Meta Ad Library endpoints immediately in JSON—or connect via browser OAuth in MCP clients.
Does this return both Facebook and Instagram ads?
Yes. Each ad record includes platforms (such as ["FACEBOOK", "INSTAGRAM"]), display_format, creatives[], media[], cta_text, and link_url.
Can I retrieve a brand's full ad library by page name?
Yes. Search the brand with POST /v1/meta/advertisers/search to get its page_id, then pass pageId into POST /v1/meta/ads/list.