Facebook Ad Library Discover Advertisers API
Find an advertiser's Facebook page ID from its name, to list its ads.
- 1 credit per call
- Failed calls are free
- Updated
- fb-adlibrary.advertiser.discover
{ "total_items": 5, "items": [ { "name": "Nike", "category": "Sportswear Store", "page_alias": "nike", "page_id": "15087023444", "page_url": "https://www.facebook.com/15087023444", "verification": "BLUE_VERIFIED" }, { "name": "Nike Football", "category": "Product/service", "page_alias": "nikefootball", "page_id": "51212153078", "page_url": "https://www.facebook.com/51212153078", "verification": "BLUE_VERIFIED" } ]}
| # | Name | Category | Page alias | Verification | Page id | Page url |
|---|---|---|---|---|---|---|
| 1 | Nike | Sportswear Store | nike | BLUE_VERIFIED | 15087023444 | https://www.facebook.com/15087023444 |
| 2 | Nike Football | Product/service | nikefootball | BLUE_VERIFIED | 51212153078 | https://www.facebook.com/51212153078 |
| 3 | Nike Run Club | Sports & Recreation Venue | nikerunning | BLUE_VERIFIED | 65604112975 | https://www.facebook.com/65604112975 |
| 4 | Nike Sportswear | Product/service | nikesportswear | BLUE_VERIFIED | 20825389113 | https://www.facebook.com/20825389113 |
| 5 | Nike Basketball | Product/service | nikebasketball | BLUE_VERIFIED | 5941596308 | https://www.facebook.com/5941596308 |
What you send
The input
object of the request, with every field the endpoint accepts.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
| query | string | yes | The advertiser's page name, or the start of it. | nike |
| country | string | no | A two-letter country code to look in. | US |
| limit | integer | no | How many pages to return. | 5 |
Fields it returns
What each record in the response holds, with the values from the sample above.
| Field | Type | What it is | Example |
|---|---|---|---|
| items[].name | string | The advertiser's name. | Nike |
| items[].category | string | The page's category. | Sportswear Store |
| items[].page_alias | string | The page's short name in its address. | nike |
| items[].page_id | string | The ID of the Facebook page that runs the ad. | 15087023444 |
| items[].page_url | string | The page's address on Facebook. | https://www.facebook.com/15087023444 |
| items[].verification | string | The page's verification badge. | BLUE_VERIFIED |
| items | array | The results. | 5 records |
| total_items | integer | How many results this response holds. | 5 |
Call it from your code, or ask your agent
Set UPSCRAPE_API_KEY to your key and copy a working request.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "fb-adlibrary.advertiser.discover", "input": { "country": "US", "limit": 5, "query": "nike" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "fb-adlibrary.advertiser.discover", "input": { "country": "US", "limit": 5, "query": "nike" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "fb-adlibrary.advertiser.discover", "input": { "country": "US", "limit": 5, "query": "nike" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
https://data.upscrape.com/mcp
With Upscrape, get the Facebook Ad Library discover advertisers for country "US" and query "nike". Tell me what it costs before you run it, then show the results as a table.
More from the Facebook Ad Library API
The same data from other platforms
Facebook Ad Library Discover Advertisers API FAQ
The short answers. The docs have the long ones.
How much does the Facebook Ad Library Discover Advertisers API cost?
1 credit per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send query. The input fields below list every option with its type and limits.
Do I need a Facebook Ad Library login?
No. It reads public Facebook Ad Library data; nothing runs on your account.
Can my AI agent call it?
Yes, over MCP: the agent finds fb-adlibrary.advertiser.discover, checks its price and runs it with the same credits as the REST API.
Your first Facebook Ad Library call is free.
Up to 100 free credits to start, no card needed.