Website Asset & Script Extractor avatar

Website Asset & Script Extractor

Pricing

from $1.00 / 1,000 page scanneds

Go to Apify Store
Website Asset & Script Extractor

Website Asset & Script Extractor

Extract all CSS stylesheets and JavaScript files loaded on a webpage for technical SEO audits and performance optimization.

Pricing

from $1.00 / 1,000 page scanneds

Rating

0.0

(0)

Developer

Andok

Andok

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 hours ago

Last modified

Categories

Share

Web Page Asset Extractor

Extract all scripts, stylesheets, and external resources from any web page to understand exactly what gets loaded. Performance engineers use this to spot bloat, security teams use it to flag risky third-party includes, and archivists use it to inventory render-critical resources. Scan hundreds of pages in bulk with full cross-origin detection.

Features

  • Script extraction — finds every external <script src="..."> and resolves it to an absolute URL
  • Stylesheet extraction — captures all <link rel="stylesheet"> references with full URL resolution
  • Cross-origin detection — flags each asset as same-origin or cross-origin so you can spot third-party dependencies instantly
  • Deduplication — automatically removes duplicate asset URLs within each page result
  • Bulk processing — scan hundreds of URLs in a single run with configurable concurrency
  • Error resilience — failed URLs still produce a result row with the error message, so no data goes missing
  • Pay-per-event billing — you only pay for each page scanned, with automatic charge-limit enforcement

Input

FieldTypeRequiredDefaultDescription
urlsarrayYesList of page URLs to scan for external assets. Each page is fetched and parsed for scripts and stylesheets.
urlstringNoSingle URL to scan (for backwards compatibility). Use urls for bulk processing.
timeoutSecondsintegerNo15Maximum seconds to wait for each page response before timing out.
concurrencyintegerNo10Number of pages to process in parallel. Increase for large batches, decrease if you hit rate limits.

Input Example

{
"urls": [
"https://crawlee.dev",
"https://apify.com"
]
}

Output

Each URL produces one dataset item listing all external scripts and stylesheets found on the page.

  • inputUrl (string) — the URL you submitted
  • finalUrl (string) — the URL after redirects
  • status (number) — HTTP status code
  • cssCount (number) — number of external stylesheets found
  • jsCount (number) — number of external scripts found
  • stylesheets (array) — list of stylesheet objects with url and crossOrigin fields
  • scripts (array) — list of script objects with url and crossOrigin fields
  • error (string | null) — error message if the URL could not be fetched
  • checkedAt (string) — ISO 8601 timestamp of when the scan was performed

Output Example

{
"inputUrl": "https://crawlee.dev",
"finalUrl": "https://crawlee.dev/",
"status": 200,
"cssCount": 2,
"jsCount": 5,
"stylesheets": [
{ "url": "https://crawlee.dev/assets/css/styles.css", "crossOrigin": false }
],
"scripts": [
{ "url": "https://crawlee.dev/assets/js/main.js", "crossOrigin": false },
{ "url": "https://www.googletagmanager.com/gtag/js?id=G-XXXXX", "crossOrigin": true }
],
"error": null,
"checkedAt": "2025-01-15T10:30:00.000Z"
}

Pricing

EventCost
Page ScannedPay-per-event (see actor pricing page)

The actor stops automatically when the per-run charge limit is reached, so you never overspend.

Use Cases

  • Performance auditing — count external scripts and stylesheets to identify page-weight bloat
  • Security review — flag cross-origin third-party scripts that could introduce supply-chain risk
  • Web archiving — inventory every resource needed to fully render a page offline
  • Compliance checks — detect unauthorized tracking scripts or ad-tech includes across your site
  • Competitor analysis — see which CDNs, analytics tools, and widget vendors a competitor relies on
ActorWhat it adds
Website Tech Stack AnalyzerIdentifies the CMS, frameworks, and analytics behind each page — goes beyond raw asset URLs to named technologies
Favicon & Brand Icon ExtractorExtracts favicons and touch icons — complements asset extraction with brand imagery
Security Headers AnalyzerAudits HTTP security headers — pair with asset extraction for a full frontend security review