How to run a Facebook Ad Library search companies
GET request to /v1/ad-library/facebook/search-companies with your input. You get clean JSON back in seconds for 2 credits per call — no OAuth, scraping or platform SDKs. Find Meta Ad Library pages by brand — name-matched, pageId for company-ads (not profileId).How to run a Facebook Ad Library search companies (step by step)
- 1
Get a free API key
Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.
- 2
Call the Facebook Ad Library Search Companies API
Send an authenticated GET request to /v1/ad-library/facebook/search-companies with your input. No OAuth, no scraping setup.
- 3
Read the JSON response
Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.
Code example
curl "https://api.captapi.com/v1/ad-library/facebook/search-companies?q=nike" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."What the response looks like
{
"success": true,
"data": {
"query": "nike",
"country": "US",
"totalReturned": 1,
"companies": [
{
"id": "15087023444",
"pageId": "15087023444",
"advertiserId": "15087023444",
"profileId": null,
"name": "Nike",
"url": "https://www.facebook.com/nike/",
"logo": "https://scontent.ftce2-1.fna.fbcdn.net/v/t39.35426-6/509357337_4088170881445143_8138324132275675252_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=101&_nc_map=urlgen_bucketless&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=E54VvdMHySUQ7kNvwFHwJVT&_nc_oc=AdoxNxasX5Ywe3oK2wkg6X8K40EbkQhQnKS1IqG8o9CK0pEO7UKmGcF3BEId7THpSJE&_nc_zt=14&_nc_ht=scontent.ftce2-1.fna&_nc_gid=_zz2MnF15DDwxsRmmETnPA&_nc_ss=7b289&oh=00_AQSs2UdkOfQyBot7PUVLW9Mcq7ldOtAfPOxs5ellXphFwQ&oe=6AEA8802",
"libraryUrl": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=US&view_all_page_id=15087023444&media_type=all"
}
],
"fetchedAt": "2026-10-30T14:53:11.517Z"
}
}Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Company or brand name to search for (min 2 characters). Name-matched — off-brand pages are dropped. |
| country | string | No | Two-letter ISO country code. Default US. Non-ISO codes are a definitive 400 INVALID_COUNTRY. |
| limit | integer | No | Max items to return (default 20, max 200). Flat 2 credits per call. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. |
Frequently asked questions
What does the Facebook Ad Library Search Companies API do?
The Facebook Ad Library Search Companies API lets you search and return matching results from a public Facebook Ad Library query using one GET request to /v1/ad-library/facebook/search-companies. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the Facebook Ad Library Search Companies API cost?
Each successful call costs 2 credits. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.
Do I need a Facebook Ad Library API key or OAuth?
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle access, rate limits, retries, and authentication for you.
Is the Facebook Ad Library Search Companies API suitable for production use?
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.
Ready to run a Facebook Ad Library search companies?
Start free with 100 credits — no credit card required.
Get your free API key