APIDataScrapers

Facebook company ad library

Retrieve company ad library with the Facebook API. The sample response includes captions, images and titles. Use it for account research or company due diligence. Choose an implementation and check its published request fields, examples, and usage pricing before integrating.

Selected price
$0.00188 / callPublished pricing
Sellers / APIs
1 / 2
Requests · 30d
—Loading...
Success rate · 30d
—Loading...
USE THIS API

Facebook company ad library

Prepare your request, then continue with your agent.

Selected price

$0.00188 / call

Provider
API
Pricing
Connect your agent
On this page

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
Optional parameters (11)
The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName
The name of the company. Can either use this or pageId
This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
Status of the ad. Defaults to ACTIVE.
Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.
Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc
Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
Start date to search for. Format: YYYY-MM-DD
End date to search for. Format: YYYY-MM-DD
Cursor to paginate through results
Set to true for a trimmed down version of the response

Sample response

{
  "credits_charged": 1,
  "credits_remaining": 1000000,
  "cursor": "AQHR2LpCDWOZyAGp-ZKr8rUsapAXh8rWjYuNxVvuU7L0kte18hxkxnaXM3e5jEZNgdcU",
  "results": [
    {
      "ad_archive_id": "1212560900568826",
      "end_date": 1750230000,
      "end_date_string": "2025-06-18T07:00:00.000Z",
      "is_aaa_eligible": false,
      "is_active": true,
      "page_id": "15087023444",
      "page_name": "Nike",
      "political_countries": [],
      "publisher_platform": [
        "FACEBOOK"
      ],
      "reach_estimate": null,
      "snapshot": {
        "additional_info": null,
        "body": {
          "text": "Que el frío no te detenga. Explora la colección de invierno con estilo y actitud Nike. 🧥"
        },
        "branded_content": null,
        "brazil_tax_id": null,
        "byline": null,
        "caption": "fb.com",
        "cards": [],
        "country_iso_code": null,
        "cta_text": "Learn more",
        "cta_type": "LEARN_MORE",
        "current_page_name": "Nike",
        "disclaimer_label": null,
        "display_format": "VIDEO",
        "ec_certificates": [],
        "event": null,
        "extra_images": [],
        "extra_links": [
          "https://www.nike.com.pe/productos/ropa/casacas-y-chalecos_conjunto_pantalones_poleras?utm_source=facebook&utm_medium=paid&utm_campaign=junio_invierno_transacciones&utm_content=intereses2_invierno_collection2"
        ],
        "extra_texts": [],
        "extra_videos": [
          {
            "video_hd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/508262243_4710910432468923_4352661581573318069_n.?_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=bQXAtOCS-PMQ7kNvwEbVbC_&_nc_oc=AdnZ87pJ-oeIb5L7fizjaxNmRp0qkvq2SP_ADcnPFzMPca1L8gvUkpmF_c5vrAYmetw&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfM8Q_xyap9vnoEn5T7FqI9yfO1ySPPKyJVGXPmaim5tCw&oe=685A58CD",
            "video_sd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
            "watermarked_video_hd_url": null,
            "watermarked_video_sd_url": null
          }
        ],
        "images": [],
        "is_reshared": false,
        "link_description": null,
        "link_url": "https://fb.com/canvas_doc/569658969305127",
        "page_categories": [
          "Ropa deportiva"
        ],
        "page_entity_type": "PERSON_PROFILE",
        "page_id": "15087023444",
        "page_is_deleted": false,
        "page_is_profile_page": false,
        "page_like_count": 37497718,
        "page_name": "Nike",
        "page_profile_picture_url": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508742493_1906025190144374_200543536673957484_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=GUPolKbhQA4Q7kNvwH8Woql&_nc_oc=AdnsaYY9-9p8kkFm594f86VsMEc2Wias8yMQ69ZC2VOv642bjUgMRJNtfihFM4vr62o&_nc_zt=14&_nc_ht=scontent-ord5-1.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfO73iYbuEFgc4yfmi6pUnjLAd0I1W5ac9hmHZqjq2KP3g&oe=685A4C47",
        "page_profile_uri": "https://facebook.com/nike",
        "root_reshared_post": null,
        "title": "Look de invierno activado",
        "videos": [
          {
            "video_hd_url": "https://video-ord5-2.xx.fbcdn.net/v/t42.1790-2/508345466_4710910465802253_4502560017294477681_n.?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=_z9ndrNSqU4Q7kNvwErNTOY&_nc_oc=AdlSb3GVLWTjl3iI6uvIsrEya2ZR-1ex8t8yXOr3e9u13u3xboXylCxrkWzfLsvDQcU&_nc_zt=28&_nc_ht=video-ord5-2.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNNOrS6GBT-R_RV15FpphRv-mUwyGoqJClQpP-LCOcqfQ&oe=685A6586",
            "video_preview_image_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.35426-6/508472131_2706791729511119_7655112167724018421_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=-GGzon31Wl4Q7kNvwHpWdG2&_nc_oc=AdnRHcWzvX05mBu9KrhDjKgOuCYLKjNg_hm8eKY2dNaFg-4tpYznNPJvbLl7CAnB-2A&_nc_zt=14&_nc_ht=scontent-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfMijP4k74e949uFas1PkfzzwiYWH_G49J4W-EYJa31VEQ&oe=685A3DDC",
            "video_sd_url": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
            "watermarked_video_hd_url": "",
            "watermarked_video_sd_url": ""
          }
        ]
      },
      "spend": null,
      "start_date": 1750143600,
      "start_date_string": "2025-06-17T07:00:00.000Z",
      "total_active_time": null,
      "url": "https://www.facebook.com/ads/library?id=1212560900568826"
    }
  ],
  "success": true
}

