API de Facebook

API de Facebook: Anuncios de una empresa

Lista los anuncios de la Biblioteca de anuncios de Meta que publica una empresa, por ID de página o nombre de la empresa (texto del anuncio, formato, plataformas y fechas de circulación), con paginación por cursor.

US$1.10/1k solic., pagas por solicitud, sin suscripción.

fMeta Ad Library
facebook.com/ads/library/?view_all_page_id=1185617869915074
Meta
United StatesiAll adsTrailhead Outdoors

Trailhead Outdoors

AdsAbout

Trailhead Outdoors

Active · Sponsored

Built from 20D ripstop nylon, the Wren 2 tent weighs 2.1 lbs and sets up in under 90 seconds. Backed by our lifetime warranty.

photo

trailheadoutdoors.com

Free returns within 60 days.

Shop Now
Library ID: 1185617869915074FBIG

Trailhead Outdoors

Active · Sponsored

Our down quilt drops to 15F and packs down to the size of a grapefruit. Made for thru hikers who count every ounce.

photo

trailheadoutdoors.com

Ships in 2 to 3 business days.

Shop Now
Library ID: 1092837465210983FBIGMSG
Lo que devolvió la APIads[0]
{
"id": "1185617869915074",
"pageId": "281940573310482",
"pageName": "Trailhead Outdoors",
"active": true,
"startDate": 1755302400,
"endDate": 1758758400,
"currency": "USD",
"text": "Built from 20D ripstop nylon, the Wren 2 tent weighs 2.1 lbs and sets up in under 90 seconds. Backed by our lifetime warranty.",
... 18 campos más
}
Disponibilidad
99.89%
30d · 442,678 llamadas
Solicitudes
443,111
30d · semanal, últimas 12 sem.
Respuesta
1.5s
mediana · 30d

Precios y proveedores

Precios del endpoint Anuncios de una empresa de la API de Facebook: una API, 2 proveedores intercambiables

El proveedor más barato responde primero. Si falla, el siguiente toma el relevo en la misma llamada.

Pagas
US$11.00
US$1.10/1k solic., solo por lo que usas. Sin plan mensual.
Tus primeras 90 solicitudes son gratis con el saldo inicial de US$0.10.

Pruébalo

Obtén Anuncios de una empresa de Facebook en una sola solicitud

Abrir en
Respuesta de ejemplo
Las ejecuciones gratis devuelven solo los primeros 3 resultados. Agrega fondos a una clave para obtener la respuesta completa.

Este ejemplo muestra 34 de 46 campos. Ver todos los campos

{
  "found": true,
  "data": {
    "nextCursor": "AbTr8k2m9x1v7c3q",
    "totalResults": 18,
    "ads": [
      {
        "id": "1185617869915074",
        "pageId": "281940573310482",
        "pageName": "Trailhead Outdoors",
        "active": true,
        "startDate": 1755302400,
        "endDate": 1758758400,
        "currency": "USD",
        "text": "Built from 20D ripstop nylon, the Wren 2 tent weighs 2.1 lbs and sets up in under 90 seconds. Backed by our lifetime warranty.",
        "displayFormat": "DCO",
        "platforms": [
          "facebook",
          "instagram"
        ],
        "adCount": 2,
        "pageProfilePicture": "https://scontent.fbcdn.net/trailhead-profile.jpg",
        "media": [
          {
            "type": "photo",
            "url": "https://scontent.xx.fbcdn.net/v/t45.1600-4/wren-tent-creative-1.jpg",
            "width": 1080,
            "height": 1080
          }
        ],
        "caption": "trailheadoutdoors.com",
        "linkDescription": "Free returns within 60 days.",
        "pageUrl": "https://www.facebook.com/trailheadoutdoors",
        "pageCategories": [
          "Product/service",
          "Outdoor recreation"
        ],
        "pageLikes": 22400,
        "isReshared": false,
        "pageDeleted": false,
        "categories": [
          "Uncategorized"
        ],
        "title": "The 3 season tent that packs to a water bottle",
        "ctaText": "Shop Now",
        "ctaType": "SHOP_NOW",
        "linkUrl": "https://trailheadoutdoors.com/products/wren-2-tent"
      },
      {
        "id": "1092837465210983",
        "pageId": "281940573310482",
        "pageName": "Trailhead Outdoors",
        "active": true,
        "startDate": 1753488000,
        "endDate": 1759104000,
        "currency": "USD",
        "text": "Our down quilt drops to 15F and packs down to the size of a grapefruit. Made for thru hikers who count every ounce.",
        "displayFormat": "IMAGE",
        "platforms": [
          "facebook",
          "instagram",
          "messenger"
        ],
        "adCount": 1,
        "pageProfilePicture": "https://scontent.fbcdn.net/trailhead-profile.jpg",
        "media": [
          {
            "type": "photo",
            "url": "https://scontent.xx.fbcdn.net/v/t45.1600-4/trailhead-quilt-creative.jpg",
            "width": 1080,
            "height": 1350
          }
        ],
        "caption": "trailheadoutdoors.com",
        "linkDescription": "Ships in 2 to 3 business days.",
        "pageUrl": "https://www.facebook.com/trailheadoutdoors",
        "pageCategories": [
          "Product/service",
          "Outdoor recreation"
        ],
        "pageLikes": 22400,
        "isReshared": false,
        "pageDeleted": false,
        "categories": [
          "Uncategorized"
        ],
        "title": "15F down quilt, packs to a grapefruit",
        "ctaText": "Shop Now",
        "ctaType": "SHOP_NOW",
        "linkUrl": "https://trailheadoutdoors.com/products/down-quilt-15f"
      }
    ]
  }
}

