courlan
Clean, filter and sample URLs to optimize data collection – includes spam, content type and language filters.
What it is and what it does
Courlan is a URL processing library designed to improve web crawler efficiency and document collection quality. It provides validation, normalization, filtering, and sampling functions that work together to identify high-value pages and discard low-quality content before crawling begins. The library filters out spam, tracking parameters, and platform-specific pages, and can apply language-aware heuristics to target specific locales.
The package is built on three runtime dependencies (babel, tld, urllib3) and offers both programmatic Python functions and command-line utilities. It includes specialized tools for crawl frontier management—distinguishing navigation pages from content pages, detecting non-crawlable URLs, and handling relative link resolution—making it useful for anyone building a web crawler, scraper, or bulk document collection pipeline.
Use it for:
- Filter out tracker parameters and spam domains before crawling to reduce bandwidth waste and improve document quality.
- Sample representative URLs from a large domain to avoid redundant crawling and focus on diverse content.
- Extract and prioritize links from HTML with language filtering to target content in specific locales.
- Normalize and deduplicate URLs across multiple sources to prevent re-crawling the same page.
- Identify navigation and overview pages separately from content pages to optimize crawl scheduling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates, normalizes, filters, and samples URLs for web crawling and document collection, removing spam, trackers, and low-value pages while respecting language and content-type constraints.
Yes. Courlan is actively maintained, has no known vulnerabilities, and offers a focused, well-scoped toolkit for URL handling in crawling workflows. The permissive Apache-2.0 license and low install friction make it a practical choice for web scraping and document collection projects. Install it if you are building a crawler or bulk collection pipeline and need to filter, normalize, or sample URLs at scale.
Install
courlan on PyPI
pip
pip install courlanuv
uv add courlanpoetry
poetry add courlanInstalling courlan
Before you install
Low install friction with three lightweight runtime dependencies (babel, tld, urllib3). Active maintenance with a recent release 74 days ago and ongoing repository activity.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install courlan
from courlan import check_url, sample_urls, extract_links
# Validate and clean a URL
url, domain = check_url('https://example.org/page?utm_source=twitter')
# Sample URLs from a collection
sampled = sample_urls(['https://example.org/' + str(i) for i in range(100)], 10)
# Extract and filter links from HTML
links, priority_links = extract_links('<a href="/page">link</a>', 'https://example.org')
Requires Python 3.10 or higher; earlier versions (3.6–3.9) require older courlan releases.
Verify before relying
- Performance characteristics when processing large URL collections (millions of URLs).
- Accuracy of language detection and filtering heuristics across different URL patterns.
- Whether the package handles internationalized domain names (IDN) correctly.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — babel, tld, urllib3 |
| Maintenance | actively maintained — 74 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 13,207,347/month — #1,292 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: courlan-1.4.0-py3-none-any.whl
Keywords: cleaner, crawler, uri, url-parsing, url-manipulation, urls, validation, webcrawling
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
LinkCheckerLinkChecker validates links across websites by…
copyleft · top 15,000 on PyPI
url-normalizeStandardizes URLs to a canonical form by…
permissive · top 1,000 on PyPI
Crawl4AICrawl4AI is an async web crawler and scraper…
permissive · top 5,000 on PyPI
trafilaturaTrafilatura extracts main text, metadata, and…
permissive · top 5,000 on PyPI
ada-urlParse, validate, and manipulate URLs according…
permissive · top 15,000 on PyPI
ultimate-sitemap-parserParses and crawls sitemaps in multiple formats…
copyleft · top 15,000 on PyPI
crawleeCrawlee is a web scraping and browser…
permissive · top 5,000 on PyPI
urlextractExtracts URLs from text by locating TLDs and…
permissive · top 5,000 on PyPI
scraplingScrapling is a web scraping and crawling…
permissive · top 5,000 on PyPI
w3libw3lib provides utility functions for common web…
permissive · top 5,000 on PyPI