# Ad Library to Winning Angles and Ad Concepts (`seasons-ai/ad-library-to-angles`) Actor

Find which competitor ad angles, hooks and offers run longest in the Meta Ad Library, spot gaps, and get original ad concepts. Pay per ad and concept.

- **URL**: https://apify.com/seasons-ai/ad-library-to-angles.md
- **Developed by:** [Seasons AI](https://apify.com/seasons-ai) (community)
- **Categories:** AI, Marketing
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 analysed ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## Ad Library to Winning Angles and Ad Concepts

You already scrape your competitors' ads from the Meta Ad Library. This Actor tells you **which angles, hooks and offers they keep running the longest**, what they started testing in the last two weeks and which angles nobody covers. Then it writes **original ad concepts for your product** based on that.

Advertisers stop paying for ads that don't convert. An ad that has run for 60 days is the best public sign of a winner, so this Actor uses **how long each ad has been running** as its performance signal.

### What you can do

- See every competitor ad labelled with its **angle, hook, offer, emotion, creative format and audience**, next to its start date, days running, placements, media type, CTA and landing domain.
- Find the **angles and offers that run longest** for each brand and across all of them, and how many copy variants each angle gets (heavy testing = the brand believes in it).
- See **what is new**: ads started in the last 14 days, and angles that appear only in those fresh tests.
- Find **gaps**: angles, offers, hooks, emotions and formats no competitor uses, or only one does.
- Get **N original ad concepts** for your product (headline, primary text, description, CTA, visual idea, on-image text), about two thirds built on proven angles and one third on open gaps.
- Hand the concepts straight to [Brief to Ad Creative Matrix](https://apify.com/seasons-ai/brief-to-ad-creative-matrix): the run saves a ready input file that renders these angles as ad images in platform sizes.

### How to use

1. Run a Facebook Ad Library scraper on the brand pages you compete with. Both popular scrapers work:

   - [Facebook Ads Scraper](https://apify.com/apify/facebook-ads-scraper) (`apify/facebook-ads-scraper`)
   - [Facebook Ads Library Scraper](https://apify.com/curious_coder/facebook-ads-library-scraper) (`curious_coder/facebook-ads-library-scraper`)

   Use Ad Library page URLs (`…/ads/library/?view_all_page_id=<page id>…`) and include **inactive** ads too (active status *all*): ads that stopped tell you how long a test lasted. 30–100 ads per brand give useful medians.
2. Open this Actor and pick that run's dataset in **Facebook Ad Library scraper dataset**.
3. Paste your **product brief** and choose the number of concepts (0 = analysis only).
4. Start. The Actor reads the dataset, checks the price against your run's maximum cost, and only then begins.

No dataset? Paste the items in **Items** (either scraper's JSON format), or give a link to a JSON or CSV export in **Items URL**. The prefilled input is a 6-ad synthetic demo of two fictional brands, so the form runs as-is.

### Input

| Field | Required | Notes |
|---|---|---|
| `datasetId` | one of these three | Dataset of a Facebook Ad Library scraper run (picker in Console; through the API pass the run's `defaultDatasetId`). Read-only access |
| `items` | | Ad items as JSON in either scraper's format |
| `itemsUrl` | | Link to a JSON array or CSV export (Apify's CSV export with `snapshot/body/text`-style columns works) |
| `brands` | no | Page names or page IDs to keep; other advertisers are ignored and not charged |
| `maxAds` | no | Default 200, max 1,000. Over the cap, ads are taken evenly across brands |
| `useVision` | no | Default on: the creative image (or the first frame of a video) is looked at to label the format and visual |
| `newWindowDays` | no | Default 14. Ads that started within this window count as new |
| `productBrief` | when concepts > 0 | Product, benefits, the offer you can actually run, tone, what to avoid (up to 4,000 characters) |
| `audience` | no | Who your ads speak to |
| `conceptsCount` | no | 0–30, default 6 |
| `language` | no | Language of the concepts and takeaways. Default English |
| `exportCreativeMatrixInput` | no | Default on. Saves `creative-matrix-input.json` |

Example (API):

```json
{
  "datasetId": "<defaultDatasetId of your scraper run>",
  "maxAds": 200,
  "productBrief": "Brand: Driftleaf. Product: a 600 ml cold brew tea bottle with a removable steel infuser. Brew overnight in the fridge. Price $29, free shipping over $40 this month. Tone: calm, a little playful.",
  "audience": "Busy office workers aged 25-40 who want to drink less soda",
  "conceptsCount": 6
}
```

### Output

**Dataset**: one row per ad.

```json
{
  "status": "analyzed",
  "brand": "Example Sportswear",
  "adArchiveId": "1234567890123456",
  "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1234567890123456",
  "startDate": "2026-04-29",
  "endDate": "2026-05-25",
  "isActive": false,
  "activeDays": 27,
  "isNew": false,
  "longevityIndex": 1.0,
  "platforms": ["facebook", "instagram"],
  "mediaType": "image",
  "primaryText": "…",
  "headline": "…",
  "ctaType": "SHOP_NOW",
  "landingDomain": "example.com",
  "angle": "aspiration-lifestyle",
  "angleDetail": "Effortless retro style for everyday outfits",
  "hookType": "benefit-first",
  "hookPattern": "Short promise of an instant style upgrade for any outfit",
  "offer": "none",
  "emotion": "aspiration",
  "format": "lifestyle-photo",
  "audienceCue": "women shopping for casual summer outfits",
  "visualSummary": "Model in a retro tracksuit against a pastel wall",
  "visionUsed": true,
  "priceUsd": 0.005
}
```

Skipped ads (no copy and no creative) have `"status": "skipped"`, a `reason` and `"priceUsd": 0`.

**Key-value store**

| Record | Content |
|---|---|
| `report.md` | The report: takeaways, brand table, angles and offers that run longest, hooks, emotions, formats, media types, CTAs, placements, new in the last 14 days, gaps, concepts, all ads |
| `concepts.json` | Takeaways, gaps worth testing and the ad concepts as JSON |
| `brands.json` | Per-brand summaries: ads, active, new, median and longest days, top and longest-running angles, offers, media mix, placements, landing domains, CTAs, new ads |
| `summary.json` | Overall statistics per dimension and the gap lists |
| `creative-matrix-input.json` | Ready input for Brief to Ad Creative Matrix (your brief, the concept angles, placements, number of concepts) |
| `OUTPUT` | Counts, amount charged and links to the files above |

Each concept:

```json
{
  "id": "C1",
  "angle": "convenience-time-saving",
  "angleLine": "Cold tea ready by morning without boiling water",
  "basis": "proven",
  "hookType": "pain-point",
  "format": "lifestyle-photo",
  "offer": "free-shipping",
  "headline": "Tea that brews while you sleep",
  "primaryText": "…",
  "description": "Glass bottle, steel infuser",
  "cta": "SHOP_NOW",
  "visualIdea": "…",
  "onImageText": "Brewed overnight",
  "whyItShouldWork": "…",
  "evidence": { "value": "convenience-time-saving", "ads": 14, "medianDays": 41, "longRunners": 9 }
}
```

Labels: angles `price-value, quality-craft, convenience-time-saving, performance-results, health-wellness, problem-solution, social-proof, authority-expert, aspiration-lifestyle, identity-values, new-launch-novelty, scarcity-urgency, comparison-switch, emotional-story, sustainability, gifting-occasion, community-belonging, safety-risk-reduction`; offers `percent-discount, amount-discount, free-shipping, bundle-bogo, free-trial, free-gift, limited-time-sale, new-product, financing-installments, guarantee-returns, free-content-lead-magnet, subscription-saving`; plus hook types, emotions and creative formats (see `summary.json`).

### Pricing

Pay per event. Skipped or failed ads and dropped concepts are free.

| Event | When | Price |
|---|---|---|
| `ad-analyzed` | one ad labelled (angle, hook, offer, emotion, format, audience) | **$0.005** |
| `ad-concept` | one original ad concept delivered | **$0.01** |

Worked examples:

| Run | Price |
|---|---|
| Prefilled demo: 6 ads + 6 concepts | 6 × $0.005 + 6 × $0.01 = **$0.09** |
| 50 ads, analysis only | 50 × $0.005 = **$0.25** |
| 200 ads + 6 concepts (default) | $1.00 + $0.06 = **$1.06** |
| 1,000 ads + 30 concepts (run maximum) | $5.00 + $0.30 = $5.30 |

The Actor computes the maximum price before it starts and stops, free of charge, if your run's maximum cost is lower.

Available on paid Apify plans.

### Limits and good to know

- On the free Apify plan the Actor returns a short preview with an example result and prices instead of running.
- Up to 1,000 ads and 30 concepts per run. Per ad, up to 1,800 characters of primary text, the headline, link description, card texts and one image are analysed.
- **Days running** is computed in code from the scraper's start and end dates (to the reference date while the ad is still active), not by the AI. The reference date is the run date, or the latest date in the data when the scrape is older than a week. Medians use ads that started before the new-ads window, so fresh tests don't drag them down.
- Longevity is a proxy, not a metric: brand campaigns, always-on catalog ads and seasonal pushes run long for reasons other than performance. The report shows media types (catalog and dynamic ads are separate) so you can tell them apart.
- Labels come from an AI model reading the copy and one image, so they can be wrong on unusual ads. Creative links from the Ad Library expire after some days; expired creatives are labelled from the copy (same price) and the row says so.
- **Concepts never copy competitors.** The writer only sees labels, statistics and generic hook descriptions, never competitor copy. Every concept is also checked against all competitor copy in your input: a concept that repeats any 6 words in a row is dropped and not charged. Concepts only claim what your brief says. Check prices, offers and claims before you publish.
- Company and brand level only: the Actor keeps page names, ad copy and creative facts. It does not output profile pictures, creator partners, bylines, reach by age and gender, or any personal data. Competitor images are downloaded for a moment, analysed and never stored.
- Use it on public ads you are allowed to analyse, and keep to Meta's terms.

# Actor input Schema

## `datasetId` (type: `string`):

Pick the dataset of your Facebook Ads Scraper (apify/facebook-ads-scraper) or Facebook Ads Library Scraper (curious_coder/facebook-ads-library-scraper) run on one or more competitor pages. Through the API, pass the run's defaultDatasetId. The Actor only reads it. Leave empty to use Items or Items URL instead.

## `items` (type: `array`):

Ad items as JSON in either scraper's format (fields like page_name / pageName, start_date / startDateFormatted, is_active, publisher_platform, snapshot.body, snapshot.title, snapshot.cta_text, snapshot.link_url, snapshot.images, snapshot.videos). Used when no dataset is picked. The prefill is a 6-ad synthetic demo of two fictional brands.

## `itemsUrl` (type: `string`):

Link to a JSON or CSV export of the scraper dataset. Used when neither a dataset nor items are given.

## `brands` (type: `array`):

Optional. Page names or page IDs to keep; other advertisers in the dataset are ignored (not charged). Leave empty to analyse every brand.

## `maxAds` (type: `integer`):

Cap on ads analysed in this run. Over the cap, ads are taken evenly across brands. Each analysed ad is one charge.

## `useVision` (type: `boolean`):

Read each ad's image (or the first frame of its video) to label the format and visual. Off = label from the copy only. Same price either way.

## `newWindowDays` (type: `integer`):

Ads that started within this many days count as new (what competitors are testing right now).

## `productBrief` (type: `string`):

What you sell, key benefits, price/offer you can actually run, tone, what to avoid. Concepts only claim what is in the brief. Required when Number of concepts is above 0. Up to 4,000 characters.

## `audience` (type: `string`):

Optional. Who your ads speak to.

## `conceptsCount` (type: `integer`):

How many original ad concepts to write (headline, primary text, visual idea). 0 = analysis only. Each delivered concept is one charge.

## `language` (type: `string`):

Language of the concepts and takeaways, for example English, German, Spanish.

## `exportCreativeMatrixInput` (type: `boolean`):

Also save creative-matrix-input.json: a ready input for the Brief to Ad Creative Matrix Actor that renders these angles as ad images in platform sizes. Free.

## Actor input object example

```json
{
  "items": [
    {
      "ad_archive_id": "demo001",
      "page_id": "100000000000001",
      "page_name": "Demo Steep Co",
      "is_active": true,
      "start_date_formatted": "2026-07-02 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": 3,
      "snapshot": {
        "page_name": "Demo Steep Co",
        "display_format": "IMAGE",
        "body": {
          "text": "Your afternoon slump has a new fix. Cold-steeped green tea, ready when you open the fridge. Zero sugar, all flavour."
        },
        "title": "Cold tea, no effort",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://demo-steep.example/shop",
        "caption": "demo-steep.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo002",
      "page_id": "100000000000001",
      "page_name": "Demo Steep Co",
      "is_active": false,
      "start_date_formatted": "2026-09-01 07:00:00",
      "end_date_formatted": "2026-09-09 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Steep Co",
        "display_format": "IMAGE",
        "body": {
          "text": "Flash sale: 25% off every steeping bottle until Sunday. Use code CHILL25 at checkout."
        },
        "title": "25% off this weekend",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://demo-steep.example/sale",
        "caption": "demo-steep.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo003",
      "page_id": "100000000000001",
      "page_name": "Demo Steep Co",
      "is_active": true,
      "start_date_formatted": "2026-10-12 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Steep Co",
        "display_format": "VIDEO",
        "body": {
          "text": "We asked 40 nurses on night shifts what keeps them going. Here is what they pour at 3 am."
        },
        "title": "What night shifts drink",
        "cta_type": "LEARN_MORE",
        "cta_text": "Learn more",
        "link_url": "https://demo-steep.example/stories",
        "caption": "demo-steep.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo004",
      "page_id": "100000000000002",
      "page_name": "Demo Leafjar",
      "is_active": true,
      "start_date_formatted": "2026-05-15 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM",
        "AUDIENCE_NETWORK"
      ],
      "collation_count": 2,
      "snapshot": {
        "page_name": "Demo Leafjar",
        "display_format": "IMAGE",
        "body": {
          "text": "Glass, steel and bamboo. Built to outlast a hundred thousand brews, and still look good on your desk."
        },
        "title": "Made to last",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://leafjar-demo.example/bottle",
        "caption": "leafjar-demo.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo005",
      "page_id": "100000000000002",
      "page_name": "Demo Leafjar",
      "is_active": false,
      "start_date_formatted": "2026-08-20 07:00:00",
      "end_date_formatted": "2026-08-27 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Leafjar",
        "display_format": "CAROUSEL",
        "body": {
          "text": "3 iced tea recipes you can prep in 2 minutes tonight. Swipe for the one with mint and lime."
        },
        "title": "3 recipes, 2 minutes",
        "cta_type": "LEARN_MORE",
        "cta_text": "Learn more",
        "link_url": "https://leafjar-demo.example/recipes",
        "caption": "leafjar-demo.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo006",
      "page_id": "100000000000002",
      "page_name": "Demo Leafjar",
      "is_active": true,
      "start_date_formatted": "2026-10-14 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Leafjar",
        "display_format": "IMAGE",
        "body": {
          "text": "Free shipping on every order this month. Your desk deserves better than a can of soda."
        },
        "title": "Free shipping in October",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://leafjar-demo.example/bottle",
        "caption": "leafjar-demo.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    }
  ],
  "maxAds": 200,
  "useVision": true,
  "newWindowDays": 14,
  "productBrief": "Brand: Driftleaf. Product: Driftleaf Cold Brew Tea Bottle, a 600 ml glass bottle with a removable stainless-steel infuser and a bamboo lid. Brew loose-leaf tea in the fridge overnight, no kettle needed. Dishwasher-safe glass, leak-proof lid, fits car cup holders. Price $29, free shipping over $40 this month. Tone: calm, fresh, a little playful. Avoid: health claims, comparing to named brands.",
  "audience": "Busy office workers aged 25-40 who want to drink less soda",
  "conceptsCount": 6,
  "language": "English",
  "exportCreativeMatrixInput": true
}
```

# Actor output Schema

## `ads` (type: `string`):

No description

## `report` (type: `string`):

No description

## `concepts` (type: `string`):

No description

## `brands` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `matrixInput` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "items": [
        {
            "ad_archive_id": "demo001",
            "page_id": "100000000000001",
            "page_name": "Demo Steep Co",
            "is_active": true,
            "start_date_formatted": "2026-07-02 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "collation_count": 3,
            "snapshot": {
                "page_name": "Demo Steep Co",
                "display_format": "IMAGE",
                "body": {
                    "text": "Your afternoon slump has a new fix. Cold-steeped green tea, ready when you open the fridge. Zero sugar, all flavour."
                },
                "title": "Cold tea, no effort",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://demo-steep.example/shop",
                "caption": "demo-steep.example",
                "images": [],
                "videos": [],
                "cards": []
            }
        },
        {
            "ad_archive_id": "demo002",
            "page_id": "100000000000001",
            "page_name": "Demo Steep Co",
            "is_active": false,
            "start_date_formatted": "2026-09-01 07:00:00",
            "end_date_formatted": "2026-09-09 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "collation_count": null,
            "snapshot": {
                "page_name": "Demo Steep Co",
                "display_format": "IMAGE",
                "body": {
                    "text": "Flash sale: 25% off every steeping bottle until Sunday. Use code CHILL25 at checkout."
                },
                "title": "25% off this weekend",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://demo-steep.example/sale",
                "caption": "demo-steep.example",
                "images": [],
                "videos": [],
                "cards": []
            }
        },
        {
            "ad_archive_id": "demo003",
            "page_id": "100000000000001",
            "page_name": "Demo Steep Co",
            "is_active": true,
            "start_date_formatted": "2026-10-12 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "INSTAGRAM"
            ],
            "collation_count": null,
            "snapshot": {
                "page_name": "Demo Steep Co",
                "display_format": "VIDEO",
                "body": {
                    "text": "We asked 40 nurses on night shifts what keeps them going. Here is what they pour at 3 am."
                },
                "title": "What night shifts drink",
                "cta_type": "LEARN_MORE",
                "cta_text": "Learn more",
                "link_url": "https://demo-steep.example/stories",
                "caption": "demo-steep.example",
                "images": [],
                "videos": [],
                "cards": []
            }
        },
        {
            "ad_archive_id": "demo004",
            "page_id": "100000000000002",
            "page_name": "Demo Leafjar",
            "is_active": true,
            "start_date_formatted": "2026-05-15 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM",
                "AUDIENCE_NETWORK"
            ],
            "collation_count": 2,
            "snapshot": {
                "page_name": "Demo Leafjar",
                "display_format": "IMAGE",
                "body": {
                    "text": "Glass, steel and bamboo. Built to outlast a hundred thousand brews, and still look good on your desk."
                },
                "title": "Made to last",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://leafjar-demo.example/bottle",
                "caption": "leafjar-demo.example",
                "images": [],
                "videos": [],
                "cards": []
            }
        },
        {
            "ad_archive_id": "demo005",
            "page_id": "100000000000002",
            "page_name": "Demo Leafjar",
            "is_active": false,
            "start_date_formatted": "2026-08-20 07:00:00",
            "end_date_formatted": "2026-08-27 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "collation_count": null,
            "snapshot": {
                "page_name": "Demo Leafjar",
                "display_format": "CAROUSEL",
                "body": {
                    "text": "3 iced tea recipes you can prep in 2 minutes tonight. Swipe for the one with mint and lime."
                },
                "title": "3 recipes, 2 minutes",
                "cta_type": "LEARN_MORE",
                "cta_text": "Learn more",
                "link_url": "https://leafjar-demo.example/recipes",
                "caption": "leafjar-demo.example",
                "images": [],
                "videos": [],
                "cards": []
            }
        },
        {
            "ad_archive_id": "demo006",
            "page_id": "100000000000002",
            "page_name": "Demo Leafjar",
            "is_active": true,
            "start_date_formatted": "2026-10-14 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "collation_count": null,
            "snapshot": {
                "page_name": "Demo Leafjar",
                "display_format": "IMAGE",
                "body": {
                    "text": "Free shipping on every order this month. Your desk deserves better than a can of soda."
                },
                "title": "Free shipping in October",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://leafjar-demo.example/bottle",
                "caption": "leafjar-demo.example",
                "images": [],
                "videos": [],
                "cards": []
            }
        }
    ],
    "productBrief": "Brand: Driftleaf. Product: Driftleaf Cold Brew Tea Bottle, a 600 ml glass bottle with a removable stainless-steel infuser and a bamboo lid. Brew loose-leaf tea in the fridge overnight, no kettle needed. Dishwasher-safe glass, leak-proof lid, fits car cup holders. Price $29, free shipping over $40 this month. Tone: calm, fresh, a little playful. Avoid: health claims, comparing to named brands.",
    "audience": "Busy office workers aged 25-40 who want to drink less soda"
};

// Run the Actor and wait for it to finish
const run = await client.actor("seasons-ai/ad-library-to-angles").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "items": [
        {
            "ad_archive_id": "demo001",
            "page_id": "100000000000001",
            "page_name": "Demo Steep Co",
            "is_active": True,
            "start_date_formatted": "2026-07-02 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "collation_count": 3,
            "snapshot": {
                "page_name": "Demo Steep Co",
                "display_format": "IMAGE",
                "body": { "text": "Your afternoon slump has a new fix. Cold-steeped green tea, ready when you open the fridge. Zero sugar, all flavour." },
                "title": "Cold tea, no effort",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://demo-steep.example/shop",
                "caption": "demo-steep.example",
                "images": [],
                "videos": [],
                "cards": [],
            },
        },
        {
            "ad_archive_id": "demo002",
            "page_id": "100000000000001",
            "page_name": "Demo Steep Co",
            "is_active": False,
            "start_date_formatted": "2026-09-01 07:00:00",
            "end_date_formatted": "2026-09-09 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "collation_count": None,
            "snapshot": {
                "page_name": "Demo Steep Co",
                "display_format": "IMAGE",
                "body": { "text": "Flash sale: 25% off every steeping bottle until Sunday. Use code CHILL25 at checkout." },
                "title": "25% off this weekend",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://demo-steep.example/sale",
                "caption": "demo-steep.example",
                "images": [],
                "videos": [],
                "cards": [],
            },
        },
        {
            "ad_archive_id": "demo003",
            "page_id": "100000000000001",
            "page_name": "Demo Steep Co",
            "is_active": True,
            "start_date_formatted": "2026-10-12 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": ["INSTAGRAM"],
            "collation_count": None,
            "snapshot": {
                "page_name": "Demo Steep Co",
                "display_format": "VIDEO",
                "body": { "text": "We asked 40 nurses on night shifts what keeps them going. Here is what they pour at 3 am." },
                "title": "What night shifts drink",
                "cta_type": "LEARN_MORE",
                "cta_text": "Learn more",
                "link_url": "https://demo-steep.example/stories",
                "caption": "demo-steep.example",
                "images": [],
                "videos": [],
                "cards": [],
            },
        },
        {
            "ad_archive_id": "demo004",
            "page_id": "100000000000002",
            "page_name": "Demo Leafjar",
            "is_active": True,
            "start_date_formatted": "2026-05-15 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM",
                "AUDIENCE_NETWORK",
            ],
            "collation_count": 2,
            "snapshot": {
                "page_name": "Demo Leafjar",
                "display_format": "IMAGE",
                "body": { "text": "Glass, steel and bamboo. Built to outlast a hundred thousand brews, and still look good on your desk." },
                "title": "Made to last",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://leafjar-demo.example/bottle",
                "caption": "leafjar-demo.example",
                "images": [],
                "videos": [],
                "cards": [],
            },
        },
        {
            "ad_archive_id": "demo005",
            "page_id": "100000000000002",
            "page_name": "Demo Leafjar",
            "is_active": False,
            "start_date_formatted": "2026-08-20 07:00:00",
            "end_date_formatted": "2026-08-27 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "collation_count": None,
            "snapshot": {
                "page_name": "Demo Leafjar",
                "display_format": "CAROUSEL",
                "body": { "text": "3 iced tea recipes you can prep in 2 minutes tonight. Swipe for the one with mint and lime." },
                "title": "3 recipes, 2 minutes",
                "cta_type": "LEARN_MORE",
                "cta_text": "Learn more",
                "link_url": "https://leafjar-demo.example/recipes",
                "caption": "leafjar-demo.example",
                "images": [],
                "videos": [],
                "cards": [],
            },
        },
        {
            "ad_archive_id": "demo006",
            "page_id": "100000000000002",
            "page_name": "Demo Leafjar",
            "is_active": True,
            "start_date_formatted": "2026-10-14 07:00:00",
            "end_date_formatted": "2026-10-20 07:00:00",
            "publisher_platform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "collation_count": None,
            "snapshot": {
                "page_name": "Demo Leafjar",
                "display_format": "IMAGE",
                "body": { "text": "Free shipping on every order this month. Your desk deserves better than a can of soda." },
                "title": "Free shipping in October",
                "cta_type": "SHOP_NOW",
                "cta_text": "Shop now",
                "link_url": "https://leafjar-demo.example/bottle",
                "caption": "leafjar-demo.example",
                "images": [],
                "videos": [],
                "cards": [],
            },
        },
    ],
    "productBrief": "Brand: Driftleaf. Product: Driftleaf Cold Brew Tea Bottle, a 600 ml glass bottle with a removable stainless-steel infuser and a bamboo lid. Brew loose-leaf tea in the fridge overnight, no kettle needed. Dishwasher-safe glass, leak-proof lid, fits car cup holders. Price $29, free shipping over $40 this month. Tone: calm, fresh, a little playful. Avoid: health claims, comparing to named brands.",
    "audience": "Busy office workers aged 25-40 who want to drink less soda",
}

# Run the Actor and wait for it to finish
run = client.actor("seasons-ai/ad-library-to-angles").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "items": [
    {
      "ad_archive_id": "demo001",
      "page_id": "100000000000001",
      "page_name": "Demo Steep Co",
      "is_active": true,
      "start_date_formatted": "2026-07-02 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": 3,
      "snapshot": {
        "page_name": "Demo Steep Co",
        "display_format": "IMAGE",
        "body": {
          "text": "Your afternoon slump has a new fix. Cold-steeped green tea, ready when you open the fridge. Zero sugar, all flavour."
        },
        "title": "Cold tea, no effort",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://demo-steep.example/shop",
        "caption": "demo-steep.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo002",
      "page_id": "100000000000001",
      "page_name": "Demo Steep Co",
      "is_active": false,
      "start_date_formatted": "2026-09-01 07:00:00",
      "end_date_formatted": "2026-09-09 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Steep Co",
        "display_format": "IMAGE",
        "body": {
          "text": "Flash sale: 25% off every steeping bottle until Sunday. Use code CHILL25 at checkout."
        },
        "title": "25% off this weekend",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://demo-steep.example/sale",
        "caption": "demo-steep.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo003",
      "page_id": "100000000000001",
      "page_name": "Demo Steep Co",
      "is_active": true,
      "start_date_formatted": "2026-10-12 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Steep Co",
        "display_format": "VIDEO",
        "body": {
          "text": "We asked 40 nurses on night shifts what keeps them going. Here is what they pour at 3 am."
        },
        "title": "What night shifts drink",
        "cta_type": "LEARN_MORE",
        "cta_text": "Learn more",
        "link_url": "https://demo-steep.example/stories",
        "caption": "demo-steep.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo004",
      "page_id": "100000000000002",
      "page_name": "Demo Leafjar",
      "is_active": true,
      "start_date_formatted": "2026-05-15 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM",
        "AUDIENCE_NETWORK"
      ],
      "collation_count": 2,
      "snapshot": {
        "page_name": "Demo Leafjar",
        "display_format": "IMAGE",
        "body": {
          "text": "Glass, steel and bamboo. Built to outlast a hundred thousand brews, and still look good on your desk."
        },
        "title": "Made to last",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://leafjar-demo.example/bottle",
        "caption": "leafjar-demo.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo005",
      "page_id": "100000000000002",
      "page_name": "Demo Leafjar",
      "is_active": false,
      "start_date_formatted": "2026-08-20 07:00:00",
      "end_date_formatted": "2026-08-27 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Leafjar",
        "display_format": "CAROUSEL",
        "body": {
          "text": "3 iced tea recipes you can prep in 2 minutes tonight. Swipe for the one with mint and lime."
        },
        "title": "3 recipes, 2 minutes",
        "cta_type": "LEARN_MORE",
        "cta_text": "Learn more",
        "link_url": "https://leafjar-demo.example/recipes",
        "caption": "leafjar-demo.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    },
    {
      "ad_archive_id": "demo006",
      "page_id": "100000000000002",
      "page_name": "Demo Leafjar",
      "is_active": true,
      "start_date_formatted": "2026-10-14 07:00:00",
      "end_date_formatted": "2026-10-20 07:00:00",
      "publisher_platform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "collation_count": null,
      "snapshot": {
        "page_name": "Demo Leafjar",
        "display_format": "IMAGE",
        "body": {
          "text": "Free shipping on every order this month. Your desk deserves better than a can of soda."
        },
        "title": "Free shipping in October",
        "cta_type": "SHOP_NOW",
        "cta_text": "Shop now",
        "link_url": "https://leafjar-demo.example/bottle",
        "caption": "leafjar-demo.example",
        "images": [],
        "videos": [],
        "cards": []
      }
    }
  ],
  "productBrief": "Brand: Driftleaf. Product: Driftleaf Cold Brew Tea Bottle, a 600 ml glass bottle with a removable stainless-steel infuser and a bamboo lid. Brew loose-leaf tea in the fridge overnight, no kettle needed. Dishwasher-safe glass, leak-proof lid, fits car cup holders. Price $29, free shipping over $40 this month. Tone: calm, fresh, a little playful. Avoid: health claims, comparing to named brands.",
  "audience": "Busy office workers aged 25-40 who want to drink less soda"
}' |
apify call seasons-ai/ad-library-to-angles --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,seasons-ai/ad-library-to-angles"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Vd7lS6YZYCmZ4u1k2/builds/0uCl8VDV5PbwwJc9n/openapi.json
