# Scrape Facebook & Instagram ads by keyword (skincare, US)

**Use case:** 

The first 100 active ads in the US matching the keyword "skincare" in the Meta Ad Library: advertiser, ad text, headline, call to action, landing page, platforms and run dates. Change the keyword or the country in the URL to research any market. No Facebook account, no cookies.

## Input

```json
{
  "urls": [
    {
      "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=all&q=skincare&search_type=keyword_unordered"
    }
  ],
  "country": "ALL",
  "scrapeAdDetails": false,
  "groupedAds": true,
  "limitPerSource": 100,
  "scrapePageAds.period": "",
  "scrapePageAds.activeStatus": "all",
  "scrapePageAds.sortBy": "impressions_desc",
  "scrapePageAds.countryCode": "ALL",
  "useProxyPool": true
}
```

## Output

```json
{
  "snapshot.page_profile_picture_url": {
    "label": "Logo",
    "format": "image"
  },
  "page_name": {
    "label": "Advertiser",
    "format": "text"
  },
  "snapshot.body.text": {
    "label": "Ad copy",
    "format": "text"
  },
  "snapshot.title": {
    "label": "Headline",
    "format": "text"
  },
  "publisher_platform": {
    "label": "Platforms",
    "format": "array"
  },
  "is_active": {
    "label": "Active",
    "format": "boolean"
  },
  "start_date_formatted": {
    "label": "Started",
    "format": "text"
  },
  "end_date_formatted": {
    "label": "Last seen",
    "format": "text"
  },
  "collation_count": {
    "label": "Ads in group",
    "format": "number"
  },
  "snapshot.cta_text": {
    "label": "CTA",
    "format": "text"
  },
  "snapshot.link_url": {
    "label": "Landing page",
    "format": "link"
  },
  "ad_library_url": {
    "label": "Ad Library",
    "format": "link"
  },
  "error": {
    "label": "Problem",
    "format": "text"
  }
}
```

## How it works

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

The Facebook & Meta Ads: Instagram, WhatsApp, Threads, Messenger Actor is ready to run with the inputs already set for "Scrape Facebook & Instagram ads by keyword (skincare, US)". [Sign up or log in](https://console.apify.com/create-task-from-example/YHCNK9ICZOXR2hiGN) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Scrape Facebook & Instagram ads by keyword (skincare, US)" task

The Facebook & Meta Ads: Instagram, WhatsApp, Threads, Messenger Actor will start running based on the input automatically. You can also change all the input fields, like ad library or facebook page urls, country for the keywords, and more, to match your specific use case.

### 3. Receive the "Scrape Facebook & Instagram ads by keyword (skincare, US)" 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 logo, advertiser, ad copy, 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 "Scrape Facebook & Instagram ads by keyword (skincare, US)" task via API](https://apify.com/fairfetcher/meta-ad-library.md).

## FAQ

### How do I search another keyword or country?

Replace skincare after q= in the URL with your keyword (use %20 for spaces) and US after country= with a two-letter country code, or ALL for every country.

### Which platforms are covered?

Everything the Meta Ad Library covers: Facebook, Instagram, WhatsApp, Threads, Messenger and Audience Network. The publisher_platform field lists where each ad ran.

### How much does it cost?

From $0.35 per 1,000 ads by Apify plan ($0.42 Free, $0.39 Bronze, $0.37 Silver, $0.35 Gold and above), plus $0.00005 per run; the $5 monthly free credit covers about 11,900 ads. You pay only for the ads you get.

### Can I change the search?

Yes. Copy this task and edit its input before you run it; the task always runs with the input shown here.

## About this Actor

This example demonstrates how to use [Facebook & Meta Ads: Instagram, WhatsApp, Threads, Messenger](https://apify.com/fairfetcher/meta-ad-library.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/fairfetcher/meta-ad-library.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/fairfetcher/meta-ad-library.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`).
