← All workCase study 15

serpcraft

A typed TypeScript CLI and library that scrapes and parses Google, Bing and DuckDuckGo into clean structured JSON.

Type

Developer Tool

Status

Shipped

Context

Open source

Period

2026

Source

Public

TypeScript
(01) Overview

Getting structured search results programmatically means either an expensive API or a brittle custom scraper. serpcraft is the second thing done properly: one parser per engine behind a shared base parser, a typed core, user-agent rotation and pacing in the HTTP layer, its own error hierarchy, and a CLI that can query all three engines at once and render either a table or JSON.

(02) Architecture

Per-engine parsers behind a shared base parser · typed core and result models · user-agent rotation and request pacing · dedicated error hierarchy · CLI with table and JSON output, single-engine or all-engines · Jest test suite

(03) What was built
  1. 01Three engines — Google, Bing, DuckDuckGo — each with its own parser behind a common base, so adding an engine means adding a parser rather than touching the core.
  2. 02A typed result model means callers get the same structured shape regardless of which engine produced it.
  3. 03User-agent rotation and deliberate request pacing in the HTTP layer.
  4. 04A dedicated error hierarchy, so a parse failure and a network failure are distinguishable by type.
  5. 05Usable as both a CLI and a library, with table or JSON output and the ability to query every engine simultaneously.
(04) Stack

TypeScript / Node.js / Jest

Next case study

Auqli Nexus

→