Response result

Response structure

Inferred from examples
  • credits_chargedinteger
  • credits_remaininginteger
  • cursorstring
  • resultsobject[]
    • ad_archive_idstring
    • end_dateinteger
    • end_date_stringstring
    • is_aaa_eligibleboolean
    • is_activeboolean
    • page_idstring
    • page_namestring
    • political_countriesunknown[]
    • publisher_platformstring[]
    • reach_estimatenull
    • snapshotobject
      • additional_infonull
      • bodyobject
        • textstring
      • branded_contentnull
      • brazil_tax_idnull
      • bylinenull
      • captionstring
      • cardsunknown[]
      • country_iso_codenull
      • cta_textstring
      • cta_typestring
      • current_page_namestring
      • disclaimer_labelnull
      • display_formatstring
      • ec_certificatesunknown[]
      • eventnull
      • extra_imagesunknown[]
      • extra_linksstring[]
      • extra_textsunknown[]
      • extra_videosobject[]
        • video_hd_handlestring
        • video_sd_handlestring
        • watermarked_video_hd_urlnull
        • watermarked_video_sd_urlnull
      • imagesunknown[]
      • is_resharedboolean
      • link_descriptionnull
      • link_urlstring
      • page_categoriesstring[]
      • page_entity_typestring
      • page_idstring
      • page_is_deletedboolean
      • page_is_profile_pageboolean
      • page_like_countinteger
      • page_namestring
      • page_profile_picture_urlstring
      • page_profile_uristring
      • root_reshared_postnull
      • titlestring
      • videosobject[]
        • video_hd_urlstring
        • video_preview_image_urlstring
        • video_sd_urlstring
        • watermarked_video_hd_urlstring
        • watermarked_video_sd_urlstring
    • spendnull
    • start_dateinteger
    • start_date_stringstring
    • total_active_timenull
    • urlstring
  • successboolean

Sellers

SellerPricingRequests · 30dPerformanceAccess
Current
Facebook Ad Library — Company Ads · GET · View API reference
$0.00188 / call—
—successP50—
Facebook Ad Library — Company Ads · POST · View API reference
$0.00188 / call—Select to load statistics
—successP50—
Loading...
Selected pricing · scrapecreatorsUSD / call
Unit price
$0.00188

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.

calls

Total $0.188

API

Method
GET
Endpoint
https://api.openany.si/v1/agent-apis/scrapecreators/v1/facebook/adLibrary/company/ads
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
  'https://api.openany.si/v1/agent-apis/scrapecreators/v1/facebook/adLibrary/company/ads?country=ALL&end_date=2025-12-31&language=EN&media_type=ALL&pageId=367152833370567&sort_by=total_impressions&start_date=2025-01-01&status=ACTIVE' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
