Facebook Ad Library
GET /v1/ad-library/facebook/search-companies

Facebook Ad Library Search Companies API

Find Meta Ad Library pages by brand — name-matched, pageId for company-ads (not profileId).

2 credits per request
TL;DR
Find Meta Ad Library pages by brand — name-matched, pageId for company-ads (not profileId). The Facebook Ad Library Search Companies API (Facebook Ad Library) is a single authenticated GET request to /v1/ad-library/facebook/search-companies that responds with clean JSON and costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.

What is the Facebook Ad Library Search Companies API?

Search Meta Ad Library advertisers/pages by brand name. Results are relevance-filtered so query tokens must appear in the page name — off-brand pages that merely appeared near the keyword (e.g. Sukeban for q=nike) are dropped; empty beats spam. Each company returns id = pageId = advertiserId (pass to /facebook/company-ads), profileId when the facebook.com/{digits}/ URL uses a different numeric identity, vanity or numeric url, logo, and libraryUrl (ready view_all_page_id link). Chain: search-companies → companies[0].pageId → company-ads?url=. Flat 2 credits.

What you get

  • Name-matched ranking (exact brand first)
  • pageId / advertiserId for company-ads (view_all_page_id)
  • profileId when facebook.com/{digits}/ ≠ pageId
  • libraryUrl ready for Ad Library page view
  • Empty beats off-brand spam

Try it

Open in Playground

Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).

Parameters

Sign in to run live
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_..."

Edit the parameters and the code updates instantly. Switch languages and hit copy.

Example response

{
  "success": true,
  "data": {
    "query": "nike",
    "country": "US",
    "totalReturned": 3,
    "companies": [
      {
        "id": "146705838515566",
        "name": "Sukeban World",
        "url": "https://www.facebook.com/61551864263186/",
        "logo": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/517640014_2104272360362331_1464623957160374455_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zj4Fm9x6lhEQ7kNvwGyzer2&_nc_oc=Adpw1Rqb_eBzffqqgyQt5_CPB2Dct1h7kaRFJQZmeucV_ui5BXf-Q6skKKVFDUKvDH4&_nc_zt=14&_nc_ht=scontent-iad6-1.xx&_nc_gid=WFVhUXC3vFhp5HqXMO2_vg&_nc_ss=72289&oh=00_AQCbgqCqvp545MCPZrHlySJ8QWqgsWnjuxmEGnyIw8Gw3A&oe=6A611F63"
      },
      {
        "id": "15087023444",
        "name": "Nike",
        "url": "https://www.facebook.com/nike/",
        "logo": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/366635364_819887626183060_5665913834577832309_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=cpw1LHoxRRMQ7kNvwF0VELk&_nc_oc=Adp4gYKupQoA3SFulWbqwUFHqP4Hb9COtOidu_sWgA0fqGKhHNgkorx0YOcUbNCeAek&_nc_zt=14&_nc_ht=scontent-iad6-1.xx&_nc_gid=WFVhUXC3vFhp5HqXMO2_vg&_nc_ss=72289&oh=00_AQCzxYXtTr8L2PBX03C3WTbVmtXlrB0ZHR45OVmp6Pv9mA&oe=6A612326"
      }
    ]
  }
}

Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Source. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.

Response structure

A successful call returns success, cached, creditsUsed, and a data object with the following fields:

Top-level fields

  • queryThe search query you sent.
  • countryCountry for the request context. On popular-creators top-level: ISO feed market you queried (e.g. US) — not each creator's home country (see region).
  • totalReturnedNumber of items returned in this response.

Companies

Each item in companies contains:

  • idStable platform ID for the item.
  • nameName of the item or account. On profile endpoints: deprecated alias of displayName (one release).
  • urlCanonical URL of the item.
  • logoLogo image URL.

Parameters

NameTypeRequiredDescription
qstringYesCompany or brand name to search for (min 2 characters). Name-matched — off-brand pages are dropped.
countrystringNoTwo-letter ISO country code. Default US.
limitintegerNoMax items to return (default 20, max 200). Flat 2 credits per call.
cachebooleanNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits.

Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs 2 credits. Pass cache=true for a free 24h cache hit; default is always fresh.

Using an AI agent? This endpoint is the MCP tool facebook_ad_library_search_companies via @captapi/mcp. Set it up →

How it works

  1. 1. Sign up — get 100 free credits, no card required.
  2. 2. Create a key from your dashboard.
  3. 3. Send one request to /v1/ad-library/facebook/search-companies and parse the JSON response.

Use cases

Trend Discovery

Find trending content by keyword or hashtag.

Content Sourcing

Build feeds and playlists programmatically.

Monitoring

Track topics, brands, and competitors.

Research

Sample large sets of content for analysis.

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. Hits include cached + cachedAt. 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 proxies, 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. Hits include cached + cachedAt. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.

More Facebook Ad Library APIs

Ready to use the Facebook Ad Library Search Companies API?

Sign up, grab your key, and make your first call in 60 seconds.