# Instagram Ads Library Scraper | from $0.50/1K Ads, No Login (`alexmorain/instagram-ads-library-scraper`) Actor

Paste an Instagram @handle or profile URL and get every ad that account runs on Instagram from the Meta Ad Library: text, images, videos, cards, link, dates, plus Instagram username, followers and verified badge. Keywords and Ad Library URLs too. Plain HTTP, no login.

- **URL**: https://apify.com/alexmorain/instagram-ads-library-scraper.md
- **Developed by:** [Alexis Morain](https://apify.com/alexmorain) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 94.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 instagram ads

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/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

### What does Instagram Ads Library Scraper do?

This Actor reads the [Meta Ad Library](https://www.facebook.com/ads/library/) and returns the ads that run on Instagram as structured data. Give it an **Instagram username** (`@nike`, `nike` or `https://www.instagram.com/nike/`) and it returns the Instagram ads of that account: ad text, headline, images, videos, carousel cards, landing page, call to action, start and end dates, the platforms each ad runs on, and the account's Instagram handle, follower count and verified badge.

The part that saves time is the lookup. Other Ad Library scrapers ask for a Facebook page ID, which you have to find yourself. This one takes the @handle you already know. It finds the Facebook page that Meta links to that exact Instagram username, then reads that page's ads. If the handle is not linked to any page, the account ends as "not found" and costs nothing. It never falls back to the closest name.

It runs over plain HTTP. No browser, no Instagram or Facebook login, no cookies, no Meta developer token. Pricing is pay per event: **$1.00 per 1,000 Instagram ads on the Free plan**, down to $0.50 per 1,000 on Gold, plus $0.002 per run. A first run capped at 100 ads costs about ten cents.

If you were looking for an **Instagram ad library API**, this is the closest working option for commercial ads. Meta's official Ad Library API returns only ads about social issues, elections or politics, plus ads delivered in the European Union and the United Kingdom, and it needs a Meta developer account with an identity check. This Actor reads the public Ad Library website the way a visitor does, in every country, and hands you JSON, CSV or Excel.

### Why use an Instagram ads scraper built on the Meta Ad Library?

Instagram has no ad archive of its own. Every ad that runs on Instagram is published in the Meta Ad Library, next to the Facebook ones, with the Instagram platform listed. This Actor asks Meta for the Instagram filter and returns what comes back.

- **See competitor Instagram ads.** What a brand runs right now, since when, with which offer and which landing page.
- **Instagram ads by username.** Type the handle, not a page ID. One line per account, as many accounts as you want in a run.
- **Creative research.** Build a swipe file of Instagram ad texts, images and videos for a market, sorted by how many days each ad has been running. An ad that has run for 90 days is usually one that works.
- **Agency pitches and reporting.** Export a prospect's Instagram ads in a few clicks before a meeting.
- **Influencer and brand-account context.** Every ad carries the advertiser's `igUsername`, `igFollowers` and `igVerified`, so you can sort a market by audience size.
- **Alerts.** Schedule the Actor daily in New ads only mode and get a webhook when a competitor launches a new Instagram ad.
- **Political and issue ad research.** Filter by the political and issue category to get spend and impressions ranges, which Meta publishes for those ads only.

On the Apify platform you also get scheduling, the API, integrations (Google Sheets, Slack, Airtable, Zapier, Make), run monitoring and proxy rotation without setting any of it up.

### How complete is the data? Instagram Ad Library results compared with the Ad Library page

The Ad Library page shows a result count when you filter by platform, country and status. That count is an estimate that Meta rounds. We read each advertiser to the end with the same filters and compared.

Instagram filter, active ads, measured on 1 November 2026. "Ad Library shows" is the result count the Ad Library page displays with the same filters. "Returned" is the number of ads this Actor returned reading to the end.

| Advertiser | Countries | Ad Library shows | Returned |
|---|---|---|---|
| Gymshark | all | 5,251 | 5,179 |
| Nike | all | 2,497 | 2,349 |
| Sephora | all | 1,282 | 1,269 |
| Kylie Cosmetics | all | 266 | 266 |
| Decathlon France | all | 191 | 189 |
| Gymshark | France | 371 | 371 |
| Kylie Cosmetics | France | 23 | 23 |
| Decathlon France | France | 107 | 105 |

Over all these reads, **0 returned ads lacked Instagram among their platforms**: the filter is applied by Meta, and the results match it. There is no cap on pages. The Gymshark read went through 522 pages. The displayed count is an estimate, so a gap of a few ads in either direction is expected. The largest gap in the table is Nike, 6% under the displayed figure, on a count that moves while the read runs.

### What can you scrape? Ways to search Instagram ads

The inputs can be combined in one run.

#### Scrape Instagram ads by username

Fill **Instagram accounts** with one account per line: `@nike`, `nike` or `https://www.instagram.com/nike/`.

For each account, the Actor types the handle in the Ad Library's search box and reads the suggestions. Each suggestion is a Facebook page and carries the Instagram username Meta links to it. The Actor keeps the page whose linked username equals your handle. Measured example: for `adidas`, the search box lists adidas Originals and adidas Football before adidas. Matching on the username picks the right page, where "take the first result" would pick the wrong one.

We tested 12 handles, and all 12 resolved to the right page: nike, adidas, zara, sephora, gymshark, netflix, redbull, decathlon, chanelofficial, kyliecosmetics, cristiano and natgeo.

The same field also accepts a Facebook page URL (`https://www.facebook.com/nike`) or a page ID, as a fallback when an Instagram account is not linked to a page that the search box finds. A brand name with spaces (`Red Bull`) is looked up like the Ad Library search box does it.

#### Search Instagram ads by keyword

**Search terms** work like the Ad Library search box: every Instagram ad whose text matches, from any advertiser. Use it to follow a market or a product (`protein powder`), not one brand. A brand name as a keyword also returns resellers and fan pages, so follow a brand with Instagram accounts instead. Tick **Exact phrase** to match the words in order.

Each result still carries the advertiser's Instagram handle, followers and verified badge. They are looked up once per advertiser, so keyword results cost nothing extra for it.

#### Replay an Ad Library URL

If you built a search on facebook.com/ads/library with filters that this input does not expose, paste the URL in **Ad Library URLs**. The filters in the URL (country, status, media type, platforms, languages, dates) are kept for that URL. A URL without a platform filter gets the Platforms option of the input, Instagram by default. A single ad URL (`?id=...`) returns that one ad. An advertiser URL (`?view_all_page_id=...`) returns that page's ads.

#### Filters

On top of any search you get these Ad Library filters, applied by Meta itself: countries, active, inactive or all ads, ad category (political and issue ads), media type, languages, shown-from and shown-until dates, and the platforms. Platforms defaults to Instagram only. You can widen it to Facebook, Messenger or Threads, or clear it for every platform.

### How to scrape Instagram ads

#### From the Apify console

1. Open the Actor and type an Instagram account in **Instagram accounts**, for example `@nike`.
2. Pick a country if you want the ads shown there only. Leave it empty for all countries.
3. Choose active ads, inactive ads or both.
4. Set **Max ads per search**, or 0 for everything.
5. Press Start, then download the results as JSON, CSV, Excel or HTML, or read them through the API.

To follow a market instead of a brand, use Search terms. To reproduce a search you built on the Ad Library website, paste its URL in Ad Library URLs.

#### From the API

```bash
curl -X POST "https://api.apify.com/v2/acts/alexmorain~instagram-ads-library-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"instagramAccounts": ["@nike"], "maxAdsPerSearch": 100}'
```

The full Python, JavaScript and cURL examples are further down, in "Instagram Ads Library API: use it from your code".

### Which fields should I fill?

| You want | Fill | Notes |
|---|---|---|
| All the Instagram ads of one account | `instagramAccounts` | `@nike`, `nike` or the profile URL. |
| The ads of a page that has no linked Instagram handle found | `instagramAccounts` | Paste the Facebook page URL or the page ID. |
| Instagram ads for a market or a product | `searchTerms` | Add `exactPhrase` for a fixed phrase. |
| The ads of a page you already found on the website | `adLibraryUrls` | Filters in the URL are kept. |
| Only running ads, or only stopped ones | `activeStatus` | `active` (default), `inactive`, `all`. |
| Instagram and Facebook together | `platforms` | `instagram` is the default. Add `facebook`, `messenger`, `threads`, or clear the list. |
| Ads shown in a period | `shownFrom`, `shownUntil` | Meta's rule: see the date note below. |
| Political and issue ads with spend ranges | `adType` = `political_and_issue_ads` | Spend and impressions only exist for these. |
| A daily competitor alert | `mode` = `new-only` and `webhookUrl` | See the monitoring section. |

### Input examples

One account, active ads, in France:

```json
{
    "instagramAccounts": ["@gymshark"],
    "countries": ["FR"],
    "activeStatus": "active",
    "maxAdsPerSearch": 500
}
```

A market, videos only, English ads in the United States:

```json
{
    "searchTerms": ["protein powder"],
    "countries": ["US"],
    "mediaType": "video",
    "languages": ["en"],
    "maxAdsPerSearch": 300
}
```

A daily competitor watch:

```json
{
    "instagramAccounts": ["@decathlon", "@intersport", "@gosport"],
    "countries": ["FR"],
    "mode": "new-only",
    "maxAdsPerSearch": 0,
    "webhookUrl": "https://hooks.slack.com/services/..."
}
```

### Details that need a word

- **Big brands run ads from several pages** (one per country, one per product line). The handle resolves to the page Meta links to that username. For other pages of the same brand, paste their URLs or IDs.
- **Shown from and Shown until** follow Meta's rule: an ad is kept if it was shown at some point in the window, even if it started before. To filter by launch date, filter on `startDate` in the results.
- **Max ads per search** applies to each account, each search term and each URL. 0 means no cap. The default is 200.
- **Platforms.** The filter is applied by Meta, so the count matches what the Ad Library shows with the same filter. Each ad still lists all its platforms in `publisherPlatforms`, and `isInstagramOnly` is true for ads shown on Instagram alone.

### What data can it extract? Every output field

One item per ad. Fields Meta does not publish for an ad are `null`.

#### Instagram account of the advertiser

| Field | Type | Description |
|---|---|---|
| `igUsername` | string | Instagram username of the advertiser, as Meta links it to the Facebook page. `null` when the page has no linked Instagram account |
| `igFollowers` | integer | Followers of that account, as the Ad Library reports it on the day of the run |
| `igVerified` | boolean | Whether that account carries the verified badge |
| `isInstagramOnly` | boolean | The ad runs on Instagram and on no other Meta platform |

These four fields are filled for account, keyword and URL results alike.

#### Advertiser page

| Field | Type | Description |
|---|---|---|
| `pageId` | string | Facebook page ID of the advertiser |
| `pageName` | string | Advertiser page name |
| `pageUrl` | string | Advertiser Facebook page |
| `pageLikeCount` | integer | Likes of the advertiser page |
| `pageCategories` | array | Categories of the advertiser page, for example `Sporting Goods` |
| `pageProfilePictureUrl` | string | Advertiser profile picture (Meta CDN, signed URL that expires) |

#### Ad identity and timing

| Field | Type | Description |
|---|---|---|
| `adArchiveId` | string | Ad Library ID of the ad |
| `adLibraryUrl` | string | Public page of the ad in the Meta Ad Library |
| `isActive` | boolean | Running now or stopped |
| `startDate` | string | Day the ad started running, UTC |
| `endDate` | string | Last day the ad ran. For an active ad, the latest day Meta reports |
| `daysRunning` | integer | Days between start and end, both counted |
| `publisherPlatforms` | array | `FACEBOOK`, `INSTAGRAM`, `MESSENGER`, `THREADS`, `AUDIENCE_NETWORK` |
| `categories` | array | Meta ad categories (`POLITICAL`, `ISSUE`...), empty for ordinary ads |
| `containsAiMedia` | boolean | Meta flags the ad as containing digitally created or altered media |

#### Creative

| Field | Type | Description |
|---|---|---|
| `displayFormat` | string | `IMAGE`, `VIDEO`, `CAROUSEL`, `DCO` (dynamic creative), `DPA` (catalog), `EVENT`... |
| `body` | string | Ad text. For catalog and dynamic ads whose text is a template (`{{product.name}}`), the text of the first card |
| `title` | string | Headline |
| `linkDescription` | string | Link description under the headline |
| `caption` | string | Displayed link domain |
| `linkUrl` | string | Landing page URL |
| `ctaText` | string | Call to action button text |
| `ctaType` | string | Call to action type, for example `SHOP_NOW` |
| `imageUrls` | array | Image URLs of the ad and its cards (Meta CDN, signed URLs that expire) |
| `videos` | array | Videos: `hdUrl`, `sdUrl`, `previewImageUrl` |
| `cards` | array | Carousel or dynamic creative cards: `title`, `body`, `linkUrl`, `linkDescription`, `ctaText`, `imageUrl`, `videoUrl` |

#### Version groups

| Field | Type | Description |
|---|---|---|
| `collationId` | string | ID of the group of near-identical ads the ad belongs to, as Meta reports it |
| `collationCount` | integer | Number of ads in that group, as Meta reports it |

A `collationCount` above 1 tells you the advertiser is testing variants of one creative. Use it as a signal, not as a count of rows in your dataset.

#### Political and issue ads only

| Field | Type | Description |
|---|---|---|
| `spend` | object | Spend range (min, max) |
| `impressions` | object | Impressions range (min, max) |
| `currency` | string | Currency of the spend range |
| `reachEstimate` | object | Reach estimate when Meta publishes it |

#### Provenance

| Field | Type | Description |
|---|---|---|
| `input` | string | The account, search term or URL from your input that found this ad |
| `inputType` | string | `instagram` (an @handle or instagram.com URL), `advertiser` (a Facebook page URL, page ID or name), `searchTerm` or `url` (an Ad Library URL) |
| `countries` | array | Country filter of the search that found the ad |
| `scrapedAt` | string | When the ad was read, UTC |

### Example output

Two items, shortened:

```json
[
    {
        "adArchiveId": "1600894127669355",
        "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1600894127669355",
        "pageName": "Example Sports",
        "pageId": "122695097770591",
        "pageLikeCount": 1075878,
        "igUsername": "examplesports",
        "igFollowers": 482100,
        "igVerified": true,
        "isActive": true,
        "startDate": "2026-09-14",
        "endDate": "2026-10-16",
        "daysRunning": 33,
        "publisherPlatforms": ["FACEBOOK", "INSTAGRAM"],
        "isInstagramOnly": false,
        "displayFormat": "CAROUSEL",
        "body": "Ready for the next run? New trail shoes are in.",
        "linkUrl": "https://www.example.com/trail-shoes",
        "ctaText": "Shop now",
        "ctaType": "SHOP_NOW",
        "collationId": "1403288121396887",
        "collationCount": 3,
        "input": "@examplesports",
        "inputType": "instagram"
    },
    {
        "adArchiveId": "2379460792481796",
        "adLibraryUrl": "https://www.facebook.com/ads/library/?id=2379460792481796",
        "pageName": "Example Sports",
        "igUsername": "examplesports",
        "igFollowers": 482100,
        "igVerified": true,
        "isActive": true,
        "startDate": "2026-09-20",
        "publisherPlatforms": ["INSTAGRAM"],
        "isInstagramOnly": true,
        "displayFormat": "VIDEO",
        "body": "Grip on every terrain",
        "videos": [
            {
                "hdUrl": "https://video.xx.fbcdn.net/v/example.mp4",
                "sdUrl": null,
                "previewImageUrl": "https://scontent.xx.fbcdn.net/v/example.jpg"
            }
        ],
        "input": "@examplesports",
        "inputType": "instagram"
    }
]
```

You can download the dataset in JSON, CSV, Excel, XML or HTML. The Output tab has two ready views: **Ads** (link, advertiser, Instagram handle, followers, verified badge, status, dates, format, text, headline, link, call to action, platforms, Instagram-only flag) and **Creatives** (images, videos and cards).

### Monitor competitor Instagram ads: New ads only mode

Set Mode to **New ads only** and schedule the Actor daily. It keeps a registry of every ad it returned and charged before, in a named key-value store in your account (`instagram-ads-library-registry`), and returns only ads it has never returned. Skipped ads are not charged.

Measured: the first run on an account returned 23 ads. The second run, a minute later, ended with "No new ads since the last run" and charged 0 ads.

Two things to know:

- Every run reads the whole search again, because the Ad Library does not sort by launch date: a new ad can sit on page 30. You pay only for the new ads, so a quiet day costs the start fee.
- By default the registry is tied to the exact targets, countries and filters, so changing any of them starts a fresh one. Set your own **Registry key** to keep one registry while you edit the list.

#### Webhook at the end of the run

Add a `webhookUrl` and the Actor POSTs a small JSON summary when the run ends, **only if at least one ad was returned**:

```json
{
    "actor": "instagram-ads-library-scraper",
    "runId": "<run id>",
    "mode": "new-only",
    "items": 12,
    "searches": 3
}
```

Slack and Discord incoming webhooks work as they are. The URL is stored encrypted and never written to the log. Use the final URL: a redirect is not followed, except 307 and 308, which get the same POST once. An unreachable webhook is logged as a warning and never fails the run.

### Instagram Ads Library API: use it from your code

Every run is an API call. Your token is in the Apify console under Settings, Integrations. All three examples use the same input: `{"instagramAccounts": ["@nike"], "maxAdsPerSearch": 100}`.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_TOKEN>")

run = client.actor("alexmorain/instagram-ads-library-scraper").call(run_input={
    "instagramAccounts": ["@nike"],
    "maxAdsPerSearch": 100,
})

for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["igUsername"], ad["igFollowers"], ad["displayFormat"], ad["startDate"], ad["adLibraryUrl"])
```

#### JavaScript

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

const client = new ApifyClient({ token: '<YOUR_TOKEN>' });

const run = await client.actor('alexmorain/instagram-ads-library-scraper').call({
    instagramAccounts: ['@nike'],
    maxAdsPerSearch: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const ad of items) console.log(ad.igUsername, ad.igFollowers, ad.body, ad.linkUrl);
```

#### cURL

Run and wait for the items in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/alexmorain~instagram-ads-library-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"instagramAccounts": ["@nike"], "maxAdsPerSearch": 100}'
```

For runs that take more than a few minutes, start the run and poll it instead, since the synchronous endpoint times out after 300 seconds:

```bash
curl -X POST "https://api.apify.com/v2/acts/alexmorain~instagram-ads-library-scraper/runs?token=<YOUR_TOKEN>&maxTotalChargeUsd=5" \
  -H "Content-Type: application/json" \
  -d '{"instagramAccounts": ["@nike"], "maxAdsPerSearch": 0}'
