ApifyMeta AdsAdvertising

Scrape the Meta ad library by Page or search URL

apify.meta-ads.library.search

Scrape publicly running Facebook and Instagram ads for a page or Ad Library search

Price
$0.005/resultAt provider cost
Success rate
—No success-rate data yetNo success-rate data yet
Latency p50
——
Last verified
Sep 26, 2026Verified working
POSThttps://toolswitch.dev/v1/tools/apify.meta-ads.library.search?timeout=90&maxItems=1&maxTotalChargeUsd=0.05Preview
Try onlineComing soonProvider docs ↗
  • Uses platform quota
  • Synchronous response
  • Reads public data

Parameters

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

ParameterTypeRequiredDescriptionExample
Query parameters
timeoutintegerOptionaltreg's key requires 1-90 so the run and its rows arrive before any wait gives up (a larger pull needs your own key). seconds before the synchronous run is cut off. This route blocks until the actor finishes and Apify closes the connection at 300s regardless — use the async pair below for anything large90
maxItemsintegerOptionaloptional row cap; pay-per-event actors that take the row count from their own input ignore it, so maxTotalChargeUsd is the spend limit50
maxTotalChargeUsdnumberOptionalthe spend cap Apify enforces on every event this run bills, in dollars. treg's key requires it, above 0 and at most 1, and holds it for the call0.5
  • Query parameters
  • timeoutintegerOptional

    treg's key requires 1-90 so the run and its rows arrive before any wait gives up (a larger pull needs your own key). seconds before the synchronous run is cut off. This route blocks until the actor finishes and Apify closes the connection at 300s regardless — use the async pair below for anything large

    Example: 90

  • maxItemsintegerOptional

    optional row cap; pay-per-event actors that take the row count from their own input ignore it, so maxTotalChargeUsd is the spend limit

    Example: 50

  • maxTotalChargeUsdnumberOptional

    the spend cap Apify enforces on every event this run bills, in dollars. treg's key requires it, above 0 and at most 1, and holds it for the call

    Example: 0.5

Code samples

Replace $TOOLSWITCH_KEY with the key you created in the console.

Preview
curl -X POST 'https://toolswitch.dev/v1/tools/apify.meta-ads.library.search?timeout=90&maxItems=1&maxTotalChargeUsd=0.05' \
  -H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{"onlyTotal":true,"startUrls":[{"url":"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=project%20management"}],"activeStatus":"active","resultsLimit":1,"isDetailsPerAd":false,"enrichWithEcommerceData":false}'

This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.005/result, including the service fee.