API para Facebook: Anúncios da empresa
Liste os anúncios da Biblioteca de Anúncios da Meta que uma empresa está veiculando, por ID da página ou nome da empresa (texto do criativo, formato, plataformas e datas de veiculação), com paginação por cursor.
Preços
Um preço, em dólares
Teste
Faça sua primeira requisição
{
"data": {
"ads": [
{
"active": true,
"adCount": 12500,
"caption": "A short example description of this item.",
"categories": [
"example"
],
"ctaText": "A short example description of this item.",
"ctaType": "general",
"currency": "USD",
"displayFormat": "example",
"endDate": 42,
"id": "a1b2c3d4",
"isReshared": true,
"linkDescription": "https://example.com/page",
"linkUrl": "https://example.com/page",
"media": [
{
"height": 42,
"type": "general",
"url": "https://example.com/page",
"videoUrl": "https://example.com/page",
"width": 1024
}
],
"pageCategories": [
"example"
],
"pageDeleted": false,
"pageId": "a1b2c3d4",
"pageLikes": 12500,
"pageName": "Example title",
"pageProfilePicture": "https://example.com/image.jpg",
"pageUrl": "https://example.com/page",
"platforms": [
"example"
],
"startDate": 42,
"text": "A short example description of this item.",
"title": "Example title"
}
],
"nextCursor": "example",
"totalResults": 12500
},
"found": true,
"reason": "not_found"
}interface FacebookCompanyAdsResponse {
data: {
ads: {
active: boolean;
adCount: number | null;
caption?: string;
categories?: string[];
ctaText?: string;
ctaType?: string;
currency: string;
displayFormat: string;
endDate: number;
id: string;
isReshared?: boolean;
linkDescription?: string;
linkUrl?: string;
media?: {
height?: number;
type: string;
url: string;
videoUrl?: string;
width?: number;
}[];
pageCategories?: string[];
pageDeleted?: boolean;
pageId: string;
pageLikes?: number;
pageName: string;
pageProfilePicture?: string;
pageUrl?: string;
platforms: string[];
startDate: number;
text: string;
title?: string;
}[];
nextCursor: string | null;
totalResults?: number;
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 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"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| companyName | string | "nike"Nome da empresa a buscar (ex.: "nike"). Correspondência exata e sensível a maiúsculas e minúsculas no índice da Biblioteca de Anúncios da Meta; um anunciante sem página indexada retorna found:false. |
| country | string | Código de país de duas letras para delimitar os resultados. O padrão é todos os países. |
| cursor | string | Cursor de paginação opaco do nextCursor de uma resposta anterior. |
| endDate | string | Filtra anúncios com impressões nesta data ou antes, no formato YYYY-MM-DD. |
| language | string | Código de idioma de duas letras para filtrar anúncios (ex.: "EN", "ES", "FR"). |
| mediaType | enum | Filtro de tipo de mídia do criativo. |
| pageId | string | ID da página da empresa na Biblioteca de Anúncios. Informe pageId ou companyName. |
| sortBy | enum | "recent"Ordenação: impressions (mais impressões primeiro, o padrão) ou recent (mais recentes). |
| startDate | string | Filtra anúncios com impressões nesta data ou depois, no formato YYYY-MM-DD. |
| status | enum | Filtro de status do anúncio. O padrão é ACTIVE. |
| Resposta | ||
| data | object | |
| data.ads | object[] | |
| data.ads[].active | boolean | |
| data.ads[].adCount | integer | Number of ads in this campaign (collation count). Null when the source does not report it. |
| data.ads[].caption | string | Caption line of the ad creative, usually the advertiser's display domain. |
| data.ads[].categories | string[] | Ad Library categories the ad is filed under. |
| data.ads[].ctaText | string | Call-to-action button label on the ad. |
| data.ads[].ctaType | string | Call-to-action button type on the ad, e.g. "SHOP_NOW". |
| 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[].isReshared | boolean | Whether the ad creative is a reshare of another post. |
| data.ads[].linkDescription | string | Description text shown under the ad's link. |
| data.ads[].linkUrl | string | Destination URL the ad links to. |
| 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[].pageCategories | string[] | Categories Facebook lists the advertising page under. |
| data.ads[].pageDeleted | boolean | Whether the advertising page has been deleted. |
| data.ads[].pageId | string | Populated whenever the provider has data for the entity. |
| data.ads[].pageLikes | integer | Like count of the advertising page. |
| 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[].pageUrl | string | Canonical Facebook URL of the advertising page. |
| 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.ads[].title | string | Headline of the ad creative. |
| 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. |
| data.totalResults | integer | Total number of ads Facebook reports for the page. |
| found | boolean | |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Preço | ||
| Preço por requisição | USD | US$ 0,0012 |
| Preço /mil req. | USD | US$ 1,20 |
Dúvidas frequentes
Sobre o endpoint Anúncios da empresa da API para Facebook
O endpoint Anúncios da empresa da AnyAPI para Facebook retorna dados de Facebook em JSON normalizado com uma chamada POST para /v1/run/facebook.company_ads. Liste os anúncios da Biblioteca de Anúncios da Meta que uma empresa está veiculando, por ID da página ou nome da empresa (texto do criativo, formato, plataformas e datas de veiculação), com paginação por cursor. A AnyAPI retorna um schema normalizado, seja qual for a fonte que atende. Custa a partir de US$ 1,20 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 94,7% das chamadas ao endpoint Anúncios da empresa da API para Facebook feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 2,7 segundos, em 1.996 chamadas medidas.