---
title: "Check for Broken Links"
canonical: "https://documentation.chaos.com/space/DOCSGUIDE/788758551/Check%20for%20Broken%20Links"
format: markdown
---
This page covers the setup and usage of the Chaos broken link checker script and the Chaos broken link checker app for Refined Themes documentation sites.

> ℹ️ Run the checkup twice for best results. Run it once and fix the errors in the documentation, then run it a second time.


## **Prerequisites**

---

Before running the script or the app, install Python and the required dependencies.

1. Install Python *3.14.4*.
2. Locate the folder that contains the *python.exe* file.
3. From the address bar of the folder, open a command prompt.
4. In the command prompt, install the Chromium browser for Playwright:

```
python -m playwright install chromium
```

(If you don’t have Playwright installed, you will receive the error “No module named playwright“. You need to first install the library. Use this command: `pip install playwright`.

5. When the installation finishes, install the required Python packages:

```
python -m pip install requests beautifulsoup4
```


## **App**

---

Follow these instructions if you prefer using apps.


> Macro (refined-button)




### **App Instructions**

---

> ℹ️ The report is automatically saved on the local machine in the results folder as a .json file, even when the SAVE REPORT option isn't used. The report is located in C:\Users\<username>\Downloads\stretched\results

> ℹ️ Multiple instances of the same broken link on a single page are indicated with a number.


## **Script**

---

Follow these instructions if you prefer using scripts.

> ❌ Although the script should support Python 3.8 and later, it works best with Python 3.14.4.


> Macro (refined-button)

  


### **Script Instructions**

---


**To set up the script for the first time:**

1. Download and install Python 3.14.
2. Download the skill as a *.zip* file and extract it to a local folder.
3. Open the **Command Prompt** by pressing the **Windows** key, typing *cmd*, and pressing **Enter**.
4. Install the required dependencies by running the following command:

```
   pip install requests beautifulsoup4
```

5. Navigate to the skill folder:

```
   cd %USERPROFILE%\Downloads\refined-themes-link-checker
```


**To run the script:**

Run the following command, replacing the **--space-key** value with the correct space key:

```
python scripts\crawl.py --url "https://documentation.chaos.com" --space-key "ENVISION" --output results.json
```

To display the progress output and report in a text file only instead of the **Command Prompt** window, run this command instead:

```
python scripts\crawl.py --url "https://documentation.chaos.com" --space-key "ENVISION" --output results.json | Tee-Object -FilePath results_report.txt
```


**To run the script on subsequent uses:**

1. Navigate to the skill folder in **Windows Explorer**.
2. Click the address bar and type *cmd* to open the **Command Prompt** in that folder.
3. Run the script command above with the correct **--space-key** value.


**To review the results**, open *results.json* or the results_report.txt in **Notepad++** and double-click any link to open it in a browser.


### **Details**

---

The script detects the following broken link types:

- Broken anchor links
- Broken internal links
- Broken internal links leading to a different space
- Broken external links
- Broken links in notes
- Broken links in grey cards
- Broken links in image cards
- Broken links in tabs.