Iframe Detector avatar

Iframe Detector

Pricing

Pay per event

Go to Apify Store
Iframe Detector

Iframe Detector

This actor detects embedded iframes on web pages and categorizes them by type: video (YouTube, Vimeo), ads (DoubleClick, Google Ads), maps (Google Maps), social media, and analytics. Reports sandbox and title attributes, identifies accessibility issues, and lists unique iframe domains.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Detect embedded iframes on web pages including ads, videos, maps, and widgets.

What does Iframe Detector do?

This actor detects embedded iframes on web pages and categorizes them by type: video (YouTube, Vimeo), ads (DoubleClick, Google Ads), maps (Google Maps), social media, and analytics. It reports sandbox and title attributes, identifies accessibility issues, and lists unique iframe domains.

The actor loads each page in a browser, finds all iframe elements in the DOM, classifies each by its source domain, and returns structured data about the number and type of embeds found on each page.

Use cases

  • Ad audit -- detect advertising iframes on pages to verify ad placement and identify unauthorized ad injections
  • Performance analysis -- find heavy iframes that slow down page load, especially third-party ad and widget embeds
  • Security review -- check iframe sandbox attributes to ensure embedded content is properly restricted
  • Content inventory -- catalog all embedded third-party content across a website for documentation or migration planning
  • Accessibility auditing -- identify iframes missing title attributes, which screen readers need to describe embedded content

Why use Iframe Detector?

  • Automatic categorization -- iframes are classified as video, ad, map, social media, or analytics without manual inspection
  • Structured output -- get clean JSON with iframe counts by type, individual iframe details, and unique domain lists
  • Batch processing -- scan hundreds of URLs in a single run to audit iframe usage across entire websites
  • Security metadata -- reports sandbox attributes and security-relevant iframe properties for each embed
  • API access -- integrate iframe detection into content management or ad-ops workflows
  • Pay-per-event pricing -- only pay per URL scanned with no monthly fees

Input parameters

ParameterTypeRequiredDefaultDescription
urlsarrayYes--List of URLs to scan for iframes. Each URL is loaded in a browser and all iframe elements are extracted.

Example input

{
"urls": [
"https://www.google.com",
"https://www.wikipedia.org",
"https://example.com"
]
}

Output fields

Each URL produces one record with the following fields:

FieldDescription
urlThe original URL provided in the input
iframeCountTotal number of iframes found on the page
videoIframesCount of video embed iframes (YouTube, Vimeo, etc.)
adIframesCount of advertising iframes (DoubleClick, Google Ads, etc.)
mapIframesCount of map embed iframes (Google Maps, etc.)
iframesArray of individual iframe objects with src, type, sandbox, and title
uniqueDomainsArray of unique domains found across all iframes
issuesArray of accessibility or security issues (e.g., missing title attribute)
errorError message if the scan failed, null otherwise
checkedAtISO 8601 timestamp of the scan

Output example

{
"url": "https://www.wikipedia.org",
"iframeCount": 0,
"videoIframes": 0,
"adIframes": 0,
"mapIframes": 0,
"iframes": [],
"uniqueDomains": [],
"issues": [],
"error": null,
"checkedAt": "2026-03-01T12:00:00.000Z"
}

How much does it cost?

Iframe Detector uses Apify's pay-per-event pricing. You only pay for what you use.

EventPriceDescription
Start$0.035One-time per run
URL scanned$0.001Per URL scanned

Cost examples:

  • 10 URLs: $0.035 + 10 x $0.001 = $0.045
  • 100 URLs: $0.035 + 100 x $0.001 = $0.135
  • 1,000 URLs: $0.035 + 1,000 x $0.001 = $1.035

Using the Apify API

You can start Iframe Detector programmatically using the Apify API. Replace YOUR_TOKEN with your Apify API token.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/iframe-detector').call({
urls: ['https://www.wikipedia.org', 'https://www.google.com'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/iframe-detector').call(run_input={
'urls': ['https://www.wikipedia.org', 'https://www.google.com'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Connect Iframe Detector with other tools using Apify integrations. Export results to Google Sheets for content inventories, send Slack alerts when unexpected iframes appear on monitored pages, trigger Make or Zapier workflows for ad-ops reporting, push data to n8n for custom analytics pipelines, or configure webhooks for real-time monitoring.

Tips and best practices

  • Check the uniqueDomains list to quickly see all third-party services embedded on a page without parsing individual iframe entries.
  • Monitor the adIframes count over time to detect unauthorized ad injections or verify that ad placements match your configuration.
  • Review the issues array for iframes missing sandbox or title attributes, which are common security and accessibility gaps.
  • Combine with Mixed Content Checker to ensure embedded iframes are loaded over HTTPS on secure pages.
  • Use for migration planning by cataloging all third-party embeds before a site redesign to ensure nothing is lost.

FAQ

What iframe categories does the actor detect? The actor classifies iframes as video (YouTube, Vimeo), ads (DoubleClick, Google Ads), maps (Google Maps), social media, or analytics based on the source domain. Unrecognized domains are reported as uncategorized.

Does the actor detect dynamically loaded iframes? Yes. The actor uses a real browser to load pages, so iframes injected by JavaScript after page load are also detected.

What does the sandbox attribute check mean? The sandbox attribute restricts what embedded content can do (e.g., prevent scripts, form submission, popups). The actor reports whether sandbox is set and what restrictions are applied, which is important for security reviews.

Can I detect iframes on pages that require JavaScript to render? Yes. The actor uses a full browser environment to load pages, so iframes rendered by JavaScript frameworks or loaded dynamically via AJAX are detected alongside static HTML iframes.

What happens if a page has no iframes? The actor still produces a valid output record with iframeCount: 0 and empty arrays for iframes and uniqueDomains. This confirms the page was successfully scanned and contains no embedded iframe content.