Facebook Ad Library advertiser search API
Find the Facebook Pages that advertise, by name, as the Ad Library’s search box suggests them: Page id, name, vanity name, category, likes, verification, and the linked Instagram account with its followers.
GET /v1/facebook/ads/advertisers/searchBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/facebook/ads/advertisers/search?q=nike",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "page_results": [ { "page_id": "15087023444", "name": "Nike", "page_alias": "nike", "category": "Sportswear Store", "likes": 39487625, "verification": "BLUE_VERIFIED", "image_uri": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.30808-1/284964043_10159903868513445_7696353984967674128_n.jpg?stp=dst-jpg_s20…", "entity_type": "PERSON_PROFILE", "ig_username": "nike", "ig_followers": 289930009, "ig_verification": true, "page_is_deleted": false, "country": null }, { "page_id": "51212153078", "name": "Nike Football", "page_alias": "nikefootball", "category": "Product/service", "likes": 39922668, "verification": "BLUE_VERIFIED", "image_uri": "https://scontent-atl3-1.xx.fbcdn.net/v/t39.30808-1/387181570_863325755161415_3589774989337788111_n.jpg?stp=dst-jpg_s200x…", "entity_type": "PERSON_PROFILE", "ig_username": "nikefootball", "ig_followers": 44520247, "ig_verification": true, "page_is_deleted": false, "country": null }, "… 13 more" ], "keyword_results": []}Parameters
| Name | Type | Description |
|---|---|---|
qquery · required | string | Advertiser name. Example: nike. |
countryquery | string | ISO 3166-1 alpha-2 country the ads reached (US, GB, DE…), or ALL (default). |
Response fields
200 with a FacebookAdvertiserSearch, in Facebook’s own JSON.
| Field | Type | Description |
|---|---|---|
page_results | FacebookAdvertiser[] | |
keyword_results | string[] | Keyword suggestions the Ad Library offers for the query. |
Status codes
| Status | Meaning |
|---|---|
200 | Matching advertisers and keyword suggestions. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The ad, Page or advertiser is not in the Meta Ad Library. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Facebook is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
How many results?
Up to about ten Pages, as the Ad Library suggests them, plus keyword suggestions in keyword_results.
Facebook is a trademark of Meta Platforms, Inc. We are not affiliated with or endorsed by Meta.