# AI Ad Remix: Rewrite a Winning Ad with Claude or GPT

**Use case:** 

Takes one ad by its Ad Library link (the one with ?id= in it) and gets its copy, headline, creative and landing page ready for AI. Connect the LLM Dataset Processor integration with your Claude or OpenAI key to get fresh headlines, copy and angles after every run. Or ask Claude to rewrite it through Apify's MCP server.

## Input

```json
{
  "adLibraryUrls": [
    "https://www.facebook.com/ads/library/?id=3666222156864560"
  ],
  "pageID": "15087023444",
  "searchType": "keyword_unordered",
  "activeStatus": "active",
  "country": "ALL",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 4,
  "maxAds": 100,
  "delayMs": 300,
  "pageSize": 30,
  "raw": false,
  "proxyRotations": 3,
  "resume": true,
  "continueFromLastRun": false,
  "shardSplitThreshold": 1500,
  "impersonate": "chrome146"
}
```

## Output

```json
{
  "page_name": {
    "label": "Page name",
    "format": "string"
  },
  "is_active": {
    "label": "Active",
    "format": "boolean"
  },
  "snapshot.display_format": {
    "label": "Format",
    "format": "string"
  },
  "snapshot.title": {
    "label": "Headline",
    "format": "string"
  },
  "snapshot.body.text": {
    "label": "Ad copy text",
    "format": "string"
  },
  "snapshot.cta_text": {
    "label": "Button text",
    "format": "string"
  },
  "snapshot.link_url": {
    "label": "Landing page",
    "format": "string"
  },
  "start_date": {
    "label": "Start date",
    "format": "integer"
  },
  "end_date": {
    "label": "End date",
    "format": "integer"
  },
  "publisher_platform": {
    "label": "Platforms",
    "format": "array"
  },
  "collation_count": {
    "label": "Variant count",
    "format": "integer"
  },
  "ad_archive_id": {
    "label": "Ad ID",
    "format": "string"
  }
}
```

## About this Actor

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