> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainwp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# URL Extractor

> URL Extractor allows you to extract URLs by custom tokens like (Title, Status, Author, Website URL and Website Name) from any post or page on your child sites and export them as CSV or TXT file. This is often helpful for both client reports and indexing software.

## What You'll Learn

* Extracting URLs using custom tokens
* Configuring output format and separators
* Saving and loading extraction templates
* Exporting results in CSV or TXT format
* Automating extractions with the Abilities API

***

> [!NOTE]
>
> **Extension Add-on** - This add-on provides standalone functionality within MainWP Dashboard. No third-party plugins required.

[URL Extractor - Video Tutorial](https://www.youtube.com/embed/H1tL1VAOVlk)

URL Extractor allows you to extract URLs using custom tokens (Title, Post URL, Date, Status, Author, Website URL, Website Name) of any post or page from your Child Sites and export them as CSV or TXT files. Provided search options will enable you to refine your search by:

* Type: Post or Page
* Status: Published, Pending, Private, Scheduled, Draft, Trash
* Arbitrary keywords
* Date Range
* Child Sites

You can easily customize your output. Combining the provided tokens and custom characters, create any output structure you need. This is often helpful for both client reports and indexing software.

## How to use URL Extractor

![URL Extractor page with output format tokens and sidebar options](https://mintcdn.com/mainwp/RPovfYRqnTPYvuIf/images/add-ons/url-extractor-tokens-page.png?fit=max\&auto=format\&n=RPovfYRqnTPYvuIf\&q=85\&s=171f31becc55148aafb21a09dc29a21b)

**1. Navigate to MainWP Dashboard > Add-ons > Administrative > URL Extractor**

**2. Configure the output format using Available Tokens**

In the **Output format** field, either type in the Available Tokens or click on the green bubbles of respective tokens to insert them automatically **NOTE:** You can also combine plain text with the token names. For example: `This is the Post URL [post.url], and this is the Post Title [post.title]`

**3. Enter a separator in the Separator field**

Type in the desired text in the Separator field **NOTE:** This text will be used to separate individual entries in the output. By leaving the field empty, the individual entries will be placed in a new line.

**4. In the Sidebar**

In the Sidebar

1. Select the desired Sites, either individually or by Tags
2. Select the post type, either Post or Page, or both
3. Select one or multiple statuses from the list: Published, Pending, Private, Scheduled, Draft, Trash
4. Optionally filter the results by a Keyword
5. Select the desired Date Range

**5. Click the Preview Ouput button**

**6. Review the output in the popup modal and export it as a .txt or .csv file**

## URL Extractor Templates

The values in the Output format and Separator fields can be saved as templates for speed and convenience.

### Saving a template

![Animation showing how to save a URL Extractor template](https://mintcdn.com/mainwp/RPovfYRqnTPYvuIf/images/add-ons/url-extractor-preview.gif?s=753136b06c6225ad8768deab3f0535b2)

**1. Navigate to MainWP Dashboard > Add-ons > Administrative > URL Extractor**

**2. Enter the desired text in the Output format and Separator fields**

**3. Enter the template name**

**4. Click the Save Template button**

### Loading a template

![Animation showing how to load a saved template](https://mintcdn.com/mainwp/2rlXQ4CNzTqDCqtT/images/add-ons/40134b0f3f65.gif?s=60480396ebc1403e5007d16d17441a9c)

**1. Navigate to MainWP Dashboard > Add-ons > Administrative > URL Extractor**

**2. Select the desired template from the Available Templates dropdown**

**3. Click the Use Template button**

### Deleting a template

**1. Navigate to MainWP Dashboard > Add-ons > Administrative > URL Extractor**

**2. Select the desired template from the Available Templates dropdown**

**3. Click the Delete button**

### Template migration in version 5.1

URL Extractor 5.1 copies your saved templates to new template storage in the background. Older templates that cannot be converted are kept unchanged. When this happens, administrators see an informational notice. No action is needed, and you do not need to edit or delete old templates. The **Preview Output** workflow keeps working while migration runs.

## Abilities API

URL Extractor 5.1 adds ten abilities for AI assistants and automation tools. Use them to manage templates, run extractions across up to 100 Child sites in the background, read stored records, and create one-use TXT or CSV downloads.

URL Extractor 5.1 also adds four permissions you can assign with [Team Control](https://docs.mainwp.com/add-ons/agency/team-control-extension.md): **View Templates**, **Manage Templates**, **Extract Published Posts**, and **Extract Non-Public Posts**. The **Preview Output** button checks the extraction permissions on every request. Extracting any status other than Published requires **Extract Non-Public Posts**.

See [URL Extractor Abilities](https://docs.mainwp.com/api-reference/abilities-api/url-extractor.md) for requests, examples, and errors.

## Increase the maximum number of Posts returned from a Child site

The URL Extractor extension returns a maximum of 50 posts from a single child site. This number can be customized with a filter. As an example, this code snippet will increase the maximum number of posts to 500.

```php theme={null}
add_filter( 'mainwp_url_extractor_max_posts_number', 'max_url_extractor_posts' );

function max_url_extractor_posts() {
	return 500;
}

```

The easiest way to insert this code snippet to the MainWP Dashboard site is by using our [Custom Dashboard](https://mainwp.com/extension/mainwp-custom-dashboard-extension/) extension.

**1. Install the Custom Dashboard extension**

**2. Add the code snippet to the PHP tab in the Custom Dashboard extension**

Add the code snippet to the PHP tab in the Custom Dashboard extension ![Custom Dashboard PHP tab with code snippet for max posts](https://mintcdn.com/mainwp/fYo8wl5GET5OrNvZ/images/add-ons/7d9bde1c6d30.png?fit=max\&auto=format\&n=fYo8wl5GET5OrNvZ\&q=85\&s=326a6f1cb1c930b1e604f25c8e9d958d)

**3. Adjust the number of returned posts as desired**

**4. Click the Save Changes button**

***

## Related Resources

* [Administrative Add-ons](https://docs.mainwp.com/add-ons/administrative.md) - Browse administrative tools
* [Post Plus Extension](https://docs.mainwp.com/add-ons/posts-pages/post-plus-extension.md) - Advanced post creation
* [Manage Posts](https://docs.mainwp.com/sites/content/manage-posts.md) - Post management guide
* [URL Extractor Abilities](https://docs.mainwp.com/api-reference/abilities-api/url-extractor.md) - Automate extractions and exports


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.