
Meta ad library search
Search active Facebook and Instagram ads by brand or keyword in one country: ad text, headline, creative links, call to action, start date and platforms.
POST /api/v1/nodes/meta-ad-library
Is this the right node?
- Use it when
- You are studying a competitor's advertising or collecting ad creative ideas.
- Not for
- Ad spend figures; Meta publishes those only for political and social-issue ads.
- You get
- 20 ads: page name, ad text, headline, image and video links, call to action, start date, platforms and active flag.
- Typical time
- About 9 seconds per call
How it works
Your agent pays for itself

1Needs something

2Finds it on TollNode

3Pays a few cents

4Gets the result
Two ways to use Meta ad library search
Way 1 · Pay per call (x402)
For AI agents, no sign-up
Your agent sends the request, gets a 402 with the exact price ($0.022 per search (up to 20 ads)), signs a USDC payment on Base and retries. Nothing is collected unless the call succeeds.
npx agentcash add https://tollnode.comnpx agentcash@latest fetch https://tollnode.com/api/v1/nodes/meta-ad-library -m POST -b '{"query":"allbirds","country":"US"}'Way 2 · Account + API key
For apps and teams
Create a free account, load a balance with USDC on Base, create an API key and call any node. Same prices; each successful call is deducted from your balance.
curl -X POST https://tollnode.com/api/v1/nodes/meta-ad-library \
-H "Authorization: Bearer $TOLLNODE_API_KEY" \
-H "content-type: application/json" \
-d '{"query":"allbirds","country":"US"}'Step-by-step, with code in JavaScript and Python: full guide for Meta ad library search.
Input
| Field | Type | Notes |
|---|---|---|
| query* | string | Brand or keyword, e.g. allbirds |
| country | string | Two-letter country code, uppercase, e.g. US, GB, DE; default US |
Example response
{
"results": [
{
"url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=allbirds&search_type=keyword_unor…",
"ad_id": null,
"spend": null,
"total": 67,
"page_id": "778794852137593",
"currency": "",
"end_date": 1794124800,
"position": 1,
"ads_count": 1,
"is_active": true,
"page_name": "Allbirds",
"categories": [
"UNKNOWN"
],
"start_date": 1793343600,
"collation_id": "1105654985611944",
"ad_archive_id": "1427624875595700",
"ad_library_url": "https://www.facebook.com/ads/library/?id=1427624875595700",
"reach_estimate": null,
"collation_count": 1,
"is_aaa_eligible": false,
"page_is_deleted": false,
"total_active_time": null,
"end_date_formatted": "2026-11-08 08:00:00",
"publisher_platform": [
"FACEBOOK"
],
"start_date_formatted": "2026-10-30 07:00:00",
"state_media_run_label": null,
"impressions_with_index": {
"impressions_text": null,
"impressions_index": -1
},
"contains_sensitive_content": false,
"targeted_or_reached_countries": [],
"contains_digital_created_media": false
}
]
}FAQ
- When should an agent use the Meta ad library search node?
- You are studying a competitor's advertising or collecting ad creative ideas. It is not meant for ad spend figures; Meta publishes those only for political and social-issue ads. A call usually takes about 9 seconds.
- What does the Meta ad library search node return?
- Search active Facebook and Instagram ads by brand or keyword in one country: ad text, headline, creative links, call to action, start date and platforms. Each call returns 20 ads: page name, ad text, headline, image and video links, call to action, start date, platforms and active flag.
- How much does one call cost?
- $0.022 in USDC on Base per search (up to 20 ads) (one call = up to 20 ads), charged only when it succeeds. No sign-up, subscription or API key.
- What happens if the call fails?
- You are not charged. TollNode checks your signed payment first, runs the node, and only collects the payment if the result is usable. A failed, empty or timed-out call is never settled, so there is nothing to refund.
- How does an AI agent pay?
- With x402. The first request returns HTTP 402 and the exact price. Any x402 wallet signs the USDC payment and retries automatically. In Claude Code or Cursor, run npx agentcash add https://tollnode.com once.
- Can I use an API key instead?
- Yes. Create a free account, add funds in USDC on Base, create an API key and send it as Authorization: Bearer. Each successful call is deducted from your balance at the same price; failed calls cost nothing.