# Facebook Ads of a Page

**Use case:** 

Get every ad a Facebook Page runs, from the Page's link: text, images, videos, dates and platforms.

## Input

```json
{
  "searchQueries": [
    "running shoes"
  ],
  "startUrls": [
    "https://www.facebook.com/nike"
  ],
  "maxAdsPerSearch": 50,
  "country": "US",
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "exactPhrase": false,
  "sortBy": "relevance"
}
```

## Output

```json
{
  "ad_archive_id": {
    "label": "Ad id",
    "format": "text"
  },
  "ad_library_url": {
    "label": "Ad Library link",
    "format": "link"
  },
  "position": {
    "label": "Place",
    "format": "number"
  },
  "page_name": {
    "label": "Page",
    "format": "text"
  },
  "page_id": {
    "label": "Page id",
    "format": "text"
  },
  "page_url": {
    "label": "Page link",
    "format": "link"
  },
  "page_profile_picture_url": {
    "label": "Page picture",
    "format": "image"
  },
  "page_like_count": {
    "label": "Page likes",
    "format": "number"
  },
  "page_categories": {
    "label": "Page categories",
    "format": "array"
  },
  "page_is_deleted": {
    "label": "Page deleted",
    "format": "boolean"
  },
  "is_active": {
    "label": "Active",
    "format": "boolean"
  },
  "start_date": {
    "label": "Started",
    "format": "date"
  },
  "end_date": {
    "label": "Last shown",
    "format": "date"
  },
  "total_active_time": {
    "label": "Active seconds",
    "format": "number"
  },
  "publisher_platforms": {
    "label": "Platforms",
    "format": "array"
  },
  "display_format": {
    "label": "Format",
    "format": "text"
  },
  "body_text": {
    "label": "Text",
    "format": "text"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "caption": {
    "label": "Caption",
    "format": "text"
  },
  "link_url": {
    "label": "Link",
    "format": "link"
  },
  "link_description": {
    "label": "Link description",
    "format": "text"
  },
  "cta_text": {
    "label": "Button",
    "format": "text"
  },
  "cta_type": {
    "label": "Button type",
    "format": "text"
  },
  "images": {
    "label": "Images",
    "format": "array"
  },
  "videos": {
    "label": "Videos",
    "format": "array"
  },
  "cards": {
    "label": "Cards",
    "format": "array"
  },
  "extra_texts": {
    "label": "Other texts",
    "format": "array"
  },
  "extra_links": {
    "label": "Other links",
    "format": "array"
  },
  "extra_images": {
    "label": "Other images",
    "format": "array"
  },
  "extra_videos": {
    "label": "Other videos",
    "format": "array"
  },
  "collation_id": {
    "label": "Versions group",
    "format": "text"
  },
  "collation_count": {
    "label": "Versions",
    "format": "number"
  },
  "categories": {
    "label": "Ad categories",
    "format": "array"
  },
  "contains_digital_created_media": {
    "label": "AI or digital media",
    "format": "boolean"
  },
  "contains_sensitive_content": {
    "label": "Sensitive",
    "format": "boolean"
  },
  "is_reshared": {
    "label": "Reshared",
    "format": "boolean"
  },
  "root_reshared_post": {
    "label": "Reshared post",
    "format": "text"
  },
  "branded_content": {
    "label": "Branded content",
    "format": "text"
  },
  "event": {
    "label": "Event",
    "format": "text"
  },
  "byline": {
    "label": "Byline",
    "format": "text"
  },
  "disclaimer_label": {
    "label": "Disclaimer",
    "format": "text"
  },
  "paid_for_by": {
    "label": "Paid for by",
    "format": "text"
  },
  "disclaimer": {
    "label": "Disclaimer details",
    "format": "text"
  },
  "spend": {
    "label": "Spend",
    "format": "text"
  },
  "currency": {
    "label": "Currency",
    "format": "text"
  },
  "impressions_text": {
    "label": "Impressions",
    "format": "text"
  },
  "impressions_index": {
    "label": "Impressions index",
    "format": "number"
  },
  "reach_estimate": {
    "label": "Reach",
    "format": "text"
  },
  "targeted_or_reached_countries": {
    "label": "Countries reached",
    "format": "array"
  },
  "country_iso_code": {
    "label": "Country",
    "format": "text"
  },
  "brazil_tax_id": {
    "label": "Brazil tax id",
    "format": "text"
  },
  "additional_info": {
    "label": "More info",
    "format": "text"
  },
  "ec_certificates": {
    "label": "Certificates",
    "format": "array"
  },
  "gated_type": {
    "label": "Gated",
    "format": "text"
  },
  "hide_data_status": {
    "label": "Data hidden",
    "format": "text"
  },
  "has_user_reported": {
    "label": "You reported",
    "format": "boolean"
  },
  "report_count": {
    "label": "Reports",
    "format": "number"
  },
  "menu_items": {
    "label": "Menu items",
    "format": "array"
  },
  "state_media_run_label": {
    "label": "State media",
    "format": "text"
  },
  "is_aaa_eligible": {
    "label": "AAA eligible",
    "format": "boolean"
  },
  "is_deemed_finserv": {
    "label": "Financial services",
    "format": "boolean"
  },
  "finserv_limited_delivery": {
    "label": "Financial limited",
    "format": "boolean"
  },
  "tw_anti_scam_limited_delivery": {
    "label": "Taiwan anti-scam limited",
    "format": "boolean"
  },
  "ad_id": {
    "label": "Delivery ad id",
    "format": "text"
  },
  "search_query": {
    "label": "Search",
    "format": "text"
  },
  "search_page_id": {
    "label": "Searched Page id",
    "format": "text"
  },
  "search_country": {
    "label": "Searched country",
    "format": "text"
  },
  "search_url": {
    "label": "Search link",
    "format": "link"
  },
  "input_url": {
    "label": "Input link",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Facebook Ads Library Scraper: Meta Ads by Keyword or Page Actor is ready to run with the inputs already set for "Facebook Ads of a Page". [Sign up or log in](https://console.apify.com/create-task-from-example/ofiEgaXH12VgE9FEX) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Facebook Ads of a Page" task

The Facebook Ads Library Scraper: Meta Ads by Keyword or Page Actor will start running based on the input automatically. You can also change all the input fields, like searches, links, and more, to match your specific use case.

### 3. Receive the "Facebook Ads of a Page" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as ad id, ad library link, place, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Facebook Ads of a Page" task via API](https://apify.com/luzivanlt/facebook-ads-library-scraper.md).

## About this Actor

This example demonstrates how to use [Facebook Ads Library Scraper: Meta Ads by Keyword or Page](https://apify.com/luzivanlt/facebook-ads-library-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/luzivanlt/facebook-ads-library-scraper.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/luzivanlt/facebook-ads-library-scraper.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
