---
title: "Facebook Ad Library Search Companies API"
method: GET
path: "/v1/ad-library/facebook/search-companies"
tags: ["Facebook Ad Library"]
---

# Facebook Ad Library Search Companies API

`GET /v1/ad-library/facebook/search-companies`

## Request

- Base URL: `https://api.captapi.com`
- URL: `https://api.captapi.com/v1/ad-library/facebook/search-companies`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

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

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.

Docs: https://captapi.com/apis/facebook-ad-library-search-companies

## Query parameters

- `q` string, required
- `country` string
- `limit` integer
- `cache` boolean

## Response `200`

Success. The data object for this endpoint.

- object
  - `success` unknown, required
  - `data` object, required
    - `query` string: The search query you sent.
    - `country` string: ISO market you queried (e.g. US). Not a popular-creators feed market.
    - `totalReturned` integer: Number of items returned in this response.
    - `companies` object[]
      - `id` string: Id of this companies item.
      - `name` string: Name of this companies item.
      - `url` string: Canonical URL of the item.
      - `logo` string: Logo image URL.

## Other responses

- `400`: Bad request: wrong platform URL, unknown endpoint, or an invalid parameter value. Not billed.
- `401`: Missing, invalid or revoked API key. Not billed.
- `402`: Not enough credits for this request. Not billed.
- `404`: The resource does not exist or is not public. Not billed.
- `422`: A required parameter is missing or has the wrong type. Not billed.
- `429`: Rate limit reached. Wait for Retry-After seconds. Not billed.
- `502`: The platform could not be reached or returned nothing usable. Retryable, not billed. 503 and 504 use the same envelope.

---

[API](https://skmtc.dev/captapi/apis/captapi-api.md) · [All operations](https://skmtc.dev/captapi/apis/captapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/captapi/apis/captapi-api/revisions/c9b9ac5ff1bd?raw)
