# Facebook Ad Spy: Top Ads for Any Keyword

**Use case:** 

Find the Facebook and Instagram ads with the most impressions for a keyword, with their text, images, videos, landing page and how many days they have run: ads that run for months are the ones that pay. On 2026-11-19: the 100 top skincare ads in the US in 10 seconds. Change the keyword and the country.

## Input

```json
{
  "searches": [
    "skincare"
  ],
  "pages": [
    "nike"
  ],
  "country": "US",
  "activeStatus": "active",
  "exactPhrase": false,
  "sortBy": "impressions",
  "adCategory": "all",
  "mediaType": "all",
  "platforms": [],
  "languages": [],
  "maxAds": 100,
  "completeRows": true,
  "includeRawData": false,
  "countOnly": false,
  "onlyNew": false
}
```

## Output

```json
{
  "adLibraryUrl": {
    "label": "Ad",
    "format": "string"
  },
  "title": {
    "label": "Headline",
    "format": "string"
  },
  "bodyText": {
    "label": "Text",
    "format": "string"
  },
  "imageUrls": {
    "label": "Images",
    "format": "array"
  },
  "videoUrls": {
    "label": "Videos",
    "format": "array"
  },
  "cards": {
    "label": "Cards",
    "format": "array"
  },
  "landingDomain": {
    "label": "Domain",
    "format": "string"
  }
}
```

## How it works

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

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

### 2. Start the "Facebook Ad Spy: Top Ads for Any Keyword" task

The Facebook Ads Library Scraper Actor will start running based on the input automatically. You can also change all the input fields, like search words or ad library links, advertisers (facebook pages), and more, to match your specific use case.

### 3. Receive the "Facebook Ad Spy: Top Ads for Any Keyword" 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, headline, 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 "Facebook Ad Spy: Top Ads for Any Keyword" task via API](https://apify.com/sleepmodesystems/facebook-ads-library-scraper.md).

## FAQ

### What does the Facebook Ad Spy task return?

One row per ad, most impressions first: text, headline, images, videos, cards, landing page and domain, days running, platforms and the advertiser.

### Can I use the Facebook Ad Spy task for my niche?

Yes. Replace skincare with your keyword, put a phrase in quotes for the exact phrase, and pick the country where the ads run.

### How do I find winning ads with the Facebook Ad Spy task?

Sort the rows by daysRunning: an ad that keeps running for months is one its advertiser keeps paying for. adsUsingThisCreative shows how widely a creative is used.

### How much does the Facebook Ad Spy task cost?

$0.99 per 1,000 ads on the FREE tier, $0.84 on GOLD. On 2026-11-19, the 100 top skincare ads in the US took 10 seconds.

## About this Actor

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