# Instagram Ad Library Scraper — Ads by Keyword or Page (`scrapeio/instagram-scraper-premium`) Actor

Scrape Instagram-only ads from Meta Ad Library by keyword, Page ID, or URL. No cookies. Apify AI, MCP, and Cursor ready.

- **URL**: https://apify.com/scrapeio/instagram-scraper-premium.md
- **Developed by:** [Shop Intel](https://apify.com/scrapeio) (community)
- **Categories:** Social media, AI, Agents
- **Features:** Limited permissions
- **Stats:** 131 total users, 7 monthly users, 100.0% runs succeeded, 7 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$6.00 / 1,000 results

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

## Instagram Ads Scraper – Extract Meta Ad Library Ads by Keyword, Brand, or Page ID | Apify Actor

**Instagram Ads Scraper** extracts active Instagram ads, creatives, copy, timing, and performance metadata from the [Meta Ad Library](https://www.facebook.com/ads/library) — search by keyword, Facebook Page ID, or custom Ad Library URL and export structured ad data to JSON or CSV.

### Use with Apify AI

[Apify AI](https://docs.apify.com/account/apify-ai) is live in Apify Console. Describe the job in plain English and it **finds this Actor, fills the input form, runs it, and returns the dataset**. The same ranking powers Store search and the [Apify MCP server](https://docs.apify.com/integrations/mcp) `search-actors` tool used by **Cursor**, Claude, ChatGPT, and other agents.

Use this Actor to scrape **Instagram-only** Meta Ad Library creatives (not Facebook feed ads). Open [Instagram Ad Library Scraper](https://apify.com/scrapeio/instagram-scraper-premium) or ask Apify AI with the prompts below.

#### Prompts that match this Actor

Type these in the **Apify Store search bar** (long, intent-heavy queries route to Apify AI) or the dashboard **Ask Apify AI** widget:

- "Collect Instagram ads for Nike from the Meta Ad Library"
- "Scrape Instagram ad creatives by brand name and export copy, CTA, and spend estimates"
- "Get Instagram-only ads for a Facebook Page ID"
- "Pull the latest Instagram ads for a competitor keyword"
- "Extract Instagram Ad Library creatives without cookies or a Meta developer app"

#### How Apify AI fills the input

| You say | This Actor sets |
|---|---|
| brand or topic | `keyword` |
| Facebook Page ID | `pageId` |
| pasted Ad Library URL | `url` |
| how many ads | `maxResults` |

Apify AI always asks for confirmation before it runs. Nothing is charged until you approve.

#### Cursor, Claude, ChatGPT (Apify MCP)

Pin this Actor as a **default Cursor / MCP tool** so agents call `scrapeio/instagram-scraper-premium` instead of a random Store result. Keep `actors` + `docs` so Apify AI search still works, and list your suite so Cursor prefers these Actors.

**Cursor MCP URL (this Actor first):**

```text
https://mcp.apify.com?tools=actors,docs,scrapeio/instagram-scraper-premium,scrapeio/amazon-scraper,scrapeio/google-maps-scraper-advance,scrapeio/meta-facebook-ad-scrapper-using-ad-library-url-premium,scrapeio/whatsapp-scraper-premium,scrapeio/facebook-ad-library-suggestions,scrapeio/google-news-scraper
```

`.cursor/mcp.json` / Cursor Settings → MCP:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=actors,docs,scrapeio/instagram-scraper-premium,scrapeio/amazon-scraper,scrapeio/google-maps-scraper-advance,scrapeio/meta-facebook-ad-scrapper-using-ad-library-url-premium,scrapeio/whatsapp-scraper-premium,scrapeio/facebook-ad-library-suggestions,scrapeio/google-news-scraper"
    }
  }
}
```

Then: `search-actors` → `fetch-actor-details` → `call-actor` with `scrapeio/instagram-scraper-premium`. Example:

```text
Use scrapeio/instagram-scraper-premium to do this: scrape the data I described. Fill the input from my description and return the dataset.
```

### How to scrape Instagram ads

Use this **Instagram Ad Library scraper** for Instagram-only Meta ads. Keyword, Page ID, or URL in. Creatives, CTAs, and spend estimates out.

### Instagram ads scraper API for Cursor

Call `scrapeio/instagram-scraper-premium` from **Cursor** (Apify MCP), Claude, ChatGPT, the [Apify API](https://docs.apify.com/api/v2), Python (`apify-client`), or JavaScript. Apify AI uses the same ranking as Store search: title, description, README, and input/output schemas. This Actor is documented for that ranker — limited permissions, pay-per-event or compute (not rental), and a filled example input.

### 🧠 Overview

This **Instagram Ads Scraper** is an Apify Actor built for performance marketers, creative strategists, competitive‑intelligence teams, and agencies that need **bulk access to Instagram ad creatives and metadata**. Point it at a keyword (like `nike`), a Facebook Page ID, or a ready‑made Ad Library URL, and the Actor pulls every ad where Instagram is the publisher platform — **ad copy, media, CTA, landing URLs, impressions ranges, spend ranges, demographics, and regional targeting** (when Meta discloses it). All results stream into the Apify Dataset and a structured `OUTPUT` JSON, ready for **creative research, swipe files, brand monitoring, and competitor ad tracking**. No Meta developer account required.

### ✨ Features

- **Extract** Instagram ads only, filtered by publisher platform at the API layer.
- **Search** by **keyword**, **Facebook Page ID**, or full **Meta Ad Library URL**.
- **Scrape** unlimited ads per run — stop when `maxResults` is reached or the source is exhausted.
- **Capture** ad creative metadata: copy, media URLs, CTA, landing page, start and end dates.
- **Harvest** performance bands: impressions ranges, spend ranges (when disclosed), and delivery regions.
- **Export** structured per‑ad JSON to Apify Dataset + `OUTPUT` summary object with run diagnostics.
- **Monitor** run status via `summary.status` (`SUCCESS` / `ERROR`) and typed error objects.
- **Automate** daily or hourly creative pulls with the Apify scheduler and webhooks.
- **Integrate** with Google Sheets, Airtable, Notion, Slack, or a data warehouse via the Apify REST API.
- **Skip** Meta's restricted Ad Library API — no developer app, no tokens, no review process.

### 🎯 Use Cases

- **Competitor Ad Monitoring:** Track every Instagram ad your competitors are running right now — copy, creatives, and landing pages — and build a live swipe file.
- **Creative Strategy & Swipe Files:** Feed an ever‑growing ad library into your creative team's briefs, Notion boards, or Figma canvases.
- **Brand Safety & IP Monitoring:** Catch counterfeit ads, hijacked brand names, or unauthorized affiliates running Instagram creatives under your trademark.
- **Performance Benchmarking:** Compare impressions and spend ranges across brands, verticals, and regions to benchmark your own media plans.
- **Affiliate & Influencer Research:** Identify brands actively advertising on Instagram to pitch influencer, UGC, or affiliate partnerships.
- **Political & Public‑Interest Research:** Build longitudinal datasets of political or issue‑based Instagram ads for journalism, academia, and NGOs.

### ⚙️ Input Parameters

| Name | Type | Required | Description | Example |
|------|------|----------|-------------|---------|
| `keyword` | string | One of three | Brand or search term. | `"nike"` |
| `pageId` | string | One of three | Numeric Facebook Page ID tied to the brand. | `"15087023549"` |
| `url` | string | One of three | Full Meta / Facebook Ad Library URL. | `"https://www.facebook.com/ads/library/?q=nike&ad_type=all"` |
| `maxResults` | integer | Yes | Target number of Instagram ads to collect. | `150` |

### 📤 Output Example (JSON)

```json
{
  "metadata": {
    "adArchiveId": "1234567890123456",
    "pageId": "15087023549",
    "pageName": "Nike",
    "publisherPlatforms": ["INSTAGRAM"]
  },
  "ad_content": {
    "body": "Just Do It. Discover the new Pegasus 41.",
    "title": "Nike Pegasus 41",
    "cta": "Shop Now",
    "landingUrl": "https://www.nike.com/launch/t/pegasus-41",
    "mediaUrls": ["https://scontent.../video.mp4"]
  },
  "timing": {
    "startDate": "2026-03-15",
    "endDate": null,
    "active": true
  },
  "performance": {
    "impressions": { "lowerBound": 50000, "upperBound": 60000 },
    "spend": { "lowerBound": 500, "upperBound": 999, "currency": "USD" }
  },
  "distribution": {
    "regions": ["US", "CA", "UK"],
    "demographics": { "ageRange": "18-34", "gender": "all" }
  }
}
```

### 📋 Output Data Schema

Every Instagram ad is returned as a structured object with these top‑level keys:

| Key | Type | Fields |
|---|---|---|
| `metadata` | object | `adArchiveId`, `pageId`, `pageName`, `publisherPlatforms` |
| `ad_content` | object | `body`, `title`, `cta`, `landingUrl`, `mediaUrls[]` |
| `timing` | object | `startDate`, `endDate`, `active` |
| `performance` | object | `impressions.lowerBound`, `impressions.upperBound`, `spend.lowerBound`, `spend.upperBound`, `spend.currency` |
| `distribution` | object | `regions[]`, `demographics.ageRange`, `demographics.gender` |
| `status` | object | `active`, `adDeliveryStartTime`, `adDeliveryStopTime` |
| `additional_info` | object | Any extra fields Meta exposes for the ad (creative tags, disclaimer, etc.) |

Run‑level `OUTPUT` also contains `summary.status` (`SUCCESS` / `ERROR`), `summary.totalAds`, `summary.keyword`, and timing metadata.

### ▶️ How to Use

1. **Run on Apify Console:** Open the [Instagram Ads Scraper Actor page](https://apify.com/scrapeio/instagram-scraper-premium), click **Try for free**, enter a keyword (or Page ID or Ad Library URL), set `maxResults`, and press **Start**.
2. **Via API:** Trigger runs with the [Apify REST API](https://docs.apify.com/api/v2) or `ApifyClient`, then stream the Dataset into your pipeline.
3. **Via CLI:** Run with the [Apify CLI](https://docs.apify.com/cli):
   ```bash
   apify call scrapeio/instagram-scraper-premium --input='{"keyword":"skincare","maxResults":200}'
   ```

### 🔗 API Example (JavaScript)

```js
const { ApifyClient } = require('apify-client');

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('scrapeio/instagram-scraper-premium').call({
  keyword: 'skincare',
  maxResults: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Collected ${items.length} Instagram ads`);
console.log(items[0].ad_content);
```

### 📈 Why Use This Instagram Ads Scraper?

- **Speed & Automation:** Pull hundreds of live Instagram creatives in minutes — no manual Ad Library browsing or screenshots.
- **Platform‑Filtered Results:** The Actor filters at the publisher‑platform layer so you only get Instagram ads, not Facebook Feed or Messenger noise.
- **Scale & Reliability:** No hard cap on `maxResults`; automatic pagination and typed error objects keep large runs predictable.
- **Three Flexible Entry Points:** Keyword, Page ID, or Ad Library URL — whichever matches your existing research workflow.
- **Developer Integrations:** Apify REST API, webhooks, scheduler, JavaScript + Python SDKs — stream into BI, CRM, Notion, or Slack.
- **No Meta Developer Account:** Skip the Ad Library API approval process and token lifecycle — start scraping in seconds.

### ❓ FAQ

**Q: Is it legal to scrape the Meta Ad Library?**
The Meta Ad Library is publicly accessible and designed for transparency. You are responsible for complying with [Meta's Terms of Service](https://www.facebook.com/terms.php), local data laws, and responsible use of personal or advertiser data.

**Q: Does this include Facebook ads too?**
No — this Actor is tuned for **Instagram publisher placements**. Use the companion **Meta / Facebook Ad Library Scraper** if you need Facebook Feed, Stories, or cross‑platform ads.

**Q: Why does my run return an empty Dataset?**
Try broader keywords, switch to `country=ALL` in a custom `url`, or check that the brand actually runs ads on Instagram via the Meta Ad Library UI.

**Q: Does it support proxies?**
Yes. The Actor can be configured with Apify Proxy for stable high‑volume runs.

**Q: What output formats are supported?**
Dataset exports to CSV, JSON, Excel, XML, and HTML. The `OUTPUT` key‑value store holds a full JSON summary plus the ad array.

**Q: How do I scale to thousands of ads?**
Raise `maxResults` and combine multiple runs with the scheduler. Large brands can easily yield thousands of creatives across regions.

**Q: Will I get video and image URLs?**
Yes, when Meta exposes them — `ad_content.mediaUrls` returns direct links to the creative assets shown in the Ad Library preview.

**Q: Can I get impressions and spend?**
Yes, as **ranges** (lower/upper bounds), mirroring what Meta discloses publicly. Exact numbers are not shared by Meta.

### 📣 Start Scraping Instagram Ads Today

**[Run the Instagram Ads Scraper on Apify now →](https://apify.com/scrapeio/instagram-scraper-premium)** and turn any brand or keyword into a live feed of Instagram ad creatives, copy, and performance metadata.

***

### 🔗 Related Scrapers by ScrapeIO

Build cross‑platform ad‑intelligence pipelines with these companion Apify Actors:

- **[Facebook Ad Library Scraper](https://apify.com/scrapeio/meta-facebook-ad-scrapper-using-ad-library-url-premium)** — full Meta ads by keyword, Page ID, or URL.
- **[WhatsApp Ads Scraper](https://apify.com/scrapeio/whatsapp-scraper-premium)** — Click‑to‑WhatsApp ad intelligence.
- **[Facebook Ad Library Brand Finder](https://apify.com/scrapeio/facebook-ad-library-suggestions)** — resolve brand names to verified Page IDs.
- **[Google Maps Scraper](https://apify.com/scrapeio/google-maps-scraper-advance)** — local businesses, reviews, and contacts.
- **[Amazon Multi‑Marketplace Scraper](https://apify.com/scrapeio/amazon-multi-marketplace-scraper-most-advanced)** — ASINs, prices, and rankings across 23 regions.
- **[Google News Scraper](https://apify.com/scrapeio/google-news-scraper)** — headlines, sources, and publisher links by keyword.
- **[YouTube Video Downloader](https://apify.com/scrapeio/youtube-downloader)** — download videos or audio to cloud storage.

***

Built by **[ScrapeIO](https://apify.com/scrapeio)** on Apify.

### FAQ

**How do I scrape Instagram ads without cookies?**
Run scrapeio/instagram-scraper-premium with a keyword or Page ID. Pin it in Cursor MCP as your default Instagram ads Actor.

**Can I run this Actor with Apify AI?**
Yes. In [Apify Console](https://console.apify.com), type a long request in Store search or the dashboard **Ask Apify AI** widget. Apify AI matches this README, fills the input schema, asks you to confirm, then returns the dataset. This Actor uses **limited permissions** (not full-account access) and is not a rental Actor, so it is eligible for Apify AI.

**Does this work from Cursor, Claude, or ChatGPT?**
Yes. Connect the [Apify MCP server](https://mcp.apify.com). Agents call `search-actors`, `fetch-actor-details`, and `call-actor`. Ranking uses the same signals as Store search and Actor quality score: a clear README plus documented input and output schemas.

Powered by **[AdScrape](https://www.adscrape.in/)**.

# Actor input Schema

## `keyword` (type: `string`):

Search term or brand (e.g. nike, adidas). Use this OR pageId OR url — only one needed.

## `pageId` (type: `string`):

Numeric Facebook/Meta Page ID (brand ID). Use this OR keyword OR url.

## `url` (type: `string`):

Full Meta Ad Library URL with search parameters. Use this OR keyword OR pageId.

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

How many Instagram ads to collect. Paginates until this count or no more results. No upper limit. All rows are Instagram platform (publisher_platforms filter).

## Actor input object example

```json
{
  "keyword": "nike",
  "maxResults": 50
}
```

# Actor output Schema

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

One JSON object per Instagram ad. Filtered to publisher_platforms=instagram.

## `runInput` (type: `string`):

Keyword, pageId, url, and maxResults used for this run.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeio/instagram-scraper-premium").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapeio/instagram-scraper-premium").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 '{}' |
apify call scrapeio/instagram-scraper-premium --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeio/instagram-scraper-premium"
        }
    }
}
```

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/SlMO2TlZAI9heF6BN/builds/iI3OcZx5e75Kpxp3i/openapi.json