```

Then read `https://api.apify.com/v2/datasets/<defaultDatasetId>/items?format=csv` when the run has finished. `maxTotalChargeUsd` is a hard ceiling: the Actor stops cleanly when it is reached and you are never charged beyond it.

### What people use it for

#### Competitor Instagram ad analysis

List the Instagram accounts of the brands you compete with, set the country you sell in, and run once with active and inactive ads. Sort by `daysRunning`: the long-running ads are the ones the advertiser kept paying for. Group by `displayFormat` to see whether they bet on video, images or carousels, by `ctaText` to see the offer, by `linkUrl` to see which landing pages get the traffic.

#### Sizing a market by audience

Run a keyword such as `protein powder` and keep the distinct `igUsername` with their `igFollowers`. You get the list of accounts that advertise on Instagram in that market, ordered by audience, with the verified ones flagged.

### How much does it cost to scrape Instagram ads?

You pay per ad returned, plus a small start fee. Platform usage (compute, proxies) is included in that price. There is no monthly fee. The price per ad goes down with your Apify subscription plan, which is why the Store shows "from $0.50 / 1,000 ads".

| Event | When it fires | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|---|
| Instagram ad | Per ad pushed to the dataset | $0.001 | $0.0008 | $0.0006 | $0.0005 |
| Actor start | Once when the run starts, per GB of memory (the default is 512 MB, so $0.002) | $0.002 | $0.002 | $0.002 | $0.002 |

