Facebook API

Facebook Company ads API

List the Meta Ad Library ads a company is running by page ID or company name (creative text, format, platforms, and run dates) with cursor pagination.

POST/v1/run/facebook.company_ads
Uptime
89.89%
30d · 1,157 calls
Requests
1,161
30d · weekly, last 12 wks
Response
3.1s
median · 30d

Pricing

One price, in dollars

Try it

Make your first request

Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
  "data": {
    "ads": [
      {
        "active": true,
        "adCount": 12500,
        "currency": "USD",
        "displayFormat": "example",
        "endDate": 42,
        "id": "a1b2c3d4",
        "media": [
          {
            "height": 42,
            "type": "general",
            "url": "https://example.com/page",
            "videoUrl": "https://example.com/page",
            "width": 1024
          }
        ],
        "pageId": "a1b2c3d4",
        "pageName": "Example title",
        "pageProfilePicture": "https://example.com/image.jpg",
        "platforms": [
          "example"
        ],
        "startDate": 42,
        "text": "A short example description of this item."
      }
    ],
    "nextCursor": "example"
  },
  "found": true
}
Response interface
interface FacebookCompanyAdsResponse {
  data: {
    ads: {
      active: boolean;
      adCount: number;
      currency: string;
      displayFormat: string;
      endDate: number;
      id: string;
      media?: {
        height?: number;
        type: string;
        url: string;
        videoUrl?: string;
        width?: number;
      }[];
      pageId: string;
      pageName: string;
      pageProfilePicture?: string;
      platforms: string[];
      startDate: number;
      text: string;
    }[];
    nextCursor: string | null;
  } | null;
  found: boolean;
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

Request, response, and price

Last verified 2026-09-16 · uptime and latency measured over 30d
POST /v1/run/facebook.company_ads
curl -X POST https://api.getanyapi.com/v1/run/facebook.company_ads \
  -H "Authorization: Bearer $ANYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"companyName":"nike","sortBy":"recent"}'
FieldTypeExample value
Request body
companyNamestring"nike"Company name to search (e.g. "nike"). Exact-match and case-sensitive against the Meta Ad Library index; an advertiser with no indexed page returns found:false.
countrystringTwo-letter country code to scope results. Defaults to all countries.
cursorstringOpaque pagination cursor from a previous response's nextCursor.
endDatestringFilter to ads with impressions on or before this date, in YYYY-MM-DD format.
languagestringTwo-letter language code to filter ads (e.g. "EN", "ES", "FR").
mediaTypeenumCreative media type filter.
pageIdstringCompany's Ad Library page ID. Provide either pageId or companyName.
sortByenum"recent"Sort order: impressions (highest first, the default) or recent (most recent).
startDatestringFilter to ads with impressions on or after this date, in YYYY-MM-DD format.
statusenumAd status filter. Defaults to ACTIVE.
Response
dataobject
data.adsobject[]
data.ads[].activeboolean
data.ads[].adCountintegerNumber of ads in this campaign (collation count).
data.ads[].currencystring
data.ads[].displayFormatstringPopulated whenever the provider has data for the entity.
data.ads[].endDateintegerEpoch seconds.
data.ads[].idstringAd Library archive ID. Populated whenever the provider has data for the entity.
data.ads[].mediaobject[]Creative attached to the ad: one element per image, video, or carousel card, in the order the ad presents them. Empty when the ad has none.
data.ads[].media[].heightintegerPixel height of the media item, when the lane reports it.
data.ads[].media[].typestringOne of photo, video, or gif.
data.ads[].media[].urlstringImage URL. For a video or GIF this is the poster/thumbnail frame.
data.ads[].media[].videoUrlstringPlayable video file URL. Present only for video and gif items.
data.ads[].media[].widthintegerPixel width of the media item, when the lane reports it.
data.ads[].pageIdstringPopulated whenever the provider has data for the entity.
data.ads[].pageNamestringPopulated whenever the provider has data for the entity.
data.ads[].pageProfilePicturestringProfile picture of the advertising page. This is the advertiser's identity image, not ad creative.
data.ads[].platformsstring[]Populated whenever the provider has data for the entity.
data.ads[].startDateintegerEpoch seconds. Populated whenever the provider has data for the entity.
data.ads[].textstringAd body text. Populated whenever the provider has data for the entity.
data.nextCursorstringOpaque cursor for the next page of ads, or null when this lane has no more. Pass it back as cursor to continue.
foundboolean
Price
Price per requestUSD$0.0012
Price /1k reqUSD$1.20

FAQ

About the Facebook Company ads API

The AnyAPI Facebook Company ads API returns Facebook company ads data as normalized JSON from one POST call to /v1/run/facebook.company_ads. List the Meta Ad Library ads a company is running by page ID or company name (creative text, format, platforms, and run dates) with cursor pagination. AnyAPI returns one normalized schema whichever source serves it. It costs from $1.20 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 89.9% of Facebook company ads calls through AnyAPI succeeded, with a median response time of 3.1 seconds across 1,157 measured calls.

It costs from $1.20 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.

List the Meta Ad Library ads a company is running by page ID or company name (creative text, format, platforms, and run dates) with cursor pagination. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

Over the last 30 days, 89.9% of Facebook company ads calls through AnyAPI succeeded, with a median response time of 3.1 seconds across 1,157 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.