pageIdURL query parametersquerystringNoThe companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName
companyNameURL query parametersquerystringNoThe name of the company. Can either use this or pageId
countryURL query parametersquerystringNoThis can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
statusURL query parametersquerystringNoStatus of the ad. Defaults to ACTIVE.

enum: "ALL", "ACTIVE", "INACTIVE"

media_typeURL query parametersquerystringNoMedia type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.

enum: "ALL", "IMAGE", "VIDEO", "MEME", "IMAGE_AND_MEME", "NONE"

languageURL query parametersquerystringNoLanguage to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc
sort_byURL query parametersquerystringNoSort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.

enum: "total_impressions", "relevancy_monthly_grouped"

start_dateURL query parametersquerystringNoStart date to search for. Format: YYYY-MM-DD
end_dateURL query parametersquerystringNoEnd date to search for. Format: YYYY-MM-DD
cursorURL query parametersquerystringNoCursor to paginate through results
trimURL query parametersquerybooleanNoSet to true for a trimmed down version of the response

Required markers inside a nested object or variant apply when that object or variant is used.

Sample response

Sample response · Documented HTTP 200 Example from the provider's documentation. Field values in your results will differ.

Official example
{
  "credits_charged": 1,
  "credits_remaining": 1000000,
  "cursor": "AQHR2LpCDWOZyAGp-ZKr8rUsapAXh8rWjYuNxVvuU7L0kte18hxkxnaXM3e5jEZNgdcU",
  "results": [
    {
      "ad_archive_id": "1212560900568826",
      "end_date": 1750230000,
      "end_date_string": "2025-06-18T07:00:00.000Z",
      "is_aaa_eligible": false,
      "is_active": true,
      "page_id": "15087023444",
      "page_name": "Nike",
      "political_countries": [],
      "publisher_platform": [
        "FACEBOOK"
      ],
      "reach_estimate": null,
      "snapshot": {
        "additional_info": null,
        "body": {
          "text": "Que el frío no te detenga. Explora la colección de invierno con estilo y actitud Nike. 🧥"
        },
        "branded_content": null,
        "brazil_tax_id": null,
        "byline": null,
        "caption": "fb.com",
        "cards": [],
        "country_iso_code": null,
        "cta_text": "Learn more",
        "cta_type": "LEARN_MORE",
        "current_page_name": "Nike",
        "disclaimer_label": null,
        "display_format": "VIDEO",
        "ec_certificates": [],
        "event": null,
        "extra_images": [],
        "extra_links": [
          "https://www.nike.com.pe/productos/ropa/casacas-y-chalecos_conjunto_pantalones_poleras?utm_source=facebook&utm_medium=paid&utm_campaign=junio_invierno_transacciones&utm_content=intereses2_invierno_collection2"
        ],
        "extra_texts": [],
        "extra_videos": [
          {
            "video_hd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/508262243_4710910432468923_4352661581573318069_n.?_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=bQXAtOCS-PMQ7kNvwEbVbC_&_nc_oc=AdnZ87pJ-oeIb5L7fizjaxNmRp0qkvq2SP_ADcnPFzMPca1L8gvUkpmF_c5vrAYmetw&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfM8Q_xyap9vnoEn5T7FqI9yfO1ySPPKyJVGXPmaim5tCw&oe=685A58CD",
            "video_sd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
            "watermarked_video_hd_url": null,
            "watermarked_video_sd_url": null
          }
        ],
        "images": [],
        "is_reshared": false,
        "link_description": null,
        "link_url": "https://fb.com/canvas_doc/569658969305127",
        "page_categories": [
          "Ropa deportiva"
        ],
        "page_entity_type": "PERSON_PROFILE",
        "page_id": "15087023444",
        "page_is_deleted": false,
        "page_is_profile_page": false,
        "page_like_count": 37497718,
        "page_name": "Nike",
        "page_profile_picture_url": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508742493_1906025190144374_200543536673957484_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=GUPolKbhQA4Q7kNvwH8Woql&_nc_oc=AdnsaYY9-9p8kkFm594f86VsMEc2Wias8yMQ69ZC2VOv642bjUgMRJNtfihFM4vr62o&_nc_zt=14&_nc_ht=scontent-ord5-1.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfO73iYbuEFgc4yfmi6pUnjLAd0I1W5ac9hmHZqjq2KP3g&oe=685A4C47",
        "page_profile_uri": "https://facebook.com/nike",
        "root_reshared_post": null,
        "title": "Look de invierno activado",
        "videos": [
          {
            "video_hd_url": "https://video-ord5-2.xx.fbcdn.net/v/t42.1790-2/508345466_4710910465802253_4502560017294477681_n.?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=_z9ndrNSqU4Q7kNvwErNTOY&_nc_oc=AdlSb3GVLWTjl3iI6uvIsrEya2ZR-1ex8t8yXOr3e9u13u3xboXylCxrkWzfLsvDQcU&_nc_zt=28&_nc_ht=video-ord5-2.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNNOrS6GBT-R_RV15FpphRv-mUwyGoqJClQpP-LCOcqfQ&oe=685A6586",
            "video_preview_image_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.35426-6/508472131_2706791729511119_7655112167724018421_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=-GGzon31Wl4Q7kNvwHpWdG2&_nc_oc=AdnRHcWzvX05mBu9KrhDjKgOuCYLKjNg_hm8eKY2dNaFg-4tpYznNPJvbLl7CAnB-2A&_nc_zt=14&_nc_ht=scontent-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfMijP4k74e949uFas1PkfzzwiYWH_G49J4W-EYJa31VEQ&oe=685A3DDC",
            "video_sd_url": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
            "watermarked_video_hd_url": "",
            "watermarked_video_sd_url": ""
          }
        ]
      },
      "spend": null,
      "start_date": 1750143600,
      "start_date_string": "2025-06-17T07:00:00.000Z",
      "total_active_time": null,
      "url": "https://www.facebook.com/ads/library?id=1212560900568826"
    }
  ],
  "success": true
}

