skillfed

htmldate

Fast and robust extraction of original and updated publication dates from URLs and web pages.

htmldate v1.10.0 14.9M downloads/30d#1,210 on PyPI154
Permissive license Apache-2.0 Active released

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 on this page — 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

htmldate on PyPI

pip

pip install htmldate

uv

uv add htmldate

poetry

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 the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — charset_normalizer, dateparser, lxml, python-dateutil, urllib3
Maintenance actively maintained — 74 days since the last release
Last repo commit
First released
Downloads 14,949,222/month — #1,210 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: htmldate-1.10.0-py3-none-any.whl

Keywords: datetime, date-parser, entity-extraction, html-extraction, html-parsing, metadata-extraction, webarchives, web-scraping

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTPTopic :: Scientific/Engineering :: Information AnalysisTopic :: Text Processing :: LinguisticTopic :: Text Processing :: Markup :: HTML

Tags

extract publication date from htmlweb page date extractionfind article publish datehtml metadata date parsingweb scraping date detectionpublication date finderarticle date extractionwebpage timestamp extraction
web-scrapingmetadata-extractiondate-parsing

More WWW/HTTP packages