# Spy on a competitor's Facebook and Instagram ads

**Use case:** 

Get every active ad a competitor runs on Facebook, Instagram, Messenger and Audience Network, straight from the Meta Ad Library. Each row has the ad text, headline, images or video, call to action, landing page, start date and how many days the ad has been running. The example follows Gymshark in the United States; replace the Page URL with any brand.

## Input

```json
{
  "searchTerms": [
    "running shoes"
  ],
  "pageUrls": [
    "https://www.facebook.com/Gymshark"
  ],
  "countries": [
    "US"
  ],
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "searchMode": "keyword_unordered",
  "sortBy": "relevance",
  "skipDuplicateVersions": false,
  "oneAdPerAdvertiser": false,
  "maxAdsPerSource": 100,
  "includeAdDetails": false,
  "countOnly": false,
  "includeMarkdown": false,
  "includeRawData": false,
  "onlyNewAds": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 4,
  "maxRetries": 6
}
```

## Output

```json
{
  "pageProfilePictureUrl": {
    "label": "Page picture",
    "format": "string"
  },
  "pageName": {
    "label": "Advertiser",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "startDate": {
    "label": "Started",
    "format": "string"
  },
  "daysRunning": {
    "label": "Days running",
    "format": "integer"
  },
  "platforms": {
    "label": "Platforms",
    "format": "array"
  },
  "mediaType": {
    "label": "Media type",
    "format": "string"
  },
  "title": {
    "label": "Headline",
    "format": "string"
  },
  "bodyText": {
    "label": "Ad text",
    "format": "string"
  },
  "ctaText": {
    "label": "Call to action",
    "format": "string"
  },
  "linkDomain": {
    "label": "Landing domain",
    "format": "string"
  },
  "adLibraryUrl": {
    "label": "Ad Library link",
    "format": "string"
  }
}
```

## How it works

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

The Facebook Ads Library Scraper & Ad Monitor Actor is ready to run with the inputs already set for "Spy on a competitor's Facebook and Instagram ads". [Sign up or log in](https://console.apify.com/create-task-from-example/ycTookHndni9x2Rb4) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Spy on a competitor's Facebook and Instagram ads" task

The Facebook Ads Library Scraper & Ad Monitor Actor will start running based on the input automatically. You can also change all the input fields, like search terms (keywords or brand names), facebook pages (advertisers), and more, to match your specific use case.

### 3. Receive the "Spy on a competitor's Facebook and Instagram ads" 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 picture, advertiser, status, 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 "Spy on a competitor's Facebook and Instagram ads" task via API](https://apify.com/panix/facebook-ads-library-scraper.md).

## FAQ

### What does the competitor Facebook ads task return?

The competitor Facebook ads task returns one row per active ad: ad text, headline, image or video links, call to action, landing page and domain, platforms, start date and days running, plus a link to the ad in the Meta Ad Library.

### How do I follow a different brand?

Replace the Facebook Page URL with the brand you want to follow and pick its countries. The competitor Facebook ads task also takes several Pages at once, and each ad is delivered only once.

### Do I need a Facebook account, cookies or a Meta API token?

No login, cookies or Meta API token are needed. The competitor Facebook ads task reads the public Meta Ad Library the way a logged-out visitor sees it.

### How much does the competitor Facebook ads task cost?

The competitor Facebook ads task costs $0.60 per 1,000 ads on the Apify Free plan and $0.50 on Starter, less on Scale and Business, plus $0.003 per run. Failed sources and duplicates are never charged.

### Can I run it every day?

Save the competitor Facebook ads task and add a daily schedule in Apify. Turn on Only new ads to receive only the ads you have not received before; repeats are not charged.

## About this Actor

This example demonstrates how to use [Facebook Ads Library Scraper & Ad Monitor](https://apify.com/panix/facebook-ads-library-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/panix/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/panix/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`).
