# Public Suffix Extractor MCP for AI Agents AI Agent Connect

> Public Suffix Extractor lets you pull accurate root domains, TLDs, and subdomains from any URL. It uses the official Mozilla Public Suffix List to handle complex cases like .co.uk or .com.br, ensuring your data stays clean and your analytics stay precise.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_LmUqJapaOSRBG8u0znMC3iVKUNjgZCM8mbyDzszm/ai-agent-connect
- **Tags:** url-parsing, tld-extraction, domain-analysis, data-normalization, browser-standards

## Description

When you're processing a massive list of URLs for an analytics project, you can't just guess where the actual domain ends. For example, a system might see app.vinkius.co.uk and think the TLD is .uk, which breaks your data. This Connector fixes that by using the official Mozilla Public Suffix List to fragment hostnames with 100% accuracy. It knows the difference between a registrable domain and a cloud suffix like those used by AWS. Instead of writing complex regex patterns that break every time a new TLD is added, you can just let your agent handle it. This makes it a reliable piece of your stack when you're building tools that need to normalize web data at scale. You'll find it's a core utility in the Vinkius catalog for anyone who needs to treat URLs as structured data rather than just strings of text.

## Tools

### extract_domain
Pulls the true root domain, TLD, and subdomain from any hostname using the Mozilla Public Suffix List. It correctly handles complex suffixes like .co.uk or .com.br.

## Prompt Examples

**Prompt:** 
```
What's the root domain for app.vinkius.co.uk?
```

**Response:** 
```
Domain: vinkius.co.uk | TLD: co.uk | Subdomain: app
```

**Prompt:** 
```
Is mybucket.s3.amazonaws.com a real domain?
```

**Response:** 
```
Domain: mybucket.s3.amazonaws.com | TLD: s3.amazonaws.com (PSL-listed cloud suffix)
```

**Prompt:** 
```
Extract the domain from https://shop.example.com.br/products
```

**Response:** 
```
Domain: example.com.br | TLD: com.br | Subdomain: shop
```

## Capabilities

### Identify root domains
Pull the true base domain from any URL or hostname.

### Extract TLDs
Get the correct Top-Level Domain even for complex multi-part suffixes.

### Isolate subdomains
Separate the subdomain from the registrable part of a URL.

### Handle cloud suffixes
Recognize and ignore non-registrable suffixes like those from AWS.

### Normalize hostnames
Turn messy URL strings into clean, structured domain components.

## Use Cases

### Grouping fragmented web traffic
An analytics agent is processing a CSV of 50,000 URLs. It's grouping news.example.co.uk and shop.example.co.uk as different sites. The agent uses extract_domain to see they both belong to example.co.uk.

### Filtering cloud noise from scrapers
A developer is building a web scraper. It's picking up thousands of S3 buckets. It uses extract_domain to identify the cloud suffixes and skip them.

### Cleaning marketing link data
A marketing tool needs to find the main domain of a link. The agent cleans the URL and pulls the root domain using extract_domain.

### Normalizing global datasets
A data scientist is normalizing a dataset of global domains. Multi-part TLDs like .com.br are confusing the logic. The agent pulls the correct TLD and SLD for every entry automatically.

## Benefits

- Stop guessing TLDs: Use extract_domain to accurately identify suffixes like .co.uk or .com.br instead of relying on simple string splitting.
- Clean up your logs: Group web traffic by the true root domain automatically so your analytics aren't cluttered by subdomains.
- Filter out cloud noise: Identify non-registrable suffixes like .amazonaws.com to focus only on the actual websites you care about.
- Save on dev time: Skip writing and maintaining complex regex patterns for URL parsing by using the official Mozilla list.
- Standardize your data: Get consistent results across different regions and complex TLDs every time your agent processes a URL.

## How It Works

The bottom line is you get 100% accurate domain parsing without maintaining your own lists.

1. Provide any URL or hostname to the agent.
2. The Connector queries the Mozilla Public Suffix List.
3. You get a structured breakdown of the domain, TLD, and subdomain.

## Frequently Asked Questions

**Can Public Suffix Extractor handle complex TLDs like .co.uk?**
Yes. It uses the official Mozilla list to correctly identify multi-part suffixes.

**How does Public Suffix Extractor help with data cleaning?**
It normalizes URLs so your agent can group traffic by the true root domain.

**Will Public Suffix Extractor identify AWS buckets?**
Yes. It recognizes them as cloud suffixes so you can filter them out of your results.

**Is Public Suffix Extractor accurate for international domains?**
It is 100% accurate because it uses the same list as major web browsers.

**Can I use Public Suffix Extractor to find subdomains?**
Yes. It separates the subdomain from the registrable domain for you.

**Why can't I just split the domain by dots?**
Because TLDs like .co.uk, .com.br, and .org.au have multiple parts. Splitting by dots would incorrectly identify the root domain. The PSL has 9,000+ entries.

**Does it handle cloud provider domains?**
Yes. Domains like *.amazonaws.com, *.azurewebsites.net, and *.cloudfront.net are in the PSL and handled correctly.

**Can I pass a full URL with protocol and path?**
Yes. The engine automatically strips the protocol (http/https), path, and query parameters before parsing.