# Get all ads of a competitor's Facebook page

**Use case:** 

Export every ad a Facebook page runs, from its page ID: the creatives, texts, links, start dates and platforms. Track what a competitor advertises and since when.

## Input

```json
{
  "urls": [
    "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=running%20shoes&search_type=keyword_unordered&media_type=all"
  ],
  "searchTerms": [
    "nike",
    "\"running shoes\""
  ],
  "pageIds": [
    "15087023444"
  ],
  "country": "ALL",
  "activeStatus": "all",
  "adType": "all",
  "mediaType": "all",
  "maxAdsPerSearch": 30,
  "includeAdDetails": false,
  "proxy": {
    "useApifyProxy": true
  }
}
```

## Output

```json
{
  "pageProfilePictureUrl": {
    "label": "Page",
    "format": "string"
  },
  "pageName": {
    "label": "Advertiser",
    "format": "string"
  },
  "body": {
    "label": "Text",
    "format": "string"
  },
  "displayFormat": {
    "label": "Format",
    "format": "string"
  },
  "isActive": {
    "label": "Active",
    "format": "boolean"
  },
  "startDate": {
    "label": "Started",
    "format": "string"
  },
  "endDate": {
    "label": "Ended",
    "format": "string"
  },
  "publisherPlatforms": {
    "label": "Platforms",
    "format": "array"
  },
  "collationCount": {
    "label": "Ads with this creative",
    "format": "integer"
  },
  "spend": {
    "label": "Spend",
    "format": "string"
  },
  "adLibraryUrl": {
    "label": "Ad",
    "format": "string"
  },
  "input": {
    "label": "Input",
    "format": "string"
  }
}
```

## How it works

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

The Facebook Ads Library Scraper Lowcost: Meta Ads, $0.30/1K Actor is ready to run with the inputs already set for "Get all ads of a competitor's Facebook page". [Sign up or log in](https://console.apify.com/create-task-from-example/4yg5N5Q0g6qvuPHbd) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Get all ads of a competitor's Facebook page" task

The Facebook Ads Library Scraper Lowcost: Meta Ads, $0.30/1K Actor will start running based on the input automatically. You can also change all the input fields, like ad library urls, search terms, and more, to match your specific use case.

### 3. Receive the "Get all ads of a competitor's Facebook 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 page, advertiser, text, 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 "Get all ads of a competitor's Facebook page" task via API](https://apify.com/sones/facebook-ads-library-scraper-lowcost.md).

## FAQ

### Where do I find a page ID?

Open the page in the Ad Library: the number after view_all_page_id= in the URL is its ID. You can also paste that Ad Library URL into the urls field.

### Does it include inactive ads?

Yes. This task asks for all ads, active and stopped, so you see the page's advertising history.

### What does this task cost?

$0.30 per 1,000 ads on the Free plan plus a run-start fee, with a $0.50 spending limit.

## About this Actor

This example demonstrates how to use [Facebook Ads Library Scraper Lowcost: Meta Ads, $0.30/1K](https://apify.com/sones/facebook-ads-library-scraper-lowcost.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/sones/facebook-ads-library-scraper-lowcost.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/sones/facebook-ads-library-scraper-lowcost.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`).