Per 1,000 ads, that is $1.00 on the Free plan, $0.80 on Bronze, $0.60 on Silver and $0.50 from Gold.

Worked examples at Free plan prices:

- A first test, 100 ads of one account: 100 x $0.001 + $0.002 = **$0.102**.
- The default run, 200 ads of one account: 200 x $0.001 + $0.002 = **$0.202**.
- 1,000 ads: 1,000 x $0.001 + $0.002 = **$1.002**.
- A daily watch of three competitors in New ads only mode, with 15 new ads on a given day: 15 x $0.001 + $0.002 = **$0.017** that day. A day with no new ad costs **$0.002**.

You can set a maximum charge per run in the run options. The Actor stops cleanly when it reaches it. Handles that are not found, and ads skipped by New ads only mode, are never charged.

#### How this compares to other options

Generic Meta Ad Library scrapers exist on the Apify Store at prices from $0.15 to $15 per 1,000 ads, on pay per result, per run or monthly rental models. Most need a Facebook page ID that you have to look up first, and most do not return the Instagram handle or the follower count of the advertiser. The official Meta Ad Library API is free, but it needs a Meta developer account with an identity check and returns only political and issue ads, plus ads delivered in the European Union and the United Kingdom.

Compare the cost of the volume you actually need, and what you have to do before the first run. Here the input is the @handle, the Instagram filter is applied by Meta, and the account data is in every row.