Agent integration

Copy the resource contract without sharing an API key.

View API Markdown
API Markdown
# Facebook company ad library

Retrieve company ad library with the Facebook API. The sample response includes captions, images and titles. Use it for account research or company due diligence. Choose an implementation and check its published request fields, examples, and usage pricing before integrating.
## Available implementations
scrapecreators · Facebook Ad Library — Company Ads: https://openany.si/markets/apis/capabilities/facebook-company-ad-library?offering=1069b6a0-783e-4f0d-8ed4-165a6094de89 · $0.00188 / call
scrapecreators · Facebook Ad Library — Company Ads: https://openany.si/markets/apis/capabilities/facebook-company-ad-library?offering=e571cdfa-5f97-4edd-a473-516b280b2710 · $0.00188 / call

## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/facebook-company-ad-library
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/scrapecreators/v1/facebook/adLibrary/company/ads
Price: $0.00188 / call
Provider: scrapecreators
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.

Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.

## Prepared request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/scrapecreators/v1/facebook/adLibrary/company/ads?country=ALL&end_date=2025-12-31&language=EN&media_type=ALL&pageId=367152833370567&sort_by=total_impressions&start_date=2025-01-01&status=ACTIVE' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## API contract
```json
{
  "resource_type": "api",
  "name": "Facebook Ad Library — Company Ads",
  "endpoint": "https://api.openany.si/v1/agent-apis/scrapecreators/v1/facebook/adLibrary/company/ads",
  "method": "GET",
  "content_type": "none",
  "execution_mode": "sync",
  "authentication": {
    "type": "bearer",
    "environment_variable": "OPENANY_API_KEY"
  },
  "inputs": [
    {
      "description": "The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName",
      "location": "query",
      "name": "pageId",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "The name of the company. Can either use this or pageId",
      "location": "query",
      "name": "companyName",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.",
      "location": "query",
      "name": "country",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Status of the ad. Defaults to ACTIVE.",
      "enum_values": [
        "ALL",
        "ACTIVE",
        "INACTIVE"
      ],
      "location": "query",
      "name": "status",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.",
      "enum_values": [
        "ALL",
        "IMAGE",
        "VIDEO",
        "MEME",
        "IMAGE_AND_MEME",
        "NONE"
      ],
      "location": "query",
      "name": "media_type",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc",
      "location": "query",
      "name": "language",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.",
      "enum_values": [
        "total_impressions",
        "relevancy_monthly_grouped"
      ],
      "location": "query",
      "name": "sort_by",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Start date to search for. Format: YYYY-MM-DD",
      "location": "query",
      "name": "start_date",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "End date to search for. Format: YYYY-MM-DD",
      "location": "query",
      "name": "end_date",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Cursor to paginate through results",
      "location": "query",
      "name": "cursor",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Set to true for a trimmed down version of the response",
      "location": "query",
      "name": "trim",
      "nullable": false,
      "required": false,
      "type": "boolean"
    }
  ],
  "billing": {
    "currency": "USD",
    "mode": "fixed",
    "priceMicroUsd": "1880",
    "rounding": null,
    "unit": "call",
    "unitQuantity": null
  },
  "examples": [
    {
      "http_status": 200,
      "name": "Official example",
      "request": {
        "body": null,
        "headers": {},
        "path": {},
        "query": {
          "country": "ALL",
          "end_date": "2025-12-31",
          "language": "EN",
          "media_type": "ALL",
          "pageId": "367152833370567",
          "sort_by": "total_impressions",
          "start_date": "2025-01-01",
          "status": "ACTIVE"
        }
      },
      "response_body": {
        "credits_charged": 1,
        "credits_remaining": 1000000,
        "cursor": "AQHR2LpCDWOZyAGp-ZKr8rUsapAXh8rWjYuNxVvuU7L0kte18hxkxnaXM3e5jEZNgdcU",
        "results": [
          {
            "ad_archive_id": "1212560900568826",
            "end_date": 1750230000,
            "end_date_string": "2025-06-18T07:00:00.000Z",
            "is_aaa_eligible": false,
            "is_active": true,
            "page_id": "15087023444",
            "page_name": "Nike",
            "political_countries": [],
            "publisher_platform": [
              "FACEBOOK"
            ],
            "reach_estimate": null,
            "snapshot": {
              "additional_info": null,
              "body": {
                "text": "Que el frío no te detenga. Explora la colección de invierno con estilo y actitud Nike. 🧥"
              },
              "branded_content": null,
              "brazil_tax_id": null,
              "byline": null,
              "caption": "fb.com",
              "cards": [],
              "country_iso_code": null,
              "cta_text": "Learn more",
              "cta_type": "LEARN_MORE",
              "current_page_name": "Nike",
              "disclaimer_label": null,
              "display_format": "VIDEO",
              "ec_certificates": [],
              "event": null,
              "extra_images": [],
              "extra_links": [
                "https://www.nike.com.pe/productos/ropa/casacas-y-chalecos_conjunto_pantalones_poleras?utm_source=facebook&utm_medium=paid&utm_campaign=junio_invierno_transacciones&utm_content=intereses2_invierno_collection2"
              ],
              "extra_texts": [],
              "extra_videos": [
                {
                  "video_hd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/508262243_4710910432468923_4352661581573318069_n.?_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=bQXAtOCS-PMQ7kNvwEbVbC_&_nc_oc=AdnZ87pJ-oeIb5L7fizjaxNmRp0qkvq2SP_ADcnPFzMPca1L8gvUkpmF_c5vrAYmetw&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfM8Q_xyap9vnoEn5T7FqI9yfO1ySPPKyJVGXPmaim5tCw&oe=685A58CD",
                  "video_sd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
                  "watermarked_video_hd_url": null,
                  "watermarked_video_sd_url": null
                }
              ],
              "images": [],
              "is_reshared": false,
              "link_description": null,
              "link_url": "https://fb.com/canvas_doc/569658969305127",
              "page_categories": [
                "Ropa deportiva"
              ],
              "page_entity_type": "PERSON_PROFILE",
              "page_id": "15087023444",
              "page_is_deleted": false,
              "page_is_profile_page": false,
              "page_like_count": 37497718,
              "page_name": "Nike",
              "page_profile_picture_url": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508742493_1906025190144374_200543536673957484_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=GUPolKbhQA4Q7kNvwH8Woql&_nc_oc=AdnsaYY9-9p8kkFm594f86VsMEc2Wias8yMQ69ZC2VOv642bjUgMRJNtfihFM4vr62o&_nc_zt=14&_nc_ht=scontent-ord5-1.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfO73iYbuEFgc4yfmi6pUnjLAd0I1W5ac9hmHZqjq2KP3g&oe=685A4C47",
              "page_profile_uri": "https://facebook.com/nike",
              "root_reshared_post": null,
              "title": "Look de invierno activado",
              "videos": [
                {
                  "video_hd_url": "https://video-ord5-2.xx.fbcdn.net/v/t42.1790-2/508345466_4710910465802253_4502560017294477681_n.?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=_z9ndrNSqU4Q7kNvwErNTOY&_nc_oc=AdlSb3GVLWTjl3iI6uvIsrEya2ZR-1ex8t8yXOr3e9u13u3xboXylCxrkWzfLsvDQcU&_nc_zt=28&_nc_ht=video-ord5-2.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNNOrS6GBT-R_RV15FpphRv-mUwyGoqJClQpP-LCOcqfQ&oe=685A6586",
                  "video_preview_image_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.35426-6/508472131_2706791729511119_7655112167724018421_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=-GGzon31Wl4Q7kNvwHpWdG2&_nc_oc=AdnRHcWzvX05mBu9KrhDjKgOuCYLKjNg_hm8eKY2dNaFg-4tpYznNPJvbLl7CAnB-2A&_nc_zt=14&_nc_ht=scontent-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfMijP4k74e949uFas1PkfzzwiYWH_G49J4W-EYJa31VEQ&oe=685A3DDC",
                  "video_sd_url": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
                  "watermarked_video_hd_url": "",
                  "watermarked_video_sd_url": ""
                }
              ]
            },
            "spend": null,
            "start_date": 1750143600,
            "start_date_string": "2025-06-17T07:00:00.000Z",
            "total_active_time": null,
            "url": "https://www.facebook.com/ads/library?id=1212560900568826"
          }
        ],
        "success": true
      }
    }
  ]
}
```

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Official example

