# Outbound Link Checker - External Links, Status & rel Flags (`eliai/outbound-link-auditor`) Actor

Checks every external link on a page URL live, up to 50 pages and 1,000 links each: status, final URL, nofollow, sponsored and ugc flags, unsafe target=\_blank and non-HTTPS links. Returns each link plus broken-link counts and page issues. For content managers, SEO specialists and security reviewers.

- **URL**: https://apify.com/eliai/outbound-link-auditor.md
- **Developed by:** [Broke to Built](https://apify.com/eliai) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 audited pages

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

## Outbound Link Auditor — Every External Link, Checked Live

Audit every external link on a page in one run: where it points, its rel attributes (nofollow/sponsored/ugc), whether `target="_blank"` is missing `noopener` (the tabnabbing hole), non-HTTPS destinations, and — live-probed — whether each link still works. Up to 50 pages per run, up to 1,000 links per page, online, by API, or as an agent tool via Apify MCP.

Outbound links rot silently: partners die, domains get resold to spam, http:// destinations linger for years, and every `_blank` without `noopener` hands the destination page control of your tab. This audit finds all of it with evidence per link.

### What you get

- **links** — each external link: `href`, `domain`, anchor text, `rel` + parsed `relFlags`, `target`, `unsafeBlank`, `https`, live `status` (HEAD with GET fallback) + `finalUrl` after redirects
- **Aggregates** — `externalCount`, `followedCount` vs `nofollowCount`, `unsafeBlankCount`, `nonHttpsCount`, `brokenCount`
- **issues** — plain-English page-level findings ready for a report
- `checkStatus: false` skips probing for a fast structure-only pass
- **Fail-soft**: an unreachable page or HTTP error never fails the run — `{ok: false, error}`, **never charged**.

### Input

```json
{ "url": "https://yoursite.com/resources", "checkStatus": true, "maxLinks": 100 }
```

Bulk: `{ "urls": ["...", "..."], "maxUrls": 50 }`

### Output (real run, trimmed)

```json
{
  "url": "https://en.wikipedia.org/wiki/Web_crawler",
  "ok": true,
  "externalCount": 93,
  "audited": 15,
  "followedCount": 4,
  "nofollowCount": 11,
  "unsafeBlankCount": 0,
  "nonHttpsCount": 2,
  "brokenCount": 1,
  "links": [
    {
      "href": "https://www.example-partner.com/page",
      "domain": "example-partner.com",
      "anchor": "Partner resource",
      "rel": "nofollow",
      "relFlags": { "nofollow": true, "sponsored": false, "noopener": false },
      "unsafeBlank": false,
      "https": true,
      "status": 200
    }
  ],
  "issues": ["2 outbound link(s) use non-HTTPS (http://) destinations.", "1 broken outbound link(s) (HTTP >= 400 or unreachable)."]
}
```

### Example

A real run on 2026-10-31 with the input this page's form is prefilled with:

```json
{
  "url": "https://github.com",
  "urls": [
    "https://github.com"
  ]
}
```

It finished in 6 seconds and returned 1 result. It was charged for 1 `page-scanned` event ($0.005 on the Free plan). The first result (long text and lists cut for display):

```json
{
  "url": "https://github.com",
  "ok": true,
  "finalUrl": "https://github.com/",
  "externalCount": 26,
  "audited": 26,
  "followedCount": 26,
  "nofollowCount": 0,
  "unsafeBlankCount": 0,
  "nonHttpsCount": 0,
  "brokenCount": 0,
  "links": [
    {
      "href": "https://docs.github.com/en",
      "domain": "docs.github.com",
      "anchor": "Documentation",
      "rel": "noreferrer",
      "relFlags": {
        "nofollow": false,
        "sponsored": false,
        "ugc": false,
        "noopener": false,
        "noreferrer": true
      },
      "target": "_blank",
      "unsafeBlank": false,
      "https": true,
      "status": 200
    },
    {
      "href": "https://learn.github.com/skills",
      "domain": "learn.github.com",
      "anchor": "Training",
      "rel": "noreferrer",
      "relFlags": {
        "nofollow": false,
        "sponsored": false,
        "ugc": false,
        "noopener": false,
        "noreferrer": true
      },
      "target": "_blank",
      "unsafeBlank": false,
      "https": true,
      "status": 200
    },
    {
      "href": "https://learn.github.com/credentials",
      "domain": "learn.github.com",
      "anchor": "Certifications",
      "rel": "noreferrer",
      "relFlags": {
        "nofollow": false,
        "sponsored": false,
        "ugc": false,
        "noopener": false,
        "noreferrer": true
      },
      "target": "_blank",
      "unsafeBlank": false,
      "https": true,
      "status": 200
    },
    "… 23 more"
  ],
  "issues": []
}
```

### Pricing

**$0.005 per page audited** — including live status probes for up to `maxLinks` links (that is up to 100+ HTTP checks per charge). Unreachable pages are never charged.

Measured against store incumbents (2026-08-07): smart-digital/complete-seo-audit-tool charges $0.04 per page analyzed (489 users), skootle $0.01 start + $0.003 per item. A 50-page link audit here costs $0.25 vs $2 there.

### Honest limits

- External = different registrable hostname than the page (www. normalized). Subdomains of the same site count as internal.
- Status probes use HEAD with GET fallback and follow redirects; a few servers answer bots differently than browsers — `status: null` with `statusError` reports exactly what happened rather than guessing.
- Static HTML parsing — links injected by client-side JavaScript are not seen.
- Probing is sequential and bounded by `maxLinks` (default 100, max 1,000); very link-heavy pages report the truncation honestly in `issues`.

### FAQ

**What is the unsafe \_blank issue?**
`target="_blank"` without `rel="noopener"` lets the destination page script your originating tab (`window.opener`) — a real phishing vector. `unsafeBlank: true` flags each offender; modern browsers mitigate it, old ones don't.

**Can I use this for link-building hygiene?**
Yes — `followedCount` vs `nofollowCount` shows exactly how much equity the page passes, per link, with the rel evidence.

**How do I keep runs fast on huge pages?**
Set `checkStatus: false` for structure-only audits (instant), or cap `maxLinks` — counts still report the full totals.

**Does it check internal links too?**
No — this is the outbound half. Our broken-link-checker sibling covers internal crawling.

**Why did some rows come back `ok: false`?**
The page itself was unreachable or returned an HTTP error — nothing was audited. Recorded, never charged.

### Use from code or AI agents

```bash
curl -s "https://api.apify.com/v2/acts/EliAI~outbound-link-auditor/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -X POST -H 'Content-Type: application/json' \
  -d '{"url": "https://yoursite.com/blog/resource-roundup"}'
```

Agents: connect [Apify MCP](https://mcp.apify.com) and call the `EliAI/outbound-link-auditor` tool.

- **Capability:** audit external links of one or many pages — rel flags, unsafe \_blank, HTTPS, live status per link
- **Required input:** `url` (string) or `urls` (array); optional `checkStatus`, `maxLinks`
- **Returns:** one record per page; `links` + `issues` carry the findings
- **Bounded:** 50 pages, 1,000 links each; failures isolate per page
- **Side effects:** none beyond HEAD/GET probes of the page's own listed links

### Changelog

- 2026-11-01: Page text only: an Example section from a real run. Code, output and price are unchanged.

### For AI agents

This Actor is built to be called by software, not just by people.

- **Mount it directly as an MCP tool** — no Store search, no ranking, just this one tool:
  `https://mcp.apify.com/?actors=eliai/outbound-link-auditor`
- **Or call it over HTTP** and get the results in the same request:
  `POST https://api.apify.com/v2/acts/eliai~outbound-link-auditor/run-sync-get-dataset-items`
- **Costs are predictable before you call.** Pricing is pay-per-event (see Pricing above), so an agent can budget a run in advance instead of discovering the bill afterwards.
- **Send only the field you mean.** If you pass the bulk field, it is used on its own; the single-value field is a fallback, never merged into your request. You are charged for the items you sent and nothing else.

### Who uses it

- Content managers finding outbound links on old posts that now return 404s
- SEO specialists checking affiliate and sponsored links carry the right rel attributes
- Security reviewers flagging `target="_blank"` links missing `noopener`
- Publishers finding external links still pointing at http:// destinations
- Agencies auditing a client's resource pages for links to domains resold to spam

# Actor input Schema

## `url` (type: `string`):

A single page URL to audit for outbound external links. If it has no scheme, https:// is assumed.

## `urls` (type: `array`):

Multiple page URLs to audit in one run. When you set this, it is used on its own and the single-value field above is ignored, so you are only charged for the items you sent.

## `checkStatus` (type: `boolean`):

If enabled, each outbound link is probed (HEAD/GET) to record its HTTP status and flag broken links. Slower but more useful.

## `maxLinks` (type: `integer`):

Cap on how many external links to audit per page (1-1000).

## `maxUrls` (type: `integer`):

Cap on how many pages to process in one run (1-50).

## Actor input object example

```json
{
  "url": "https://github.com",
  "urls": [
    "https://github.com"
  ],
  "checkStatus": true,
  "maxLinks": 100,
  "maxUrls": 25
}
```

# Actor output Schema

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

Every item this run produced. Export as JSON, CSV or Excel from the dataset view.

# 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 = {
    "url": "https://github.com",
    "urls": [
        "https://github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("eliai/outbound-link-auditor").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 = {
    "url": "https://github.com",
    "urls": ["https://github.com"],
}

# Run the Actor and wait for it to finish
run = client.actor("eliai/outbound-link-auditor").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 '{
  "url": "https://github.com",
  "urls": [
    "https://github.com"
  ]
}' |
apify call eliai/outbound-link-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eliai/outbound-link-auditor"
        }
    }
}
```

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/rV3YzLbbTgv8H8g7i/builds/feylSuWjtY5Xq41Oc/openapi.json
