Ecommerce Data API

Meta Ad Library API: Facebook & Instagram Ad Search JSON + MCP

Query active Facebook and Instagram ads from the Meta Ad Library as structured JSON—search by keyword or advertiser page ID, inspect creatives, CTAs, and landing URLs without Meta App Review.
Dec 1, 2026

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.

EndpointInputCostReturnsMCP Tool
Meta Ads Searchkeyword, country, status1 unitMatching active or inactive Facebook & Instagram ads with copy, creatives, CTA, platforms, and landing URLmeta_ads_search
Meta Advertiser Searchkeyword1 unitMatching Facebook Pages and advertiser page_id values with follower/like counts and categoriesmeta_advertisers_search
Meta Page Ads ListpageId, country, status1 unitFull active or historical ad creatives running from a specific brand's Facebook Pagemeta_ads_list
Meta Ad DetailsadId1 unitComplete structured record for a single Meta Ad Library ID, including carousel cards and media URLsmeta_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.

Run it on your own ASIN or keyword

POST/v1/meta/ads/search200 OK
Request
{
  "keyword": "yoga mat",
  "country": "US",
  "status": "ACTIVE"
}
Response
{
  "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

ApproachOnboarding & AccessCommercial Ad FieldsEntry PricingAI Agent / MCP Ready
Official Meta Ad Library APIRequires Meta Developer app, ID verification, and long-lived token refreshFocused on political / EU transparency; limited global commercial coverageFree (with strict policy & access limits)No
Custom Browser ScrapersFrequent login walls, GraphQL token churn, and residential proxy overheadFragile DOM parsing; breaks on Meta UI changesHigh proxy + engineering upkeepRarely
Ecommerce Data APIInstant API key; zero Meta App ReviewNormalized JSON (creatives, media, cta_type, platforms, link_url, start_at)$9/mo Starter or one-time call packsYes (meta_ads_* via Remote MCP)

Common ecommerce & growth workflows

  1. Track DTC & competitor ad hooks weekly. Resolve a competitor's page_id with POST /v1/meta/advertisers/search, then schedule POST /v1/meta/ads/list to detect new creative angles, landing pages, and longest-running winning ads (start_at).
  2. 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.
  3. 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 call meta_ads_search, meta_ads_list, and meta_ads_detail directly.

Billing and boundaries

  • Every Meta Ad Library endpoint consumes 1 billing unit per successful call. Invalid schemas return HTTP 400 and 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.