apify_meta-ads_library_search $0.00625 per call

Scrape the Meta ad library by Page or search URL. Scrape publicly running Facebook and Instagram ads for a page or Ad Library search (Apify · Meta Ads (Facebook & Instagram))

For AI agents: call apify_meta-ads_library_search
POST https://toll402.dev/v1/p/apify.meta-ads.library.search
{
 "startUrls": [
  {
   "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=project%20management"
  }
 ],
 "resultsLimit": 1,
 "activeStatus": "active",
 "isDetailsPerAd": false,
 "onlyTotal": true,
 "enrichWithEcommerceData": false
}
Answers 402 with x402 payment requirements; pay with any x402 client (@x402/fetch, x402 for Python, toll402-client, toll402-mcp) or send a prepaid-credits key as x-toll402-key (https://toll402.dev/credits). Paid per call via x402 (USDC on Base) or with a prepaid-credits key (x-toll402-key, card at /credits); charged only on success. Start at /llms.txt or connect the MCP server: npx -y toll402-mcp · remote https://toll402.dev/mcp.

Input schema

{
 "type": "object",
 "properties": {
  "startUrls": {
   "type": "array",
   "description": "[{\"url\": \"…\"}] — either a Facebook Page URL or a full Meta Ad Library search URL (facebook.com/ads/library/?q=…&country=US)",
   "examples": [
    [
     {
      "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=US&q=project%20management"
     }
    ]
   ]
  },
  "resultsLimit": {
   "type": "integer",
   "description": "max ads PER URL; unlimited if omitted, which is how runs get expensive",
   "examples": [
    50
   ]
  },
  "activeStatus": {
   "type": "string",
   "description": "\"active\" | \"inactive\" | \"\" for both",
   "examples": [
    "active"
   ]
  },
  "isDetailsPerAd": {
   "type": "boolean",
   "description": "true adds Instagram data, spend info and EU reach/targeting per ad — richer than Meta's own API, and slower",
   "examples": [
    false
   ]
  },
  "includeAboutPage": {
   "type": "boolean",
   "description": "true adds the advertiser's address, admin country and page history"
  },
  "onlyAdsNewerThan": {
   "type": "string",
   "description": "YYYY-MM-DD or a relative phrase like \"2 months\"",
   "examples": [
    "2026-06-01"
   ]
  },
  "onlyAdsOlderThan": {
   "type": "string"
  },
  "onlyTotal": {
   "type": "boolean",
   "description": "true returns just the ad COUNT instead of the ads — one cheap result row when all you need is how much a competitor is running",
   "examples": [
    false
   ]
  },
  "enrichWithEcommerceData": {
   "type": "boolean",
   "description": "true follows landing pages for product names and prices and bills an extra ecommerce-enrichment event per ad; treg's key requires false, your own key may enable it",
   "enum": [
    false
   ],
   "examples": [
    false
   ]
  }
 },
 "additionalProperties": true,
 "required": [
  "startUrls"
 ],
 "description": "the response is the dataset items array directly — no run envelope, no polling. Result count is what you pay for, so onlyTotal:true is the cheap probe before a full pull. Unofficial: this reads the Ad Library web UI, so field availability tracks whatever Meta currently renders"
}

MCP

{"mcpServers":{"toll402":{"command":"npx","args":["-y","toll402-mcp"],"env":{"TOLL402_WALLET_KEY":"0x..."}}}}

All tools · OpenAPI