---
id: htmldate
version: "1.10.0"
license: Apache-2.0
license_treatment: permissive
maintenance: active
---
# htmldate — Fast and robust extraction of original and updated publication dates from URLs and web pages.
License: permissive · Maintenance: active · Downloads: 14.9M/mo
## What it is and what it does
Htmldate is a Python library and command-line tool for finding publication and update dates on web pages. It works by examining HTML markup (meta tags, Open Graph attributes, structural elements like `time` and `abbr`), then falling back to heuristic text analysis when metadata is absent. The package includes both a fast mode for quick extraction and an extensive mode that collects all candidate dates and uses a disambiguation algorithm to select the most likely one.
The library handles flexible input (URLs, HTML files, or parsed trees) and outputs dates in customizable formats, defaulting to ISO 8601. It is multilingual and has been deployed in production on millions of documents. The package depends on lxml for parsing, dateparser for date normalization, charset_normalizer for encoding detection, python-dateutil for date manipulation, and urllib3 for HTTP requests.
Use it for:
- Automated metadata extraction for web corpora and text databases in research or archival projects.
- Enriching web scraping pipelines with reliable publication dates when server headers are missing or unreliable.
- Batch processing of archived or crawled web pages to extract and standardize publication timestamps.
- Building content aggregation systems that need to sort or filter articles by publication date.
- Detecting content updates by comparing original and updated publication dates on news or blog sites.
## Worth the install?
AI-flagged interpretation of the facts above — verify before relying.
Extracts original and updated publication dates from web pages by parsing HTML markup, metadata, and text content, with both Python API and command-line interfaces.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is production-tested on millions of documents and ranks in the top 5000 PyPI packages by download volume. Install it if you need reliable date extraction from web pages; the fast mode offers good speed and the extensive mode provides high recall when accuracy matters most.
## Install
pip install htmldate
uv add htmldate
poetry add htmldate
## Installing htmldate
Before you install: Low friction installation with a pure-Python wheel and five runtime dependencies. Actively maintained as of 2026-07-31 with recent release activity.
License in practice: Distributed under Apache 2.0, a permissive license allowing commercial and private use with minimal restrictions; versions prior to 1.8.0 used GPLv3+.
Quickstart:
pip install htmldate
from htmldate import find_date
date = find_date('http://blog.python.org/2016/12/python-360-is-now-available.html')
print(date) # '2016-12-23'
Requires Python 3.10 or later; earlier versions (1.8.1 for Python 3.6–3.7, 1.9.x for 3.8–3.9) are available if needed.
Verify before relying:
- Whether the package handles redirects, authentication, or rate-limiting when fetching URLs.
- Performance characteristics on pages with malformed or ambiguous date markup.
- Whether batch processing supports concurrent requests or is sequential only.
## Package facts
- License: Apache-2.0 (permissive)
- Python support: supports_current
- Install friction: low
- Maintenance: active
- Downloads: 14.9M/month (top 5,000 on PyPI)
- Known vulnerabilities: none known
## Tags
extract publication date from html, web page date extraction, find article publish date, html metadata date parsing, web scraping date detection, publication date finder, article date extraction, webpage timestamp extraction, web-scraping, metadata-extraction, date-parsing
[View on SkillFed](https://skillfed.io/packages/htmldate) · [View on PyPI](https://pypi.org/project/htmldate/)