# SRI Integrity Checker - Script Link Security Data (`benthepythondev/sri-integrity-checker`) Actor

Extract Subresource Integrity attributes from script and stylesheet tags and audit integrity, crossorigin, source URL and asset type.

- **URL**: https://apify.com/benthepythondev/sri-integrity-checker.md
- **Developed by:** [ben](https://apify.com/benthepythondev) (community)
- **Categories:** SEO tools, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🔎 SRI Integrity Checker - Script Link Security Data

Extract Subresource Integrity attributes from script and stylesheet tags and audit integrity, crossorigin, source URL and asset type. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### What is the SRI Integrity Checker?

The SRI Integrity Checker turns public website security and HTTP metadata into structured data. These details are useful for SEO audits, security reviews, compliance checks, migration QA, agency reporting, and lead enrichment, but they are easy to miss when reviewing websites manually. This actor lets you paste URLs and receive normalized rows in an Apify dataset.

The actor is intentionally focused. It does one job well, returns clean fields, keeps the original raw values for auditability, and avoids browser automation. That makes it fast, cheap to run, and suitable for scheduled checks.

#### What data does it extract?

- Input URL and final source URL
- HTTP status code where applicable
- File or asset metadata specific to this check
- Normalized security fields
- Raw values for manual verification
- Stable `source` field for downstream workflows

### Input

| Field | Type | Description |
| --- | --- | --- |
| `targets` | array | URLs to check. |
| `maxResults` | integer | Maximum rows to return per target. |

#### Example input

```json
{
  "targets": [
    "https://getbootstrap.com/"
  ],
  "maxResults": 25
}
````

### Output

```json
{"tag": "script", "asset_url": "https://cdn.example.com/app.js", "integrity": "sha384-...", "crossorigin": "anonymous", "has_integrity": true}
```

### Use cases

- Technical SEO audits: add security and HTTP metadata to client reports.
- Compliance checks: document cookie or asset-security behavior from public pages.
- Website migrations: compare metadata before and after a launch.
- Lead enrichment: qualify websites by implementation quality.
- Monitoring: schedule checks and detect changed headers or security attributes.
- Developer QA: verify important public pages without opening browser devtools.

### Practical workflow

Start with a short list of important URLs: homepages, landing pages, signup pages, checkout pages, documentation pages, or campaign destinations. Run the actor once to create a baseline, then schedule recurring runs if you need monitoring. Export the dataset to CSV/Excel, or connect it to Make, Zapier, n8n, Airtable, Google Sheets, BigQuery, Slack, or a webhook.

For agencies, this actor can be used as a lightweight technical audit step before a deeper crawl. For operators, it is useful as a regression check after deployments. For sales and lead-gen teams, it gives a quick signal about technical maturity without requiring an account or API key.

### When to use it

Use this actor when you need focused evidence instead of a broad crawl. A general crawler may tell you that a page loads, but this actor captures the specific implementation detail that matters for its use case. That makes it easier to build small, repeatable checks for a domain portfolio, a client audit, a compliance checklist, or a sales-enrichment pipeline.

It also pairs well with other actors. Run a sitemap or URL extractor first, filter the URLs that matter, then pass those URLs into this actor. You can combine the output with HTTP headers, SSL certificate data, status checks, meta tags, or contact extraction to build a fuller picture of a website without paying for a heavy browser crawl.

### Data quality notes

Website metadata can vary by region, user agent, redirects, CDN behavior, and consent tooling. The actor reports what Apify's cloud environment sees during the run. It keeps raw values alongside normalized fields so you can verify edge cases without rerunning the request.

The default target is deliberately small and stable so Apify's daily health checks produce a non-empty dataset. For production, replace it with your own URLs. If a target fails, the actor logs the failure and continues with the next URL.

For recurring audits, keep the same URL list and compare new datasets with previous runs. Changed cookies, missing integrity attributes, new third-party assets, or altered security settings can all be useful signals after a deployment, CDN change, tag-manager change, or marketing campaign launch. The dataset is intentionally simple so it can be diffed in a spreadsheet or joined with other website-audit actors.

For client reporting, the raw values are useful evidence. You can show exactly which header or tag was present at crawl time, then add your own interpretation outside the actor. This keeps the actor neutral and reusable across SEO, security, compliance, analytics, and lead-enrichment workflows.

### Reliability and performance

This actor uses direct HTTP requests. It does not launch a browser, use residential proxies, or depend on paid unblockers. That keeps it inexpensive and predictable. It is best for public pages and headers that are available without login.

### FAQ

**Does it require an account?** No. It checks public URLs.

**Can I check many URLs?** Yes. Add multiple targets to the input list.

**Can I schedule it?** Yes. Use Apify schedules for recurring checks.

**Can I export to Excel?** Yes. Apify datasets export to JSON, CSV, Excel, XML, and RSS.

**Can I connect it to automations?** Yes. Use Apify API, webhooks, Make, Zapier, n8n, or dataset integrations.

**What happens when a URL fails?** The actor logs the failure and continues with the remaining targets.

**Is it legal?** The actor reads public response metadata. You are responsible for respecting website terms, rate limits, privacy rules, and applicable laws.

**How is billing calculated?** Pay-per-event billing charges per result pushed to the dataset.

**Why keep raw values?** Raw values make the output auditable and preserve details that a downstream parser might not yet normalize.

### You might also like

- HTTP Headers Checker
- SSL Certificate Checker
- Website Status Checker
- Meta Tags Extractor
- Robots Sitemap Analyzer

**Keywords:** SRI checker, subresource integrity scraper, script integrity audit, stylesheet integrity checker, website security metadata, website security audit, HTTP metadata scraper, technical SEO, website QA, Apify actor, lead enrichment, monitoring, automation

# Actor input Schema

## `targets` (type: `array`):

URLs to check.

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

Maximum rows to return per target.

## Actor input object example

```json
{
  "targets": [
    "https://getbootstrap.com/"
  ],
  "maxResults": 10
}
```

# 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 = {
    "targets": [
        "https://getbootstrap.com/"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/sri-integrity-checker").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 = {
    "targets": ["https://getbootstrap.com/"],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/sri-integrity-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targets": [
    "https://getbootstrap.com/"
  ],
  "maxResults": 10
}' |
apify call benthepythondev/sri-integrity-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/sri-integrity-checker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SRI Integrity Checker - Script Link Security Data",
        "description": "Extract Subresource Integrity attributes from script and stylesheet tags and audit integrity, crossorigin, source URL and asset type.",
        "version": "1.0",
        "x-build-id": "gHwBbXCoD1GoU2FZS"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~sri-integrity-checker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-sri-integrity-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~sri-integrity-checker/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-sri-integrity-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~sri-integrity-checker/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-sri-integrity-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "targets": {
                        "title": "Targets",
                        "type": "array",
                        "description": "URLs to check.",
                        "default": [
                            "https://getbootstrap.com/"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results per target",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum rows to return per target.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