Referencia completa de parámetros y respuesta: cada campo, tipo y ejemplo de este endpoint.

Referencia

Una solicitud, un formato de respuesta.

Cada campo que envías y cada campo que recibes, cada uno con un ejemplo real.

Verificado por última vez el 2026-11-14 · disponibilidad y latencia medidas en 30d

Cuerpo de la solicitud

JSON, enviado por POST a este endpoint.

  • companyNamestring

    Trailhead Outdoors

    Nombre de la empresa a buscar (p. ej., "nike"). Coincidencia exacta y sensible a mayúsculas y minúsculas contra el índice de la Biblioteca de anuncios de Meta; un anunciante sin página indexada devuelve found:false.

  • countrystring

    Código de país de dos letras para acotar los resultados. Por defecto, todos los países.

  • cursorstring

    Cursor de paginación opaco del nextCursor de una respuesta anterior.

  • endDatestring

    Filtra los anuncios con impresiones en esta fecha o antes, en formato YYYY-MM-DD.

  • languagestring

    Código de idioma de dos letras para filtrar anuncios (p. ej., "EN", "ES", "FR").

  • mediaTypeenum

    Filtro por tipo de medio del anuncio.

  • pageIdstring

    ID de página de la empresa en la Biblioteca de anuncios. Indica pageId o companyName.

  • sortByenum

    recent

    Orden: impressions (más altas primero, por defecto) o recent (más recientes).

  • startDatestring

    Filtra los anuncios con impresiones en esta fecha o después, en formato YYYY-MM-DD.

  • statusenum

    Filtro por estado del anuncio. Por defecto, ACTIVE.

Envías. Un cuerpo JSON pequeño. Los valores que se muestran son ejemplos para reemplazar por los tuyos.

Respuesta

JSON, un valor de ejemplo por campo.

each addata.ads[]
  • activeboolean

    true

  • adCountinteger

    2

    Number of ads in this campaign (collation count). Null when the source does not report it.

  • captionstring

    trailheadoutdoors.com

    Caption line of the ad creative, usually the advertiser's display domain.

  • categoriesstring[]

    Ad Library categories the ad is filed under.

  • ctaTextstring

    Shop Now

    Call-to-action button label on the ad.

  • ctaTypestring

    SHOP_NOW

    Call-to-action button type on the ad, e.g. "SHOP_NOW".

  • currencystring

    USD

  • displayFormatstring

    DCO

    Populated whenever the provider has data for the entity.

  • endDateinteger

    1758758400

    Epoch seconds.

  • idstring

    1185617869915074

    Ad Library archive ID. Populated whenever the provider has data for the entity.

  • isResharedboolean

    false

    Whether the ad creative is a reshare of another post.

  • linkDescriptionstring

    Free returns within 60 days.

    Description text shown under the ad's link.

  • linkUrlstring

    https://trailheadoutdoors.com/products/wren-2-tent

    Destination URL the ad links to.

  • pageCategoriesstring[]

    Categories Facebook lists the advertising page under.

  • pageDeletedboolean

    false

    Whether the advertising page has been deleted.

  • pageIdstring

    281940573310482

    Populated whenever the provider has data for the entity.

  • pageLikesinteger

    22400

    Like count of the advertising page.

  • pageNamestring

    Trailhead Outdoors

    Populated whenever the provider has data for the entity.

  • pageProfilePicturestring

    https://scontent.fbcdn.net/trailhead-profile.jpg

    Profile picture of the advertising page. This is the advertiser's identity image, not ad creative.

  • pageUrlstring

    https://www.facebook.com/trailheadoutdoors

    Canonical Facebook URL of the advertising page.

  • platformsstring[]

    Populated whenever the provider has data for the entity.

  • startDateinteger

    1755302400

    Epoch seconds. Populated whenever the provider has data for the entity.

  • textstring

    Built from 20D ripstop nylon, the Wren 2 tent weighs 2.1 lbs and sets up in under 90 seconds. Backed by our lifetime warranty.

    Ad body text. Populated whenever the provider has data for the entity.

  • titlestring

    The 3 season tent that packs to a water bottle

    Headline of the ad creative.

each creativedata.ads[].creatives[]

