Search the Meta Ad Library by keyword with country, status, media, date and sort filters; returns matching ads with cursor pagination.
1 credit/ call
Never more than 4 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/facebook.ads_search" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"running shoes","country":"DE","limit":10}'{
"output": {
"found": true,
"data": {
"totalResults": "<integer | null>",
"nextCursor": "<string | null>",
"ads": [
{
"title": "<string | null>",
"pageLikes": "<integer | null>",
"adCount": "<integer | null>",
"active": "<boolean | null>", …
}
]
}
},
"credits": 1
}Input and output
11 fields
running shoes.DE.10.33 fields
Good to know
One page per call. Send nextCursor back as cursor to read the next page.
The same key and credits work for every API.