# Website Link Graph & Outbound Links Crawler (`logiover/website-link-graph-crawler`) Actor

Crawl an entire website and export every internal and outbound link as a graph edge — source page, target URL, anchor text, rel and nofollow/sponsored/UGC flags. Built for SEO internal-linking audits, outbound-link analysis and site-structure mapping. No login, no browser.

- **URL**: https://apify.com/logiover/website-link-graph-crawler.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Website Link Graph & Outbound Links Crawler — Link Extractor 🕸️

**Extract every link from a website and map its link graph.** This **link extractor** crawls an entire site and exports **every internal and outbound link as a graph edge** — the **source page**, the **target URL**, the **anchor text**, the **link type** (internal / subdomain / external) and the **rel flags** (`nofollow`, `sponsored`, `ugc`). Map a whole site's internal linking and outbound links from a single start URL. **No login, no headless browser.**

> Need to **extract all links from a website**, run an **internal linking SEO audit**, analyze **outbound / external links**, or check **nofollow** attributes at scale? This actor builds the complete link graph.

---

### ✨ Key features

- 🕷️ **Full-site crawl** — start from one URL and follow internal links across the whole domain.
- 🔗 **Every link as an edge** — `source → target` with anchor text, for internal *and* external links.
- 🏷️ **Rel & attribute parsing** — `nofollow`, `sponsored`, `ugc` flags and `target="_blank"`.
- 🎯 **Scope control** — export all links, only internal, or only outbound/external links.
- ⚡ **Faster & higher-volume than a link checker** — it maps the graph without HTTP status checks, so it's ideal for big sites.

### 💡 Use cases

- **Internal-linking SEO audits** — see which pages link where and with what anchor text to optimize link equity.
- **Outbound / external link analysis** — list every external site you link to and which links are nofollow.
- **Site-structure mapping** — build a link graph for visualization, analysis or crawl-budget optimization.
- **Link cleanup & compliance** — find sponsored/UGC links that should carry the right `rel` attributes.
- **Anchor-text analysis** — audit the anchor text distribution across an entire site.

### 📦 What you get

One row per link (edge):

| Field | Description |
|-------|-------------|
| `sourceUrl` | The page the link is on |
| `targetUrl` | The link target (absolute URL) |
| `targetDomain` | Hostname of the target |
| `anchorText` | The clickable text |
| `linkType` | `internal`, `subdomain` or `external` |
| `rel` | Raw `rel` attribute |
| `isNofollow` / `isUgc` / `isSponsored` | Parsed `rel` flags |
| `opensNewTab` | `true` if `target="_blank"` |
| `crawledAt` | ISO 8601 timestamp |

#### Example output

```json
{
  "sourceUrl": "https://example.com/blog/seo-guide",
  "targetUrl": "https://partner.com/tool",
  "targetDomain": "partner.com",
  "anchorText": "our favorite SEO tool",
  "linkType": "external",
  "rel": "nofollow sponsored",
  "isNofollow": true,
  "isSponsored": true,
  "isUgc": false,
  "opensNewTab": true,
  "crawledAt": "2026-05-25T14:17:17.531Z"
}
````

### 🚀 How to use it

1. Click **Try for free / Start**.
2. Paste one or more website URLs into **Start URLs**.
3. (Optional) Set **Max pages to crawl** — `0` for the whole site.
4. (Optional) Choose **Which links to export**: all / internal / external.
5. Click **Save & Start**.
6. Export the link graph as **JSON, CSV, Excel or via API**.

### ⚙️ Input

| Option | Description | Default |
|--------|-------------|---------|
| `startUrls` | Websites to crawl | – (required) |
| `maxPagesToCrawl` | Max pages per run (`0` = whole site) | `1000` |
| `linkScope` | `all`, `internal` or `external` | `all` |
| `maxConcurrency` | Parallel requests | `10` |

#### Example input

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "maxPagesToCrawl": 5000,
  "linkScope": "all"
}
```

### 🔍 How it works

The crawler follows internal links within the same domain as your Start URLs, and on each page records every `<a href>` as an edge with its anchor text and `rel` attributes. URLs are resolved to absolute and de-duplicated per page. Use `linkScope` to keep only internal or only outbound links. Pure HTTP — fast and cheap.