One entry per card of a carousel, dynamic-product, or dynamic-creative ad, in the order Meta returns them, each with its own text and destination. Single-creative ads return an empty array. The same card images and videos also appear in media. Meta CDN media URLs are signed and expire.

  • bodystring

    Card body text.

  • captionstring

    Card display caption, usually the destination domain.

  • ctaTextstring

    Card call-to-action label (e.g. "Shop Now").

  • ctaTypestring

    Card call-to-action type (e.g. "SHOP_NOW").

  • imagestring

    Card image URL. For a video card this is the poster frame.

  • linkDescriptionstring

    Card secondary description line.

  • linkUrlstring

    Card destination URL.

  • titlestring

    Card headline.

  • videoUrlstring

    Card video file URL (HD when supplied, otherwise SD). Present only on video cards.

each mediadata.ads[].media[]

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.

  • heightinteger

    1080

    Pixel height of the media item, when the lane reports it.

  • typestring

    photo

    One of photo, video, or gif.

  • urlstring

    https://scontent.xx.fbcdn.net/v/t45.1600-4/wren-tent-creative-1.jpg

    Image URL. For a video or GIF this is the poster/thumbnail frame.

  • videoUrlstring

    Playable video file URL. Present only for video and gif items.

  • widthinteger

    1080

    Pixel width of the media item, when the lane reports it.

datadata
  • nextCursorstring

    AbTr8k2m9x1v7c3q

    Opaque cursor for the next page of ads, or null when this lane has no more. Pass it back as cursor to continue.

  • totalResultsinteger

    18

    Total number of ads Facebook reports for the page.

top level
  • foundboolean

    true

  • 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.

Recibes. Campos con nombre y tipo, con el mismo formato sin importar qué fuente responda.

¿Vendes esta API? Consulta el esquema completo que debe devolver tu endpoint.

Preguntas frecuentes

Acerca del endpoint Anuncios de una empresa de la API de Facebook

El endpoint Anuncios de una empresa de AnyAPI para Facebook devuelve datos de Facebook como JSON normalizado con una sola llamada POST a /v1/run/facebook.company_ads. Lista los anuncios de la Biblioteca de anuncios de Meta que publica una empresa, por ID de página o nombre de la empresa (texto del anuncio, formato, plataformas y fechas de circulación), con paginación por cursor. AnyAPI enruta cada solicitud entre 2 fuentes y recurre automáticamente a otra cuando una falla. Cuesta desde US$1.10 por cada 1,000 solicitudes, en dólares estadounidenses, sin suscripción y sin mínimo mensual. En los últimos 30 días, el 99.9% de las llamadas al endpoint Anuncios de una empresa de la API de Facebook a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 1.5 segundos en 442.678 llamadas medidas.

Cuesta desde US$1.10 por cada 1,000 solicitudes, en dólares estadounidenses, sin suscripción y sin mínimo mensual. Agregas fondos a una billetera en dólares y cada llamada descuenta de ella. Algunas solicitudes fallidas pagadas con la billetera generan cargos de procesamiento que trasladamos al costo, sin margen; la respuesta de error muestra el monto cobrado.

Lista los anuncios de la Biblioteca de anuncios de Meta que publica una empresa, por ID de página o nombre de la empresa (texto del anuncio, formato, plataformas y fechas de circulación), con paginación por cursor. La respuesta es JSON normalizado con el mismo envoltorio que devuelve cada endpoint de AnyAPI, así que procesar un segundo endpoint es solo cambiar la URL.

En los últimos 30 días, el 99.9% de las llamadas al endpoint Anuncios de una empresa de la API de Facebook a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 1.5 segundos en 442.678 llamadas medidas. Estas son mediciones propias de AnyAPI sobre el tráfico que pasa por el gateway, recalculadas continuamente, no un objetivo de nivel de servicio publicado.

Sí. Una cuenta nueva de AnyAPI empieza con US$0.10 de saldo gratis, sin tarjeta, que alcanza para 90 llamadas a Anuncios de una empresa de Facebook a US$0.0011 cada una.

AnyAPI consulta la siguiente de sus 2 fuentes en la misma solicitud, empezando por la más barata, así que la caída de una fuente no hace fallar tu llamada.

Envía una solicitud POST a https://api.getanyapi.com/v1/run/facebook.company_ads con tu clave de AnyAPI en un encabezado "Authorization: Bearer" y la entrada como cuerpo JSON. La misma clave y la misma billetera sirven para todos los endpoints de AnyAPI.

No. Agregas dólares a un solo saldo prepagado de AnyAPI y cada solicitud descuenta de él. No hay plan mensual ni mínimo, y el mismo saldo paga todos los endpoints de AnyAPI.

Sí. Instala @getanyapi/sdk desde npm para TypeScript o getanyapi desde pip para Python. Ambos llaman a todos los endpoints de AnyAPI con la misma clave, y también sirve cualquier cliente HTTP.

Sí. Un agente puede conectarse al servidor MCP de AnyAPI en https://api.getanyapi.com/mcp, o crear su propia clave de prueba gratis con un solo POST sin autenticar a https://api.getanyapi.com/agent/signup y llamar a este endpoint por HTTP.