### Why this Instagram ads scraper

#### The @handle is the input

No page ID to find. The match is made on the Instagram username that Meta stores for each page, so `adidas` returns the adidas page and not adidas Originals or adidas Football, which the search box lists first. Twelve handles out of twelve resolved correctly in our test.

#### The filter is Meta's

Instagram is selected with the Ad Library's own platform filter. We do not read all ads and sort them afterwards. That is why the counts line up with the Ad Library page, and why no returned ad in our reads lacked Instagram.

### Limits and what this scraper does not do

- **Speed.** The Ad Library serves ads in pages and the Actor reads them one page after another for each search. A full read of Nike, 2,349 active Instagram ads in all countries, took 5 minutes 11 seconds on 1 November 2026 (about 7.5 ads per second). A small account is a matter of seconds. Gymshark, with more than 5,000 ads, takes about 12 minutes, well inside the default one-hour timeout. Several accounts in one run are read in parallel.
- **An Instagram account needs a linked Facebook page.** The Ad Library lists an Instagram account only when it is linked to a Facebook page. A handle without a link ends as "not found".
- **No placement.** Meta says the ad runs on "Instagram". It does not say whether that is Feed, Reels, Stories or Explore, and this Actor does not guess.
- **Spend and impressions** exist for political and issue ads only. For an ordinary ad, `spend` and `impressions` are `null`: Meta does not publish them.
- **Followers are a snapshot.** `igFollowers` is the figure the Ad Library reports on the day of the run. Run it again later to follow growth.
- **History.** The Ad Library keeps inactive ads for 1 year, political and issue ads for 7 years. Nothing older exists to be scraped.
- **No targeting, age, gender or payer data.** Meta publishes the audience details of an ad only for ads delivered in the European Union, and this Actor does not read them. The fields are absent from the output rather than empty.
- **Signed media links.** Image and video URLs come from Meta's CDN and expire after a few days. Download what you want to keep.
- **The date filter is a delivery filter.** An ad that started before the window and was still running inside it is returned. Filter on `startDate` yourself for a launch date.
- **Residential proxies.** Leave the proxy configuration on Residential. With the plain Apify proxy the Actor starts on datacenter IPs and switches to residential by itself when Meta keeps refusing, which costs a few seconds. If you supply your own proxy URLs, the Actor keeps exactly what you chose.
- **Scope.** The Actor reads the public Ad Library and nothing else. It does not touch Instagram profiles, posts, stories, comments, followers lists or anything behind a login.