Example from the provider's documentation. Field values in your results will differ.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 11

    Review these request fields before running. Keep the published provider and request method unchanged.

    pageId
    The companies ad library page id. You can get this with my Search For Companies Endpoint. Can either use this or companyName
    companyName
    The name of the company. Can either use this or pageId
    country
    This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
    status
    Status of the ad. Defaults to ACTIVE.
    media_type
    Media type of the ad. Defaults to ALL. Meme refers to ads with image and text. Not sure why they call it meme.
    language
    Language to filter ads on. Needs to be 2 letter language code, ie EN, ES, FR, etc
    sort_by
    Sort by impressions (high to low), or Most Recent (relevancy_monthly_grouped). Defaults to impressions.
    start_date
    Start date to search for. Format: YYYY-MM-DD
    end_date
    End date to search for. Format: YYYY-MM-DD
    cursor
    Cursor to paginate through results
    trim
    Set to true for a trimmed down version of the response
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/scrapecreators/v1/facebook/adLibrary/company/ads?country=ALL&end_date=2025-12-31&language=EN&media_type=ALL&pageId=367152833370567&sort_by=total_impressions&start_date=2025-01-01&status=ACTIVE' \
      -X GET \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "credits_charged": 1,
      "credits_remaining": 1000000,
      "cursor": "AQHR2LpCDWOZyAGp-ZKr8rUsapAXh8rWjYuNxVvuU7L0kte18hxkxnaXM3e5jEZNgdcU",
      "results": [
        {
          "ad_archive_id": "1212560900568826",
          "end_date": 1750230000,
          "end_date_string": "2025-06-18T07:00:00.000Z",
          "is_aaa_eligible": false,
          "is_active": true,
          "page_id": "15087023444",
          "page_name": "Nike",
          "political_countries": [],
          "publisher_platform": [
            "FACEBOOK"
          ],
          "reach_estimate": null,
          "snapshot": {
            "additional_info": null,
            "body": {
              "text": "Que el frío no te detenga. Explora la colección de invierno con estilo y actitud Nike. 🧥"
            },
            "branded_content": null,
            "brazil_tax_id": null,
            "byline": null,
            "caption": "fb.com",
            "cards": [],
            "country_iso_code": null,
            "cta_text": "Learn more",
            "cta_type": "LEARN_MORE",
            "current_page_name": "Nike",
            "disclaimer_label": null,
            "display_format": "VIDEO",
            "ec_certificates": [],
            "event": null,
            "extra_images": [],
            "extra_links": [
              "https://www.nike.com.pe/productos/ropa/casacas-y-chalecos_conjunto_pantalones_poleras?utm_source=facebook&utm_medium=paid&utm_campaign=junio_invierno_transacciones&utm_content=intereses2_invierno_collection2"
            ],
            "extra_texts": [],
            "extra_videos": [
              {
                "video_hd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/508262243_4710910432468923_4352661581573318069_n.?_nc_cat=107&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=bQXAtOCS-PMQ7kNvwEbVbC_&_nc_oc=AdnZ87pJ-oeIb5L7fizjaxNmRp0qkvq2SP_ADcnPFzMPca1L8gvUkpmF_c5vrAYmetw&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfM8Q_xyap9vnoEn5T7FqI9yfO1ySPPKyJVGXPmaim5tCw&oe=685A58CD",
                "video_sd_handle": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
                "watermarked_video_hd_url": null,
                "watermarked_video_sd_url": null
              }
            ],
            "images": [],
            "is_reshared": false,
            "link_description": null,
            "link_url": "https://fb.com/canvas_doc/569658969305127",
            "page_categories": [
              "Ropa deportiva"
            ],
            "page_entity_type": "PERSON_PROFILE",
            "page_id": "15087023444",
            "page_is_deleted": false,
            "page_is_profile_page": false,
            "page_like_count": 37497718,
            "page_name": "Nike",
            "page_profile_picture_url": "https://scontent-ord5-1.xx.fbcdn.net/v/t39.35426-6/508742493_1906025190144374_200543536673957484_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=GUPolKbhQA4Q7kNvwH8Woql&_nc_oc=AdnsaYY9-9p8kkFm594f86VsMEc2Wias8yMQ69ZC2VOv642bjUgMRJNtfihFM4vr62o&_nc_zt=14&_nc_ht=scontent-ord5-1.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfO73iYbuEFgc4yfmi6pUnjLAd0I1W5ac9hmHZqjq2KP3g&oe=685A4C47",
            "page_profile_uri": "https://facebook.com/nike",
            "root_reshared_post": null,
            "title": "Look de invierno activado",
            "videos": [
              {
                "video_hd_url": "https://video-ord5-2.xx.fbcdn.net/v/t42.1790-2/508345466_4710910465802253_4502560017294477681_n.?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=_z9ndrNSqU4Q7kNvwErNTOY&_nc_oc=AdlSb3GVLWTjl3iI6uvIsrEya2ZR-1ex8t8yXOr3e9u13u3xboXylCxrkWzfLsvDQcU&_nc_zt=28&_nc_ht=video-ord5-2.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNNOrS6GBT-R_RV15FpphRv-mUwyGoqJClQpP-LCOcqfQ&oe=685A6586",
                "video_preview_image_url": "https://scontent-ord5-3.xx.fbcdn.net/v/t39.35426-6/508472131_2706791729511119_7655112167724018421_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=-GGzon31Wl4Q7kNvwHpWdG2&_nc_oc=AdnRHcWzvX05mBu9KrhDjKgOuCYLKjNg_hm8eKY2dNaFg-4tpYznNPJvbLl7CAnB-2A&_nc_zt=14&_nc_ht=scontent-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfMijP4k74e949uFas1PkfzzwiYWH_G49J4W-EYJa31VEQ&oe=685A3DDC",
                "video_sd_url": "https://video-ord5-3.xx.fbcdn.net/v/t42.1790-2/503830433_1272051757688626_4613408767025280545_n.mp4?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=zKD6ziOmKVgQ7kNvwFGCx5N&_nc_oc=AdkdTw235NDuAczGAvCTLl5TnQ8rUcWjy1QBEj8CC4Id8hVQPMexxPtU3froQOYk1OE&_nc_zt=28&_nc_ht=video-ord5-3.xx&_nc_gid=mmzWe0H6RNHM_tNirxejrQ&oh=00_AfNqJDVyyTMYnf7xs5te87vB3A0v3IGy41tdxT1ZvrAAlQ&oe=685A4FC3",
                "watermarked_video_hd_url": "",
                "watermarked_video_sd_url": ""
              }
            ]
          },
          "spend": null,
          "start_date": 1750143600,
          "start_date_string": "2025-06-17T07:00:00.000Z",
          "total_active_time": null,
          "url": "https://www.facebook.com/ads/library?id=1212560900568826"
        }
      ],
      "success": true
    }

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use Facebook company ad library with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.