### 🧰 Tips & best practices

- Use `linkScope: "external"` for a pure outbound-link/backlink-target report.
- Use `linkScope: "internal"` to analyze internal link distribution and orphan-page risk.
- Pivot on `targetDomain` to see which external domains you link to most.
- Set `maxPagesToCrawl` to `0` for complete coverage of large sites.

### ❓ FAQ

**What's the difference vs the Broken Link Checker?** This actor maps the link **graph** (anchors, rel, internal/external) **without** checking HTTP status, so it's faster and produces higher volume. Use the **Broken Link Checker** when you specifically need to find dead links and status codes.

**Does it detect nofollow / sponsored / ugc?** Yes — the `rel` attribute is parsed into boolean flags.

**Does it render JavaScript?** No — it parses server-rendered HTML for speed and low cost.

**How do I crawl the whole site?** Set `maxPagesToCrawl` to `0`.

**What formats can I export?** JSON, CSV, Excel, HTML and a full REST API.

### 🔗 Related actors by the same author

- **Broken Link Checker** — crawl a site and find dead links with HTTP status codes.
- **Website SEO Audit Crawler** — full on-page SEO audit for every page.
- **Sitemap to URL Crawler** — extract all URLs from any sitemap.xml.
- **Website to Markdown & Text Crawler** — clean text + Markdown for AI / RAG.

***

### Changelog

- **2026-05-25** — Maintenance & reliability pass: pulled the latest source and rebuilt the Actor on the current base image; build verified.

*Last reviewed: 2026-05-25.*

# Actor input Schema

## `startUrls` (type: `array`):

Websites to crawl. The crawler follows internal links and records every link (edge) it finds.

## `maxPagesToCrawl` (type: `integer`):

Maximum pages to crawl per run. Set 0 for no limit (crawl the whole site).

## `linkScope` (type: `string`):

Export all links, only internal links, or only external/outbound links.

## `maxConcurrency` (type: `integer`):

Number of parallel requests. Lower this if the target site rate-limits you.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPagesToCrawl": 1000,
  "linkScope": "all",
  "maxConcurrency": 10
}
```

# Actor output Schema

## `sourceUrl` (type: `string`):

Page the link is on

## `targetUrl` (type: `string`):

Link target

## `anchorText` (type: `string`):

Anchor text

## `linkType` (type: `string`):

internal / subdomain / external

# 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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        }
    ],
    "maxPagesToCrawl": 1000,
    "maxConcurrency": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/website-link-graph-crawler").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 = {
    "startUrls": [{ "url": "https://apify.com" }],
    "maxPagesToCrawl": 1000,
    "maxConcurrency": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/website-link-graph-crawler").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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPagesToCrawl": 1000,
  "maxConcurrency": 10
}' |
apify call logiover/website-link-graph-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/website-link-graph-crawler",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Website Link Graph & Outbound Links Crawler",
        "description": "Crawl an entire website and export every internal and outbound link as a graph edge — source page, target URL, anchor text, rel and nofollow/sponsored/UGC flags. Built for SEO internal-linking audits, outbound-link analysis and site-structure mapping. No login, no browser.",
        "version": "1.0",
        "x-build-id": "8zLszKg7yqg5FDIz0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~website-link-graph-crawler/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-website-link-graph-crawler",
                "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/logiover~website-link-graph-crawler/runs": {
            "post": {
                "operationId": "runs-sync-logiover-website-link-graph-crawler",
                "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/logiover~website-link-graph-crawler/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-website-link-graph-crawler",
                "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",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Websites to crawl. The crawler follows internal links and records every link (edge) it finds.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxPagesToCrawl": {
                        "title": "Max pages to crawl",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum pages to crawl per run. Set 0 for no limit (crawl the whole site)."
                    },
                    "linkScope": {
                        "title": "Which links to export",
                        "enum": [
                            "all",
                            "internal",
                            "external"
                        ],
                        "type": "string",
                        "description": "Export all links, only internal links, or only external/outbound links.",
                        "default": "all"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of parallel requests. Lower this if the target site rate-limits you."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