### FAQ

#### Is there an Instagram ad library?

Instagram has no ad library of its own. The ads that run on Instagram are published in the Meta Ad Library at facebook.com/ads/library, with the Instagram platform listed on each ad. This Actor reads that library with the Instagram filter on and returns the ads as data.

#### Is there an Instagram Ads Library API?

Meta publishes the Ad Library API, but it returns only ads about social issues, elections or politics, plus ads delivered in the European Union and the United Kingdom. It also needs a Meta developer account with an identity check. For commercial ads in the rest of the world there is no official API. This Actor works as an alternative: it reads the public Ad Library website and returns JSON, in every country.

#### How do I see the Instagram ads of a competitor?

Put the competitor's Instagram username in Instagram accounts (`@competitor`), choose a country if you only care about one, and press Start. You get every active Instagram ad of that account with its text, creative, landing page and start date.

#### How do I find Instagram ads by username?

Type the username, with or without the @, or paste the profile URL. The Actor finds the Facebook page that Meta links to that exact username and returns that page's Instagram ads. You do not need the Facebook page ID.

#### Why was my Instagram account not found?

An Instagram account shows up in the Ad Library only when it is linked to a Facebook page, and the page has to appear in the Ad Library's search suggestions. If the handle has no match, paste the Facebook page URL or the page ID in the same field. A not-found handle costs nothing.

