# Find active Facebook and Instagram ads by keyword

**Use case:** 

Search the Meta Ad Library by keyword and get the active ads: page, start date, format, platforms, ad text, headline, link and call to action, with the Ad Library link. Change the keyword, country and number of ads, run, and export the list as CSV or Excel. No login.

## Input

```json
{
  "queries": [
    "running shoes"
  ],
  "maxAdsPerQuery": 30,
  "includeDetails": false,
  "country": "US",
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "searchType": "keyword_unordered",
  "startedInRangeOnly": false,
  "sortBy": "impressions",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 16
}
```

## Output

```json
{
  "adId": {
    "label": "adId",
    "format": "string"
  },
  "pageName": {
    "label": "pageName",
    "format": "string"
  },
  "isActive": {
    "label": "isActive",
    "format": "boolean"
  },
  "startDate": {
    "label": "startDate",
    "format": "string"
  },
  "endDate": {
    "label": "endDate",
    "format": "string"
  },
  "format": {
    "label": "format",
    "format": "string"
  },
  "platforms": {
    "label": "platforms",
    "format": "array"
  },
  "title": {
    "label": "title",
    "format": "string"
  },
  "body": {
    "label": "body",
    "format": "string"
  },
  "linkUrl": {
    "label": "linkUrl",
    "format": "string"
  },
  "ctaText": {
    "label": "ctaText",
    "format": "string"
  },
  "variationsCount": {
    "label": "variationsCount",
    "format": "integer"
  },
  "spend": {
    "label": "spend",
    "format": "string"
  },
  "impressions": {
    "label": "impressions",
    "format": "string"
  },
  "euTotalReach": {
    "label": "euTotalReach",
    "format": "integer"
  },
  "payer": {
    "label": "payer",
    "format": "string"
  },
  "adLibraryUrl": {
    "label": "adLibraryUrl",
    "format": "string"
  }
}
```

## How it works

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

The Facebook Ads Library Scraper · Meta Ad Library, No Login Actor is ready to run with the inputs already set for "Find active Facebook and Instagram ads by keyword". [Sign up or log in](https://console.apify.com/create-task-from-example/HS1n8aEvA5cSLGaIl) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Find active Facebook and Instagram ads by keyword" task

The Facebook Ads Library Scraper · Meta Ad Library, No Login Actor will start running based on the input automatically. You can also change all the input fields, like keywords, advertiser pages, ad library links or ad ids, max ads per line, and more, to match your specific use case.

### 3. Receive the "Find active Facebook and Instagram ads by 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 adid, pagename, isactive, 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 "Find active Facebook and Instagram ads by keyword" task via API](https://apify.com/instagram-data-api/meta-ads-library-scraper.md).

## FAQ

### How much does this cost?

$0.75 per 1,000 ads on the Starter plan and from $0.65 on Business, plus $0.0005 per run. This example (30 ads) costs about $0.02.

### How do I get the data into Excel or Google Sheets?

Open the run's Storage tab and export the dataset as CSV, Excel or JSON, or pull it through the Apify API. Integrations can send it straight to Google Sheets.

### Can I run this on a schedule?

Yes. Save the task to your account and add a Schedule in Apify Console: hourly, daily or weekly.

## About this Actor

This example demonstrates how to use [Facebook Ads Library Scraper · Meta Ad Library, No Login](https://apify.com/instagram-data-api/meta-ads-library-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/instagram-data-api/meta-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/instagram-data-api/meta-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`).
