Instagram Ad Library Scraper — Ads by Keyword or Page avatar

Instagram Ad Library Scraper — Ads by Keyword or Page

Pricing

from $8.00 / 1,000 results

Go to Apify Store
Instagram Ad Library Scraper — Ads by Keyword or Page

Instagram Ad Library Scraper — Ads by Keyword or Page

Instagram Ad Library scraper for Meta Ad Library. Extract Instagram-only ads by keyword, brand name, Page ID, or URL. Get creatives, CTAs, spend and impression estimates. No cookies. Apify AI, MCP, and Cursor ready.

Pricing

from $8.00 / 1,000 results

Rating

0.0

(0)

Developer

Scrapeify

Scrapeify

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 days ago

Last modified

Share

Instagram Ad Library scraper for Meta Ad Library. Pull Instagram-only ad creatives with a hard publisher_platforms[0]=instagram filter — no manual post-filtering. Search by keyword, brand name, Facebook Page ID, or Ad Library URL. Get structured JSON with ad body, images, videos, CTAs, spend/impression estimates, timing, distribution, and status. No cookies or Meta API key required.

Built for creative strategy, competitive intelligence, and brand tracking that needs Instagram ads without cross-platform noise.


Features

CapabilityDetail
Instagram-only filterpublisher_platforms[0]=instagram enforced at URL build time for keyword and Page ID paths
Three seed modeskeyword (unordered search), pageId (numeric page lookup), or full url passthrough
Mutually exclusive inputsValidation ensures exactly one seed type is active per run
Scrape timeout guard300-second watchdog with cancellation semantics
Input coercionmaxResults accepts positive integers; string-digit coercion supported
Nested ad schemametadata, ad_content, timing, performance, distribution, status, additional_info
Run summaryAggregated impressions/spend proxies, unique platforms, duration, page count in OUTPUT
URL validationpageId numeric check; url hostname validation against facebook.com/ads/library and meta.com/ads/library
Dataset + KV exportsOne Dataset row per ad; OUTPUT key in default KV store for dashboards

Use Cases

Creative Intelligence & Ad Strategy

Pull all Instagram ad creatives for a brand or product category. Analyze creative formats (carousel, single image, video), CTA patterns, offer types, and messaging angles from competitors running paid Instagram campaigns.

E-Commerce & DTC Brand Research

Track direct-to-consumer brands' Instagram creative cadence, seasonal promotions, and offer testing patterns. Identify which product-led carousel formats and urgency CTAs dominate high-spend verticals.

Influencer-Style Funnel Analysis

Study how brands structure Instagram funnels — from awareness creatives to retargeting ads — by comparing creative content across start dates and impression ranges.

Competitive Intelligence

Monitor competitor spending patterns on Instagram. Identify brands with surging ad archive IDs, track creative refreshes, and benchmark your category's share of voice on the platform.

AI Creative Analysis

Feed structured ad body and title fields into LLM classifiers to cluster themes, detect prohibited claims, categorize offer types (discount, urgency, social proof), and generate creative briefs informed by what performs in the market.

Monitoring & Alerting

Schedule periodic runs on tracked Page IDs. Alert on spikes in new archive IDs indicating campaign launches, or drops indicating budget pauses.

Store creative text with timestamps in vector databases. Enable temporal queries like "what messaging did Brand X use during Q4 promotions?" using embedding-based retrieval.

Market Research

Pass custom browser-address URLs with geographic parameters to study regional creative variations. Compare Instagram creative strategies across markets using the url input mode.


Why Choose This Actor

  • Intent-specific — purpose-built for Instagram inventory; eliminates post-filter logic from your codebase
  • Consistent schema — identical nested structure as other Scrapeify Ad Library actors (Meta, WhatsApp) for unified warehousing
  • Production guardrails — input validation before expensive pagination prevents wasted runs
  • Operational transparencypagesScraped, executionTimeSeconds, and platform universe in every OUTPUT

Quick Start

  1. Open the Scrapeify Instagram Ad Scraper on Apify Console.
  2. Choose your seed: enter a keyword (e.g. skincare serum), a numeric pageId, or paste a full url from your browser's Ad Library address bar.
  3. Set maxResults — start with 50–200 for validation runs.
  4. After completion: read OUTPUT.summary for aggregates, then export the Dataset as JSONL.

Tip: To find a brand's numeric Page ID, use the Scrapeify Brand Finder actor first.


Input Schema

