# SocialFetch Facebook Ad Library – List Company Ads

> SocialFetch Facebook Ad Library – List Company Ads is a paid API for AI agents from api.socialfetch.dev, paid per call via x402, $0.014/call, status unknown (last checked 2026-09-15).

List all ads a company or Facebook Page is currently or previously running, pulled from the Facebook Ad Library, with filtering by status, country, date range, media type, and language.

## Facts

- Endpoint: GET https://api.socialfetch.dev/v1/facebook/ad-library/companies/ads
- Price: $0.014/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/socialfetch-facebook-ad-library-list-company-ads-a0e23355
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qh_8kWa3RVV0Da-1x2xH4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability socialfetch-facebook-ad-library-list-company-ads-a0e23355
```

Example prompt: Show me all active Facebook ads that Nike is currently running in the US, sorted by impressions — I want to see what image and video creatives they're using right now.

## When to prefer this

Use this endpoint when you need to enumerate all ads (active, inactive, or both) associated with a specific company or Facebook Page, especially for competitive research, ad monitoring, or compliance checks. Prefer over manual Facebook Ad Library browsing when you need structured, filterable, paginated data programmatically. Use pageId for precision when you already have the Facebook page identifier; use companyName for discovery-style searches.

## Known failure modes

- Company name not found in Facebook Ad Library — returns empty results
- Invalid page ID — returns error or empty list
- Unsupported country code — validation error
- Date range with endDate before startDate — validation error
- Rate limiting or payment failure — HTTP 402 or 429
- Cursor expired or invalid — pagination error

## How this service works

List ads a company or Page is running in the Facebook Ad Library.

## Output

A paginated list of ads associated with the specified company or Facebook Page, including ad creatives, media type, status (active/inactive), impression data, and a nextCursor for fetching additional pages.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "cursor": {
       "type": "string",
       "minLength": 1,
       "description": "Opaque pagination cursor from a previous response."
      },
      "pageId": {
       "type": "string",
       "maxLength": 4096,
       "minLength": 1,
       "description": "Facebook page id when you have it instead of a company name."
      },
      "sortBy": {
       "enum": [
        "impressions",
        "most-recent"
       ],
       "type": "string",
       "description": "Optional sort order for returned ads."
      },
      "status": {
       "enum": [
        "all",
        "active",
        "inactive"
       ],
       "type": "string",
       "description": "Optional ad status filter."
      },
      "country": {
       "type": "string",
       "maxLength": 3,
       "minLength": 2,
       "description": "Optional country code filter. Use ALL to search all countries."
      },
      "endDate": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "Optional end date filter in YYYY-MM-DD format."
      },
      "language": {
       "type": "string",
       "maxLength": 8,
       "minLength": 2,
       "description": "Optional language code filter."
      },
      "mediaType": {
       "enum": [
        "all",
        "image",
        "video",
        "meme",
        "image-and-meme",
        "none"
       ],
       "type": "string",
       "description": "Optional creative media filter."
      },
      "startDate": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "Optional start date filter in YYYY-MM-DD format."
      },
      "companyName": {
       "type": "string",
       "maxLength": 4096,
       "minLength": 1,
       "description": "Company or page name to search when you do not have a page id."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/socialfetch-facebook-ad-library-list-company-ads-a0e23355/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.socialfetch.dev](https://www.zero.xyz/host/api.socialfetch.dev/llms.txt)
