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.
Try it
Make your first request
{
"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
}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 30dcurl -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"}'| Field | Type | Example value |
|---|---|---|
| Request body | ||
| companyName | string | "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. |
| country | string | Two-letter country code to scope results. Defaults to all countries. |
| cursor | string | Opaque pagination cursor from a previous response's nextCursor. |
| endDate | string | Filter to ads with impressions on or before this date, in YYYY-MM-DD format. |
| language | string | Two-letter language code to filter ads (e.g. "EN", "ES", "FR"). |
| mediaType | enum | Creative media type filter. |
| pageId | string | Company's Ad Library page ID. Provide either pageId or companyName. |
| sortBy | enum | "recent"Sort order: impressions (highest first, the default) or recent (most recent). |
| startDate | string | Filter to ads with impressions on or after this date, in YYYY-MM-DD format. |
| status | enum | Ad status filter. Defaults to ACTIVE. |
| Response | ||
| data | object | |
| data.ads | object[] | |
| data.ads[].active | boolean | |
| data.ads[].adCount | integer | Number of ads in this campaign (collation count). |
| data.ads[].currency | string | |
| data.ads[].displayFormat | string | Populated whenever the provider has data for the entity. |
| data.ads[].endDate | integer | Epoch seconds. |
| data.ads[].id | string | Ad Library archive ID. Populated whenever the provider has data for the entity. |
| data.ads[].media | object[] | 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[].height | integer | Pixel height of the media item, when the lane reports it. |
| data.ads[].media[].type | string | One of photo, video, or gif. |
| data.ads[].media[].url | string | Image URL. For a video or GIF this is the poster/thumbnail frame. |
| data.ads[].media[].videoUrl | string | Playable video file URL. Present only for video and gif items. |
| data.ads[].media[].width | integer | Pixel width of the media item, when the lane reports it. |
| data.ads[].pageId | string | Populated whenever the provider has data for the entity. |
| data.ads[].pageName | string | Populated whenever the provider has data for the entity. |
| data.ads[].pageProfilePicture | string | Profile picture of the advertising page. This is the advertiser's identity image, not ad creative. |
| data.ads[].platforms | string[] | Populated whenever the provider has data for the entity. |
| data.ads[].startDate | integer | Epoch seconds. Populated whenever the provider has data for the entity. |
| data.ads[].text | string | Ad body text. Populated whenever the provider has data for the entity. |
| data.nextCursor | string | Opaque cursor for the next page of ads, or null when this lane has no more. Pass it back as cursor to continue. |
| found | boolean | |
| Price | ||
| Price per request | USD | $0.0012 |
| Price /1k req | USD | $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.