{
"keyword": "skincare serum",
"maxResults": 200
}
FieldTypeRequiredDescription
keywordstringOne-ofFree-text search term. Instagram filter applied automatically.
pageIdstringOne-ofNumeric Facebook/Meta Page ID (not a vanity URL).
urlstringOne-ofFull Ad Library URL from your browser. Must contain facebook.com/ads/library or meta.com/ads/library.
maxResultsintegerYesNumber of Instagram ads to collect. Must be positive.

Exactly one of keyword, pageId, or url should be provided per run.


Output Schema

Dataset Row (one row per Instagram ad)

{
"metadata": {
"scraped_at": "2026-05-07T04:00:00.000Z",
"ad_archive_id": "123456789012345",
"page_id": "9876543210",
"page_name": "GlowLab Skincare",
"page_like_count": 84500,
"page_profile_uri": "https://www.facebook.com/glowlab",
"page_categories": ["Beauty", "Cosmetics"]
},
"ad_content": {
"body": "Vitamin C serum — 48-hour flash sale. Shop now for 30% off.",
"title": "Brighter skin, guaranteed.",
"link_url": "https://glowlab.com/vitamin-c",
"cta_text": "Shop Now",
"images": ["https://scontent.cdninstagram.com/v/t51.29350-15/..."],
"videos": [],
"cards": []
},
"timing": {
"start_date": "2026-04-28",
"end_date": null,
"total_active_time": null
},
"performance": {
"impressions": 1200000,
"spend": 21000,
"currency": "USD"
},
"distribution": {
"publisher_platform": ["INSTAGRAM"],
"targeted_or_reached_countries": ["US", "CA", "GB"]
},
"status": {
"is_active": true,
"is_aaa_eligible": false,
"contains_sensitive_content": false
},
"additional_info": {
"categories": [],
"collation_count": 1
}
}

Run Summary (OUTPUT key in default KV store)

{
"summary": {
"totalAds": 200,
"searchType": "keyword_unordered",
"identifier": "skincare serum",
"searchUrl": "https://www.facebook.com/ads/library/?publisher_platforms[0]=instagram&country=ALL&q=skincare%20serum&search_type=keyword_unordered",
"keyword": "skincare serum",
"pageId": null,
"url": null,
"urlParams": {
"publisher_platforms": ["instagram"],
"country": "ALL"
},
"totalSpend": 85000.25,
"totalImpressions": 4500000,
"uniquePlatforms": ["INSTAGRAM"],
"scrapedAt": "2026-05-07T04:00:00.000Z",
"pagesScraped": 22,
"executionTimeSeconds": 58.7,
"status": "SUCCESS",
"error": null
},
"data": {
"ads": ["...array of full ad objects..."],
"schema": {
"metadata": ["scraped_at", "ad_archive_id", "page_id", "page_name", "page_like_count", "page_profile_uri", "page_categories"],
"ad_content": ["body", "title", "link_url", "cta_text", "cards", "images", "videos"],
"timing": ["start_date", "end_date", "total_active_time"],
"performance": ["spend", "currency", "impressions", "reach_estimate"],
"distribution": ["publisher_platform", "targeted_or_reached_countries"],
"status": ["is_active", "is_aaa_eligible", "contains_sensitive_content"],
"additional_info": ["categories", "archive_types", "collation_count"]
}
}
}
FieldTypeDescription
summary.totalAdsintegerTotal Instagram ads collected
summary.searchUrlstringConstructed Ad Library URL with Instagram platform filter
summary.uniquePlatformsarrayShould be ["INSTAGRAM"] when filter applied correctly
summary.pagesScrapedintegerAPI pagination pages fetched
summary.executionTimeSecondsnumberTotal scrape duration
summary.statusstringSUCCESS, ERROR, NO_RESULTS, or TIMEOUT
summary.errorobject/nullTyped error: type, message, details, suggestion
data.schemaobjectField group documentation for downstream codegen

API Examples

cURL

curl "https://api.apify.com/v2/acts/scrapeify~instagram-scraper-premium/runs?token=$APIFY_TOKEN" \
-X POST \
-H "Content-Type: application/json" \
-d '{
"keyword": "luxury watches",
"maxResults": 150
}'

Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
# Search by keyword
run = client.actor("scrapeify/instagram-ad-library-scraper").call(
run_input={"keyword": "luxury watches", "maxResults": 150}
)
# Or search by Page ID
run = client.actor("scrapeify/instagram-ad-library-scraper").call(
run_input={"pageId": "15087023444", "maxResults": 400}
)
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
print(ad["ad_content"]["body"], ad["performance"]["impressions"])

