# LinkedIn Ads Library Scraper (`dz_omar/linkedin-ads-scraper`) Actor

🔍 Extract comprehensive LinkedIn ads data from the Ad Library. Get ad creatives, headlines, copy, advertiser info, and targeting details. Perfect for competitive intelligence, 📈  market research, and ad campaign analysis. Supports keyword search, date filtering, and multi-country targeting.

- **URL**: https://apify.com/dz\_omar/linkedin-ads-scraper.md
- **Developed by:** [dz\_omar](https://apify.com/dz_omar) (community)
- **Categories:** Lead generation, Social media, SEO tools
- **Stats:** 5 total users, 4 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 📢 LinkedIn Ad Library Scraper

**Extract comprehensive advertising data from LinkedIn's Ad Library with automatic pagination and filtering.**

This powerful Apify actor extracts detailed ad information from LinkedIn's public Ad Library, delivering structured data about ad campaigns including creatives, headlines, advertiser details, and targeting information.

---

### 🌟 Key Features

#### 🎯 Comprehensive Ad Data Extraction
- **Ad Creatives** - Images, videos, and carousel content
- **Ad Copy** - Headlines, body text, and descriptions
- **Advertiser Information** - Company names, logos, and bio/subtitle text
- **Call-to-Action** - CTA button text and links
- **External Links** - URLs mentioned in ad text
- **Metadata** - Ad IDs, creative types, and timestamps

#### ⚡ Performance & Reliability
- **Smart Pagination** - Automatically handles multi-page results
- **Keyword Search** - Search by keywords or account owners
- **Date Filtering** - Filter ads by time periods
- **Country Filtering** - Target specific geographic regions
- **Rate Limiting** - Built-in delays to prevent blocking
- **Retry Logic** - Exponential backoff with 3 retry attempts
- **Proxy Support** - Optional Apify Proxy integration

#### 🎯 Flexible Configuration
- **Multiple Keywords** - Process multiple search terms in one run
- **Account Owners** - Filter by specific advertisers
- **Result Limits** - Control maximum results (or scrape all)
- **Custom Date Ranges** - Search specific time periods
- **Multi-Country** - Search ads from multiple countries

---

### 🚀 Quick Start

#### Basic Usage

```json
{
  "keyword": ["apify"],
  "maxResults": 50
}
````

#### Advanced Configuration

```json
{
  "keyword": ["saas", "marketing automation"],
  "accountOwner": ["Apify", "HubSpot"],
  "countries": ["US", "GB", "CA"],
  "dateOption": "last-30-days",
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 📋 Input Configuration

#### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `keyword` | array | ❌ No | - | Keywords to search in Ad Library |
| `accountOwner` | array | ❌ No | - | Filter by advertiser account names |
| `countries` | array | ❌ No | All | Country codes (e.g., US, GB, CA) |
| `maxResults` | integer | ❌ No | 50 | Maximum ads to scrape (0 = unlimited) |
| `dateOption` | string | ❌ No | - | Date filter (last-30-days, current-year, etc.) |
| `startDate` | string | ❌ No | - | Custom start date (YYYY-MM-DD) |
| `endDate` | string | ❌ No | - | Custom end date (YYYY-MM-DD) |
| `proxyConfiguration` | object | ❌ No | - | Apify proxy settings |

#### Input Schema Details

##### keyword

Array of keywords to search for in LinkedIn Ad Library.

**Example:**

```json
{
  "keyword": ["apify", "web scraping", "automation"]
}
```

##### accountOwner

Filter ads by specific advertiser names (optional).

**Example:**

```json
{
  "accountOwner": ["Apify", "Microsoft", "Google"]
}
```

##### countries

Array of country codes to filter ads by geographic targeting.

**Example:**

```json
{
  "countries": ["US", "GB", "CA", "AU"]
}
```

##### Date Filtering Options

**Predefined Options:**

- `last-30-days` - Last 30 days
- `current-month` - Current month
- `current-year` - Current year
- `last-year` - Previous year
- `custom-date-range` - Custom date range (requires startDate and endDate)

**Custom Date Range:**

```json
{
  "dateOption": "custom-date-range",
  "startDate": "2024-01-01",
  "endDate": "2024-12-31"
}
```

##### proxyConfiguration

Optional proxy settings for improved reliability:

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 📤 Output Structure

#### Ad Data Format

```json
{
  "adId": "894398854",
  "advertiserName": "Apify",
  "advertiserBio": "CEO at Apify | Helping people get more value from the web",
  "isPromoted": true,
  "creativeType": "SPONSORED_STATUS_UPDATE",
  "headline": "$1M in prizes for tools AI needs. The frontier is open for builders.",
  "adText": "Companies deploying AI hit walls. Tools don't exist yet. That's your opportunity. Build on Apify, win your share.",
  "detailPageUrl": "https://www.linkedin.com/ad-library/detail/894398854",
  "imageUrl": "https://media.licdn.com/dms/image/v2/D4E10AQH0zRaEVZ_APg/...",
  "logoUrl": "https://media.licdn.com/dms/image/v2/D4E0BAQHAN7DZIQRKSw/...",
  "ctaText": "View details",
  "externalLinksInText": [],
  "scrapedAt": "2025-12-03T00:55:56.066Z"
}
```

#### Output Fields Explained

##### Ad Identification

- `adId` - Unique LinkedIn ad identifier
- `advertiserName` - Company/advertiser name
- `advertiserBio` - Advertiser bio/subtitle text (e.g., job title, company description, headline)
- `isPromoted` - Whether ad is promoted
- `creativeType` - Type of ad creative (SPONSORED\_STATUS\_UPDATE, etc.)

##### Ad Content

- `headline` - Ad headline text
- `adText` - Main ad body text/description
- `ctaText` - Call-to-action button text

##### Visual Assets

- `imageUrl` - URL of ad creative image
- `logoUrl` - URL of advertiser's logo

##### Additional Data

- `detailPageUrl` - LinkedIn URL to ad detail page
- `externalLinksInText` - Array of external URLs found in ad text
- `scrapedAt` - ISO 8601 timestamp when ad was scraped

***

### 📊 Pre-Configured Data Views

#### 1. 📢 Overview

Quick summary of all ads with essential information including advertiser bio.

**Fields:** Ad image, ID, advertiser, bio, creative type, headline, ad text, CTA, LinkedIn URL

**Use Case:** Initial ad review and filtering

#### 2. 📋 Detailed View

Complete ad information including external links, timestamps, and advertiser bio.

**Fields:** All ad data including images, logos, bio, external links, scrape timestamps

**Use Case:** In-depth ad analysis and competitive research

#### 3. 🏢 Advertisers

Ads grouped by advertiser/company with bio information.

**Fields:** Logo, company name, bio, ad ID, headline, creative type, URL

**Use Case:** Track specific advertisers, competitor monitoring

#### 4. 🎨 Creative Analysis

Focus on ad creatives and content including advertiser bio.

**Fields:** Creative image, ID, advertiser, bio, type, headline, body text, CTA

**Use Case:** Creative inspiration, copywriting research, A/B testing ideas

***

### 💡 Use Cases

#### 📊 Competitive Intelligence

- **Competitor Ad Tracking** - Monitor competitor ad campaigns and positioning
- **Creative Research** - Analyze successful ad creatives and messaging
- **Messaging Analysis** - Study competitor positioning, bio descriptions, and messaging
- **Budget Estimation** - Track ad volume and frequency by advertiser

#### 🎯 Marketing & Advertising

- **Creative Inspiration** - Find ideas for your own campaigns
- **Copy Research** - Study effective headlines and ad text
- **Bio & Description Ideas** - Analyze how advertisers describe themselves
- **CTA Analysis** - Discover compelling call-to-action approaches
- **Trend Monitoring** - Track advertising trends in your industry

#### 📈 Market Research

- **Industry Analysis** - Study advertising patterns by sector
- **Brand Monitoring** - Track brand advertising activity and positioning
- **Geographic Insights** - Analyze regional advertising differences
- **Seasonal Patterns** - Identify seasonal advertising trends
- **Advertiser Positioning** - Understand how companies present themselves

#### 🤖 Automation & Integration

- **Ad Monitoring Alerts** - Get notified of new competitor ads
- **Database Building** - Create comprehensive ad databases with advertiser profiles
- **API Integration** - Feed data into your own systems
- **Reporting Automation** - Generate regular competitive reports

***

### ⚙️ Advanced Configuration

#### Multi-Keyword Search

Search for multiple keywords in one run:

```json
{
  "keyword": [
    "web scraping",
    "data extraction",
    "api integration",
    "automation tools"
  ],
  "maxResults": 200
}
```

This will scrape up to 200 ads total across all keywords.

#### Account Owner Filtering

Track specific advertisers:

```json
{
  "keyword": ["marketing automation"],
  "accountOwner": ["HubSpot", "Salesforce", "Marketo"],
  "maxResults": 0
}
```

#### Date Range Analysis

Analyze ads from specific time periods:

```json
{
  "keyword": ["black friday"],
  "dateOption": "custom-date-range",
  "startDate": "2024-11-01",
  "endDate": "2024-11-30",
  "maxResults": 0
}
```

#### Geographic Targeting

Focus on specific countries:

```json
{
  "keyword": ["fintech"],
  "countries": ["US", "GB", "SG", "HK"],
  "maxResults": 500
}
```

#### Using Proxies for Scale

For reliable large-scale scraping:

```json
{
  "keyword": ["saas"],
  "maxResults": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 📈 Performance Metrics

#### Scraping Speed

- **Single Ad** - ~0.2 seconds
- **Page (10 ads)** - ~2-3 seconds (including delay)
- **100 Ads** - ~30-40 seconds
- **1000 Ads** - ~5-7 minutes

#### Resource Usage

- **Memory** - 256MB minimum, 2048MB maximum
- **CPU** - Low to moderate usage
- **Network** - Moderate bandwidth usage

***

### ⚠️ Important Notes

#### Legal Considerations

This actor extracts publicly available data from LinkedIn's Ad Library. Users must:

- Comply with LinkedIn's Terms of Service
- Respect robots.txt directives
- Follow applicable data protection laws (GDPR, CCPA, etc.)
- Use data responsibly and ethically

**The actor creator is not responsible for how users utilize the extracted data.**

#### Data Accuracy

- Data is extracted as-is from LinkedIn Ad Library
- Ad availability may change between scraping sessions
- Some fields may be null if not present in the ad
- External links are extracted from ad text content
- Advertiser bio reflects current LinkedIn profile information

#### Rate Limiting

- Built-in 2-second delays between pages
- Retry logic handles temporary failures
- Proxy usage recommended for large-scale operations
- LinkedIn may implement rate limiting

#### Updates & Maintenance

LinkedIn may update their Ad Library structure. If the actor stops working:

1. Check for actor updates on Apify
2. Report issues via GitHub or Apify support
3. Monitor actor changelog for fixes

***

### 📚 Additional Resources

#### Sample Searches

**General Keyword:**

```json
{
  "keyword": ["apify"],
  "maxResults": 50
}
```

**Competitor Research:**

```json
{
  "keyword": ["web scraping"],
  "accountOwner": ["ParseHub", "Octoparse", "Apify"],
  "dateOption": "last-30-days"
}
```

**Industry Analysis:**

```json
{
  "keyword": ["marketing automation", "crm software"],
  "countries": ["US", "GB", "CA"],
  "maxResults": 500
}
```

**Seasonal Campaign:**

```json
{
  "keyword": ["christmas", "holiday sale"],
  "dateOption": "custom-date-range",
  "startDate": "2024-12-01",
  "endDate": "2024-12-25"
}
```

***

### 💬 Support & Contact

Need help or have questions? We're here for you:

- 📧 **Email:** <fridaytechnolog@gmail.com>
- 🙋 **GitHub:** [DZ-ABDLHAKIM](https://github.com/DZ-ABDLHAKIM)
- 🐦 **Twitter:** [@DZ\_45Omar](https://x.com/DZ_45Omar)
- 📧 **Apify Profile:** [dz\_omar](https://apify.com/dz_omar?fpr=smcx63)

***

### 🌟 Related Actors by [DZ\_OMAR](https://apify.com/dz_omar?fpr=smcx63)

#### 🎬 Video & Media Tools

**[YouTube Transcript & Metadata Extractor](https://apify.com/dz_omar/youtube-transcript-metadata?fpr=smcx63)**
Extract complete video transcripts with timestamps and comprehensive metadata.

**[YouTube Full Channel, Playlists, Shorts, Live](https://apify.com/dz_omar/Youtube-Scraper-Pro?fpr=smcx63)**
Extract complete playlist information with all video details from any YouTube playlist.

**[Zoom Scraper | 🎥 Downloader & 📄 Transcript](https://apify.com/dz_omar/zoom-scraper?fpr=smcx63)**
Extract Zoom meeting recordings, transcripts, and metadata.

**[Loom Scraper | 🎥 Downloader & 📄 Transcript](https://apify.com/dz_omar/loom-video-scraper?fpr=smcx63)**
Download Loom videos and extract transcripts.

#### 🏠 Real Estate Data

**[PropertyFinder Scraper](https://apify.com/dz_omar/propertyfinder-scraper?fpr=smcx63)**
Extract real estate property listings from PropertyFinder across UAE, Saudi Arabia, Bahrain, Egypt, and Qatar.

**[Idealista Scraper API](https://apify.com/dz_omar/idealista-scraper-api?fpr=smcx63)**
Advanced Idealista property data extraction with API access.

**[Idealista Scraper](https://apify.com/dz_omar/idealista-scraper?fpr=smcx63)**
Extract Spanish real estate listings from Idealista.

#### 🛠️ Developer & Security Tools

**[Screenshot](https://apify.com/dz_omar/screenshot?fpr=smcx63)**
Fast, reliable webpage screenshots with customizable options.

**[Ultimate Screenshot](https://apify.com/dz_omar/ultimate-screenshot?fpr=smcx63)**
Advanced screenshot tool with full-page capture, custom viewports, and quality controls.

**[Network Security Scanner](https://apify.com/dz_omar/network-security-scanner?fpr=smcx63)**
Scan websites for security vulnerabilities and get comprehensive security reports.

#### 📱 Social Media Tools

**[Facebook Ads Scraper Pro](https://apify.com/dz_omar/facebook-ads-scraper-pro?fpr=smcx63)**
Extract Facebook ads data for competitor analysis and market research.

**[AI Contact Intelligence Extractor](https://apify.com/dz_omar/ai-contact-intelligence?fpr=smcx63)**
Extract emails, phones, contacts & custom data using AI.

***

**Ready to extract LinkedIn ad data?** [Start using LinkedIn Ad Library Scraper now!](https://apify.com/dz_omar/linkedin-ads-scraper?fpr=smcx63)

# Actor input Schema

## `keyword` (type: `array`):

Keywords to search for in LinkedIn Ad Library (e.g., 'apify', 'marketing', 'saas')

## `accountOwner` (type: `array`):

Filter ads by advertiser account name (e.g., 'Apify', 'Microsoft'). Leave empty to search all advertisers.

## `countries` (type: `array`):

Select countries to filter ads. Leave empty for all countries.

## `maxResults` (type: `integer`):

Total number of ads to scrape (e.g., 10, 50, 100, 500). Set 0 for unlimited.

## `dateOption` (type: `string`):

Predefined date range options (overridden if Start/End Date are specified)

## `startDate` (type: `string`):

Start date in YYYY-MM-DD format. When combined with End Date, this takes priority over Date Filter.

## `endDate` (type: `string`):

End date in YYYY-MM-DD format. When combined with Start Date, this takes priority over Date Filter.

## `proxyConfiguration` (type: `object`):

Use Apify proxy for better performance and reliability

## Actor input object example

```json
{
  "keyword": [
    "apify"
  ],
  "accountOwner": [
    "apify"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Complete dataset of scraped LinkedIn ads with key information

## `detailedAds` (type: `string`):

Full ad information including external links and timestamps

## `advertisers` (type: `string`):

Ads grouped by advertiser/company

## `creatives` (type: `string`):

Focus on ad creatives, headlines, and copy

# 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 = {
    "keyword": [
        "apify"
    ],
    "accountOwner": [
        "apify"
    ],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dz_omar/linkedin-ads-scraper").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 = {
    "keyword": ["apify"],
    "accountOwner": ["apify"],
    "maxResults": 50,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("dz_omar/linkedin-ads-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keyword": [
    "apify"
  ],
  "accountOwner": [
    "apify"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call dz_omar/linkedin-ads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dz_omar/linkedin-ads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Ads Library Scraper",
        "description": "🔍 Extract comprehensive LinkedIn ads data from the Ad Library. Get ad creatives, headlines, copy, advertiser info, and targeting details. Perfect for competitive intelligence, 📈  market research, and ad campaign analysis. Supports keyword search, date filtering, and multi-country targeting.",
        "version": "1.0",
        "x-build-id": "BFw0GUKGOPE0YQMkR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dz_omar~linkedin-ads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dz_omar-linkedin-ads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dz_omar~linkedin-ads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dz_omar-linkedin-ads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dz_omar~linkedin-ads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dz_omar-linkedin-ads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "keyword": {
                        "title": "🔍 Search by keyword",
                        "type": "array",
                        "description": "Keywords to search for in LinkedIn Ad Library (e.g., 'apify', 'marketing', 'saas')",
                        "items": {
                            "type": "string"
                        }
                    },
                    "accountOwner": {
                        "title": "🏢 Search by company or advertiser name",
                        "type": "array",
                        "description": "Filter ads by advertiser account name (e.g., 'Apify', 'Microsoft'). Leave empty to search all advertisers.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "countries": {
                        "title": "🌍 Countries",
                        "type": "array",
                        "description": "Select countries to filter ads. Leave empty for all countries.",
                        "items": {
                            "type": "string",
                            "enumTitles": [
                                "Afghanistan",
                                "Aland Islands",
                                "Albania",
                                "Algeria",
                                "American Samoa",
                                "Andorra",
                                "Angola",
                                "Anguilla",
                                "Antarctica",
                                "Antigua and Barbuda",
                                "Argentina",
                                "Armenia",
                                "Aruba",
                                "Australia",
                                "Austria",
                                "Azerbaijan",
                                "Bahamas",
                                "Bahrain",
                                "Bangladesh",
                                "Barbados",
                                "Belarus",
                                "Belgium",
                                "Belize",
                                "Benin",
                                "Bermuda",
                                "Bhutan",
                                "Bolivia",
                                "Bosnia and Herzegovina",
                                "Botswana",
                                "Bouvet Island",
                                "Brazil",
                                "British Indian Ocean Territory",
                                "Brunei Darussalam",
                                "Bulgaria",
                                "Burkina Faso",
                                "Burundi",
                                "Cambodia",
                                "Cameroon",
                                "Canada",
                                "Cape Verde",
                                "Caribbean Nations",
                                "Cayman Islands",
                                "Central African Republic",
                                "Chad",
                                "Chile",
                                "China",
                                "Christmas Island",
                                "Cocos (Keeling) Islands",
                                "Colombia",
                                "Comoros",
                                "Congo",
                                "Cook Islands",
                                "Costa Rica",
                                "Cote D’Ivoire (Ivory Coast)",
                                "Croatia",
                                "Cuba",
                                "Cyprus",
                                "Czech Republic",
                                "Democratic Republic of the Congo",
                                "Denmark",
                                "Djibouti",
                                "Dominica",
                                "Dominican Republic",
                                "East Timor",
                                "Ecuador",
                                "Egypt",
                                "El Salvador",
                                "Equatorial Guinea",
                                "Eritrea",
                                "Estonia",
                                "Ethiopia",
                                "Falkland Islands (Malvinas)",
                                "Faroe Islands",
                                "Federated States of Micronesia",
                                "Fiji",
                                "Finland",
                                "France",
                                "French Guiana",
                                "French Polynesia",
                                "French Southern Territories",
                                "Gabon",
                                "Gambia",
                                "Georgia",
                                "Germany",
                                "Ghana",
                                "Gibraltar",
                                "Greece",
                                "Greenland",
                                "Grenada",
                                "Guadeloupe",
                                "Guam",
                                "Guatemala",
                                "Guernsey",
                                "Guinea",
                                "Guinea-Bissau",
                                "Guyana",
                                "Haiti",
                                "Heard Island and McDonald Islands",
                                "Honduras",
                                "Hong Kong",
                                "Hungary",
                                "Iceland",
                                "India",
                                "Indonesia",
                                "Iran",
                                "Iraq",
                                "Ireland",
                                "Isle of Man",
                                "Israel",
                                "Italy",
                                "Jamaica",
                                "Japan",
                                "Jersey",
                                "Jordan",
                                "Kazakhstan",
                                "Kenya",
                                "Kiribati",
                                "Korea",
                                "Korea (North)",
                                "Kosovo",
                                "Kuwait",
                                "Kyrgyzstan",
                                "Laos",
                                "Latvia",
                                "Lebanon",
                                "Lesotho",
                                "Liberia",
                                "Libya",
                                "Liechtenstein",
                                "Lithuania",
                                "Luxembourg",
                                "Macao",
                                "Macedonia",
                                "Madagascar",
                                "Malawi",
                                "Malaysia",
                                "Maldives",
                                "Mali",
                                "Malta",
                                "Marshall Islands",
                                "Martinique",
                                "Mauritania",
                                "Mauritius",
                                "Mayotte",
                                "Mexico",
                                "Moldova",
                                "Monaco",
                                "Mongolia",
                                "Montenegro",
                                "Montserrat",
                                "Morocco",
                                "Mozambique",
                                "Myanmar",
                                "Namibia",
                                "Nauru",
                                "Nepal",
                                "Netherlands",
                                "Netherlands Antilles",
                                "New Caledonia",
                                "New Zealand",
                                "Nicaragua",
                                "Niger",
                                "Nigeria",
                                "Niue",
                                "Norfolk Island",
                                "Northern Mariana Islands",
                                "Norway",
                                "Pakistan",
                                "Palau",
                                "Palestinian Territory",
                                "Panama",
                                "Papua New Guinea",
                                "Paraguay",
                                "Peru",
                                "Philippines",
                                "Pitcairn",
                                "Poland",
                                "Portugal",
                                "Puerto Rico",
                                "Qatar",
                                "Reunion",
                                "Romania",
                                "Russian Federation",
                                "Rwanda",
                                "S. Georgia and S. Sandwich Islands",
                                "Saint Helena",
                                "Saint Kitts and Nevis",
                                "Saint Lucia",
                                "Saint Pierre and Miquelon",
                                "Saint Vincent and the Grenadines",
                                "Samoa",
                                "San Marino",
                                "Sao Tome and Principe",
                                "Saudi Arabia",
                                "Senegal",
                                "Serbia",
                                "Serbia and Montenegro",
                                "Seychelles",
                                "Sierra Leone",
                                "Singapore",
                                "Slovak Republic",
                                "Slovenia",
                                "Solomon Islands",
                                "Somalia",
                                "South Africa",
                                "South Sudan",
                                "Spain",
                                "Sri Lanka",
                                "Sudan",
                                "Sultanate of Oman",
                                "Suriname",
                                "Svalbard and Jan Mayen",
                                "Swaziland",
                                "Sweden",
                                "Switzerland",
                                "Syria",
                                "Taiwan",
                                "Tajikistan",
                                "Tanzania",
                                "Thailand",
                                "Timor-Leste",
                                "Togo",
                                "Tokelau",
                                "Tonga",
                                "Trinidad and Tobago",
                                "Tunisia",
                                "Turkey",
                                "Turkmenistan",
                                "Turks and Caicos Islands",
                                "Tuvalu",
                                "Uganda",
                                "Ukraine",
                                "United Arab Emirates",
                                "United Kingdom",
                                "United States",
                                "Uruguay",
                                "Uzbekistan",
                                "Vanuatu",
                                "Vatican City State (Holy See)",
                                "Venezuela",
                                "Vietnam",
                                "Virgin Islands (British)",
                                "Virgin Islands (U.S.)",
                                "Wallis and Futuna",
                                "Western Sahara",
                                "Yemen",
                                "Yugoslavia",
                                "Zambia",
                                "Zimbabwe"
                            ],
                            "enum": [
                                "AF",
                                "AX",
                                "AL",
                                "DZ",
                                "AS",
                                "AD",
                                "AO",
                                "AI",
                                "AQ",
                                "AG",
                                "AR",
                                "AM",
                                "AW",
                                "AU",
                                "AT",
                                "AZ",
                                "BS",
                                "BH",
                                "BD",
                                "BB",
                                "BY",
                                "BE",
                                "BZ",
                                "BJ",
                                "BM",
                                "BT",
                                "BO",
                                "BA",
                                "BW",
                                "BV",
                                "BR",
                                "IO",
                                "BN",
                                "BG",
                                "BF",
                                "BI",
                                "KH",
                                "CM",
                                "CA",
                                "CV",
                                "CB",
                                "KY",
                                "CF",
                                "TD",
                                "CL",
                                "CN",
                                "CX",
                                "CC",
                                "CO",
                                "KM",
                                "CG",
                                "CK",
                                "CR",
                                "CI",
                                "HR",
                                "CU",
                                "CY",
                                "CZ",
                                "CD",
                                "DK",
                                "DJ",
                                "DM",
                                "DO",
                                "TP",
                                "EC",
                                "EG",
                                "SV",
                                "GQ",
                                "ER",
                                "EE",
                                "ET",
                                "FK",
                                "FO",
                                "FM",
                                "FJ",
                                "FI",
                                "FR",
                                "GF",
                                "PF",
                                "TF",
                                "GA",
                                "GM",
                                "GE",
                                "DE",
                                "GH",
                                "GI",
                                "GR",
                                "GL",
                                "GD",
                                "GP",
                                "GU",
                                "GT",
                                "GG",
                                "GN",
                                "GW",
                                "GY",
                                "HT",
                                "HM",
                                "HN",
                                "HK",
                                "HU",
                                "IS",
                                "IN",
                                "ID",
                                "IR",
                                "IQ",
                                "IE",
                                "IM",
                                "IL",
                                "IT",
                                "JM",
                                "JP",
                                "JE",
                                "JO",
                                "KZ",
                                "KE",
                                "KI",
                                "KR",
                                "KP",
                                "KO",
                                "KW",
                                "KG",
                                "LA",
                                "LV",
                                "LB",
                                "LS",
                                "LR",
                                "LY",
                                "LI",
                                "LT",
                                "LU",
                                "MO",
                                "MK",
                                "MG",
                                "MW",
                                "MY",
                                "MV",
                                "ML",
                                "MT",
                                "MH",
                                "MQ",
                                "MR",
                                "MU",
                                "YT",
                                "MX",
                                "MD",
                                "MC",
                                "MN",
                                "ME",
                                "MS",
                                "MA",
                                "MZ",
                                "MM",
                                "NA",
                                "NR",
                                "NP",
                                "NL",
                                "AN",
                                "NC",
                                "NZ",
                                "NI",
                                "NE",
                                "NG",
                                "NU",
                                "NF",
                                "MP",
                                "NO",
                                "PK",
                                "PW",
                                "PS",
                                "PA",
                                "PG",
                                "PY",
                                "PE",
                                "PH",
                                "PN",
                                "PL",
                                "PT",
                                "PR",
                                "QA",
                                "RE",
                                "RO",
                                "RU",
                                "RW",
                                "GS",
                                "SH",
                                "KN",
                                "LC",
                                "PM",
                                "VC",
                                "WS",
                                "SM",
                                "ST",
                                "SA",
                                "SN",
                                "RS",
                                "CS",
                                "SC",
                                "SL",
                                "SG",
                                "SK",
                                "SI",
                                "SB",
                                "SO",
                                "ZA",
                                "SS",
                                "ES",
                                "LK",
                                "SD",
                                "OM",
                                "SR",
                                "SJ",
                                "SZ",
                                "SE",
                                "CH",
                                "SY",
                                "TW",
                                "TJ",
                                "TZ",
                                "TH",
                                "TL",
                                "TG",
                                "TK",
                                "TO",
                                "TT",
                                "TN",
                                "TR",
                                "TM",
                                "TC",
                                "TV",
                                "UG",
                                "UA",
                                "AE",
                                "GB",
                                "US",
                                "UY",
                                "UZ",
                                "VU",
                                "VA",
                                "VE",
                                "VN",
                                "VG",
                                "VI",
                                "WF",
                                "EH",
                                "YE",
                                "YU",
                                "ZM",
                                "ZW"
                            ]
                        }
                    },
                    "maxResults": {
                        "title": "📊 Maximum Results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Total number of ads to scrape (e.g., 10, 50, 100, 500). Set 0 for unlimited.",
                        "default": 10
                    },
                    "dateOption": {
                        "title": "Date Filter",
                        "enum": [
                            "last-30-days",
                            "current-month",
                            "current-year",
                            "last-year",
                            "custom-date-range"
                        ],
                        "type": "string",
                        "description": "Predefined date range options (overridden if Start/End Date are specified)"
                    },
                    "startDate": {
                        "title": "🚀 Start Date (Custom Range)",
                        "type": "string",
                        "description": "Start date in YYYY-MM-DD format. When combined with End Date, this takes priority over Date Filter."
                    },
                    "endDate": {
                        "title": "🏁 End Date (Custom Range)",
                        "type": "string",
                        "description": "End date in YYYY-MM-DD format. When combined with Start Date, this takes priority over Date Filter."
                    },
                    "proxyConfiguration": {
                        "title": "🌐 Proxy Configuration",
                        "type": "object",
                        "description": "Use Apify proxy for better performance and reliability",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
