HTML Parser and Query Utility

JSON →
library 1.4.0 ·javascript maintenance
verified May 27, 2026

hpq is a utility library designed to parse HTML strings or existing DOM elements and query their content into a structured JavaScript object. The current stable version is 1.4.0, released in March 2023, indicating a mature project with a maintenance-focused release cadence, primarily addressing minor improvements and type definitions. It operates by allowing developers to define an object shape, where values are matcher functions (e.g., `attr`, `text`, `query`) that extract specific data points from the HTML. Its key differentiator is this declarative, object-shape-driven approach to data extraction, inspired by tools like gdom, making it particularly useful for screen scraping or data transformation within a browser environment.

total hits 15
actors 8 distinct systems
last hit 6d ago MetaBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇫🇷 France · 🇩🇪 Germany