#### Can I see which placement an ad uses: Feed, Reels or Stories?

No. Meta lists the platform ("Instagram") and does not publish the placement. `publisherPlatforms` tells you which Meta platforms the ad runs on, and `isInstagramOnly` tells you whether Instagram is the only one.

#### How far back does the Ad Library go?

Inactive ads stay in the library for 1 year, political and issue ads for 7 years.

#### How many Instagram ads will I get compared with the Ad Library page?

About the same. On eight reads with the Instagram filter, the Actor returned between 94% and 100% of the count the page displayed, and 7 of the 8 were within 2%. The displayed count is an estimate. See the table near the top.

#### How much does it cost to scrape 1,000 Instagram ads?

$1.00 on the Free plan, $0.50 on Gold, plus $0.002 for the start. The first 100 ads cost about ten cents.

#### My run was refused. What do I change?

Keep the proxy on Residential and run again in a few minutes. If every search was refused even through residential IPs, the run ends as FAILED and says so. Nothing is charged beyond the start.

#### Can I run it every day and be told about new Instagram ads?

Yes. Use Mode New ads only on a daily schedule, with a Webhook URL. See the monitoring section.

#### Is it legal to scrape the Instagram ads in the Meta Ad Library?

Our Actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our Actors, when used for ethical purposes by Apify users, are safe. However, you should be aware that your results could contain personal data. Personal data is protected by the GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