JavaScript / Node.js

import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
// Search by pasted URL (e.g. with country/date filters from browser)
const run = await client.actor("scrapeify/instagram-ad-library-scraper").call({
url: "https://www.facebook.com/ads/library/?country=US&publisher_platforms[0]=instagram&q=fitness+app",
maxResults: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Collected ${items.length} Instagram ads`);

Integration Examples

ChatGPT / Custom GPT

Expose the run endpoint as a Custom GPT action. Return structured ad JSON so the model can summarize creative themes, identify top CTAs, or compare brands' Instagram messaging strategies.

Claude Tool Use

Register an instagram_ads_search tool. Pass structured ad rows — body, title, images, performance — into long-context prompts for thematic analysis, compliance checking, or brief generation.

Gemini

Feed large batches of ad body + title pairs into Gemini's long-context window for category classification, sentiment analysis, or creative benchmarking.

LangChain

from langchain.tools import tool
@tool
def search_instagram_ads(keyword: str, max_results: int = 100) -> list:
"""Retrieve Instagram ad creatives from Meta Ad Library by keyword."""
run = client.actor("scrapeify/instagram-ad-library-scraper").call(
run_input={"keyword": keyword, "maxResults": max_results}
)
return client.dataset(run["defaultDatasetId"]).list_items().items

CrewAI

Assign a CreativeResearchAgent that calls this tool. A downstream StrategyAgent can then generate ad briefs informed by competitive Instagram creative data without manual browsing.

AutoGen

Multi-agent workflow: UserProxyAgent triggers an Instagram ads lookup; AssistantAgent analyzes creative patterns and recommends campaign angles.

n8n / Make.com / Zapier

HTTP node → Apify run → poll completion → iterate Dataset items → push to Notion, Airtable, or a Slack digest with top creative previews.

RAG Systems

Chunk ad_content.body with parent metadata (page_name, start_date, impressions). Store in Pinecone, Weaviate, or Qdrant. Retrieve relevant Instagram ad examples for brief generation or compliance checks.

Vector Databases

Embed body + title as semantic vectors. Filter on distribution.publisher_platform = INSTAGRAM and status.is_active = true for live creative analysis.


Frequently Asked Questions

1. Will Facebook or other placements appear in results? The Instagram filter targets Instagram inventory. Validate publisher_platform arrays occasionally — some ad objects may reflect cross-platform eligible creatives.

2. How is this different from the Meta Ad Library Scraper? Same underlying engine; this actor enforces an Instagram platform constraint at URL construction. The Meta scraper covers all Meta platforms (Facebook, Instagram, Messenger, etc.) without a default platform filter.

3. How do I find a brand's numeric Page ID? Use the Scrapeify Brand Finder actor — enter the brand name and get deduplicated Page ID candidates.

4. Can I filter by country or date range? Yes — paste a browser-address Ad Library URL with your geo and date parameters as the url input. Country filtering is encoded in the URL.

5. What is NO_RESULTS status? The Ad Library returned no matching ads for the given filter combination. Not a credential failure. Try broadening keyword, country scope, or removing active-status filters.

6. How do I handle TIMEOUT errors? Reduce maxResults and rerun. Very deep pagination (thousands of ads) may hit the 300-second scrape watchdog.

7. Are impression and spend figures accurate? These are Meta's publicly disclosed transparency estimates — not audited financial figures. Treat as directional signals.

8. What do cards and extra_links contain? Carousel slides and additional link objects within multi-asset ad units. Inspect nested arrays in full Dataset payloads.

9. Can I download ad media (images, videos)? Media URLs are provided. Fetching and storing them is your responsibility — subject to CDN terms and IP rules.

10. How do I deduplicate results across runs? Hash or key on metadata.ad_archive_id — the stable unique identifier for each ad in the Meta Ad Library.

11. Are archived (inactive) ads included? Depends on the URL filter. Pass active_status=all in a custom URL to include both active and archived creatives.

12. Is there regional availability variation? Some countries restrict Ad Library visibility for certain categories. Trial URL parameters for your target geography.

13. Do carousel ads appear as one row or multiple? One Dataset row per ad. Carousel cards are nested in ad_content.cards[].

14. Can I run this for multiple brands simultaneously? Yes — launch parallel Apify actor instances per pageId. Stagger to avoid request hotspots.

15. What encoding are text fields in? UTF-8. Creatives pass through unchanged — multilingual ad copy is preserved as-is.

16. How large can maxResults be? No hard cap in the validator, but large values increase pagination time and timeout risk. Test with 200–500 first.

17. Is ig_username available in results? Instagram-specific handle is not guaranteed in every row. Enrich externally using page_alias or page_profile_uri.

18. Why does executionTimeSeconds vary significantly? Run time depends on maxResults, Meta server response latency, and pagination depth. Monitor pagesScraped for tuning.

19. Can I use this for regulated category research (finance, health)? Coverage may be partial for policy-constrained categories. Meta withholds some ad payloads in regulated verticals.

20. How should I handle currency mixing in spend aggregates? performance.currency is included per ad. Do not sum spend across heterogeneous currencies without FX normalization.

21. What proxy setup is recommended? Use Apify RESIDENTIAL proxy groups if corporate IP egress yields sparse or blocked pages.

22. Is there a webhook for run completion? Yes — Apify triggers webhooks on RUN.SUCCEEDED. Point your endpoint to pull the Dataset automatically.

23. What does is_aaa_eligible mean? Indicates eligibility for Meta's "About This Ad" advertiser transparency. Not directly actionable for most use cases.

24. Can I combine with the WhatsApp scraper output? Yes — all Scrapeify Ad Library actors share the same nested schema. Join on metadata.page_id for cross-platform creative comparisons.

25. Are creative rights transferable from the output? No. Media URLs and ad content are subject to Meta's and creators' intellectual property rights. This actor provides data visibility, not usage rights.


Best Practices

  • Freeze representative URLs in version control when audits must reproduce exact results
  • Key on ad_archive_id for idempotent warehousing — prevents duplicate rows across overlapping runs
  • Use residential proxies if corporate egress yields sparse pagination pages
  • Pilot with small counts — validate filters and schema alignment before scaling to thousands
  • Archive searchUrl from OUTPUT.summary with each analytical snapshot for reproducibility
  • Monitor executionTimeSeconds — creeping runtimes suggest maxResults is too high for one run; shard horizontally

Performance & Scalability

FactorGuidance
ThroughputPagination-bound; heavy maxResults increases step count linearly
Timeout riskRuns over several thousand ads may hit 300s guard — shard by keyword or date range
Horizontal scalingRun parallel actors per brand shard or geographic segment
MonitoringTrack executionTimeSeconds trend across scheduled runs for anomaly detection

AI & Automation Workflows

Creative clustering: Feed body + title pairs into an embedding model → cluster by cosine similarity → label themes (discount, social proof, urgency, education) without manual tagging.

CTA analysis: Extract cta_text across all collected ads → frequency rank → identify dominant action verbs in your vertical.

Compliance screening: Pass ad copy through a policy-rule LLM classifier → flag potential prohibited claims → queue for human review.

Trend monitoring: Schedule weekly runs → diff new ad_archive_id values → alert on brand campaign launches.


Error Handling

ScenarioBehavior
Multiple seeds providedValidation error before any network requests
Non-numeric pageIdValidation error with descriptive message
Invalid url hostnameValidation error — must contain Ad Library domain
TIMEOUTSummary status TIMEOUT; reduce maxResults
NO_RESULTSSummary status NO_RESULTS; not a failure — Ad Library returned empty for filter
SCRAPING_ERRORTyped error object with details and suggestion fields

Trust & Reliability

Scrapeify publishes platform-specific Ad Library wrappers so engineering teams don't silently fork URL-parameter logic or miss filter drift. Each run exposes explicit operational metrics — pagesScraped, executionTimeSeconds, uniquePlatforms — for SLA monitoring and pipeline health dashboards.


Explore the full Scrapeify suite — chain these actors together for end-to-end automation pipelines:

ActorWhat it does
Amazon ScraperASINs, prices, sponsored flags across 23 marketplaces
Meta Ad Library ScraperFacebook & Instagram ads with sort options
WhatsApp Ad ScraperClick-to-WhatsApp ad creatives
YouTube Video DownloaderVideos & audio to Apify Key-Value Store
Meta Brand & Page ID FinderResolve brand names to numeric Page IDs
Google Maps ScraperLocal business leads, reviews, emails, contacts
Google News ScraperHeadlines, sources, article URLs (up to 2K)

Instagram is a trademark of Meta Platforms, Inc. This actor is not affiliated with or endorsed by Meta.


Built by Scrapeify on Apify.

Powered by AdScrape.