Facebook Ad Library · Guide

How to run a Facebook Ad Library search companies

TL;DR
To run a Facebook Ad Library search companies, sign up for a free Captapi key, then send one 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. 1

    Get a free API key

    Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.

  2. 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. 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": 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 (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.

Request parameters

NameTypeRequiredDescription
qstring YesCompany 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.

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.

Ready to run a Facebook Ad Library search companies?

Start free with 100 credits — no credit card required.

Get your free API key