### Support

Something wrong or missing? Open an issue on the [Issues tab](https://apify.com/alexmorain/instagram-ads-library-scraper/issues/open) and it gets fixed. A reproducible input gets a fix faster than a description. To call the Actor from your code, see the API tab, with endpoints and snippets prefilled.

Store page: [Instagram Ads Library Scraper](https://apify.com/alexmorain/instagram-ads-library-scraper).

Need the ads of every Meta platform, with Facebook, Messenger and Threads included? Use the sister Actor, the [Facebook Ads Library Scraper](https://apify.com/alexmorain/facebook-ads-library-scraper). More ad libraries from the same author: [LinkedIn Ad Library Scraper](https://apify.com/alexmorain/linkedin-ad-library-scraper) and [Google Ads Transparency Scraper](https://apify.com/alexmorain/google-ads-transparency-scraper).

### Guide and use cases

Use cases for outbound and automation, the output fields, pricing and common questions are on the [Instagram Ads Library Scraper page](https://alexis.morain.fr/en/scrapers/instagram-ads-library-scraper/) of my site. The [Ad libraries family page](https://alexis.morain.fr/en/scrapers/families/ad-library/) puts it side by side with the other scrapers of the same family.

# Actor input Schema

## `instagramAccounts` (type: `array`):

Accounts whose Instagram ads you want, one per line: <code>@nike</code>, <code>nike</code> or <code>https://www.instagram.com/nike/</code>. The Actor finds the Facebook page linked to that exact Instagram username, as Meta records it, never the closest name. An Instagram account shows up in the Ad Library only when it is linked to a Facebook page; if one is not found, paste that page's URL (<code>https://www.facebook.com/nike</code>) or page ID instead, both work here too. A brand name with spaces (<code>Red Bull</code>) is looked up like the Ad Library search box does.

## `searchTerms` (type: `array`):

Keyword searches, as in the Ad Library search box: every Instagram ad whose text matches, from any advertiser, each with that advertiser's Instagram handle and follower count. Use it for a market or a product (<code>protein powder</code>), not to follow one brand: a brand name as a keyword also returns resellers and fan pages.

## `exactPhrase` (type: `boolean`):

Search terms match the exact phrase instead of all the words in any order.

## `adLibraryUrls` (type: `array`):

Pages copied from facebook.com/ads/library: a search, an advertiser's ads (<code>?view_all_page_id=...</code>) or a single ad (<code>?id=...</code>). The filters in the URL (country, status, media type, platforms, languages, dates) are kept for that URL; a URL without a platform filter gets the Platforms below. One URL per line.

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

Only ads shown in these countries: two-letter codes like <code>US</code>, <code>GB</code>, <code>FR</code>, or names in English. Leave empty for all countries. Several countries are searched together and each ad comes out once.

## `activeStatus` (type: `string`):

Active ads are the ones running now. Inactive ads have stopped. The Ad Library keeps inactive ads for 1 year (7 years for political ads).

## `adType` (type: `string`):

<b>All ads</b>, or only ads about social issues, elections or politics, which come with spend and impression ranges.

## `mediaType` (type: `string`):

Only ads with this kind of creative.

## `platforms` (type: `array`):

Only ads shown on these Meta platforms. <b>Instagram</b> by default. Add Facebook, Messenger or Threads to widen it, or clear the list for every platform. The filter is applied by Meta, so the count matches what the Ad Library shows with the same filter. Each ad still lists all its platforms in <code>publisherPlatforms</code>, and <code>isInstagramOnly</code> flags the ads shown on Instagram alone.

## `languages` (type: `array`):

Only ads in these languages: two-letter codes like <code>en</code>, <code>fr</code>, <code>de</code>. Leave empty for all.

## `shownFrom` (type: `string`):

Only ads <b>shown</b> on or after this date. Careful: Meta keeps an ad that started earlier and was still running on this date. It is not a launch date filter: read <code>startDate</code> in the results for that.

## `shownUntil` (type: `string`):

Only ads shown on or before this date.

## `maxAdsPerSearch` (type: `integer`):

Stop each account, search term or URL after this many ads. Set <code>0</code> for no cap.

## `mode` (type: `string`):

<b>All ads</b> returns every ad the search finds, on every run.<br><br><b>New ads only</b> keeps a persistent registry of the ads previous runs returned and charged, and returns only ads never returned before: schedule it daily to be told when a competitor launches a new Instagram ad. Every run reads the whole search, since the Ad Library does not sort by launch date; you pay only for the new ads.

## `registryKey` (type: `string`):

By default the registry is tied to the exact targets, countries and filters, so changing any of them starts a fresh one. Set your own key to keep one registry while you edit the list.

## `webhookUrl` (type: `string`):

If set, the Actor POSTs a small JSON summary to this URL at the end of the run, <b>only when at least one ad was returned</b>: <code>actor</code>, <code>runId</code>, <code>mode</code>, <code>items</code>, <code>searches</code>. With New ads only and a daily schedule, that is a push notification when a competitor launches ads.<br><br>Use the final URL: a redirect is not followed, except a 307 or 308, which gets the same POST once. An unreachable webhook is logged as a warning and never fails the run. Stored encrypted, since a webhook URL often carries its own access token.

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

Leave as is. Meta refuses datacenter IPs and a good share of residential ones, so the Actor tries fresh residential IPs until one is accepted, then keeps it. The per-ad price is the same whatever you choose.<br><br>With the plain Apify proxy (<code>{"useApifyProxy": true}</code>, typical in API calls) it starts on datacenter IPs and <b>switches to residential by itself</b> when Meta keeps refusing. If you pick your own proxy URLs, the Actor keeps exactly what you chose.

## Actor input object example

```json
{
  "instagramAccounts": [
    "@nike"
  ],
  "exactPhrase": false,
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "platforms": [
    "instagram"
  ],
  "maxAdsPerSearch": 20,
  "mode": "all",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All ads in the default dataset.

# 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 = {
    "instagramAccounts": [
        "@nike"
    ],
    "platforms": [
        "instagram"
    ],
    "maxAdsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alexmorain/instagram-ads-library-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 = {
    "instagramAccounts": ["@nike"],
    "platforms": ["instagram"],
    "maxAdsPerSearch": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("alexmorain/instagram-ads-library-scraper").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 '{
  "instagramAccounts": [
    "@nike"
  ],
  "platforms": [
    "instagram"
  ],
  "maxAdsPerSearch": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call alexmorain/instagram-ads-library-scraper --silent --output-dataset

```

## MCP server setup

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

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/sTtjnNu0nddUUrm0r/builds/zPd4FnniRcFAHXPjH/openapi.json
