# Meta Ads Spy Tool: Automate, Schedule & Track via API

**Use case:** 

Spy on competitor ads across Facebook & Instagram. Automate workflows via API, set up weekly schedules, and extract direct MP4 video player links. You can export these video ads instantly. This task is configured to search for "ai video tools" in the US, pulling authentic, active ad datasets in under 4 seconds for only $0.50 per 1K ads.

## Input

```json
{
  "search_keyword": "ai video tools",
  "page_urls": [],
  "limit": 20,
  "country_code": "US",
  "is_active": "ACTIVE",
  "ad_type": "all",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

## Output

```json
{
  "adArchiveID": {
    "label": "Ad Archive ID",
    "format": "string"
  },
  "pageName": {
    "label": "Page Name",
    "format": "string"
  },
  "mediaType": {
    "label": "Media Type",
    "format": "string"
  },
  "snapshotUrl": {
    "label": "Snapshot URL",
    "format": "string"
  },
  "headline": {
    "label": "Headline",
    "format": "string"
  },
  "adBody": {
    "label": "Ad Copy",
    "format": "string"
  },
  "ctaText": {
    "label": "CTA Button",
    "format": "string"
  },
  "linkUrl": {
    "label": "Landing Page URL",
    "format": "string"
  },
  "isActive": {
    "label": "Active Status",
    "format": "boolean"
  },
  "startDate": {
    "label": "Start Date",
    "format": "string"
  },
  "publisherPlatforms": {
    "label": "Publisher Platforms",
    "format": "array"
  }
}
```

## How it works

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

The Meta Ad Library Scraper (Facebook & Instagram Ads) Actor is ready to run with the inputs already set for "Meta Ads Spy Tool: Automate, Schedule & Track via API". [Sign up or log in](https://console.apify.com/create-task-from-example/MwjZOSDY3kj5FYQA7) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Meta Ads Spy Tool: Automate, Schedule & Track via API" task

The Meta Ad Library Scraper (Facebook & Instagram Ads) Actor will start running based on the input automatically. You can also change all the input fields, like search keyword, facebook page urls or ids, and more, to match your specific use case.

### 3. Receive the "Meta Ads Spy Tool: Automate, Schedule & Track via API" 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 archive id, page name, media type, 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 "Meta Ads Spy Tool: Automate, Schedule & Track via API" task via API](https://apify.com/chadi.baraou/facebook-ad-library-scraper.md).

## About this Actor

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