claytypescriptgtm

Replace Clay with 200 Lines of TypeScript

Open-sourced TypeScript clones replace Clay for steady-state pipelines at thousands of records per day. The pattern, the cost, the tradeoffs.

6 min read

A r/GrowthHacking post claimed it replaced Clay with 200 lines of TypeScript and open-sourced the waterfall. The pattern is real and worth unpacking. Clay still wins for prototyping; the open-source clone wins for steady-state pipelines that run thousands of records per day.

What Clay Does Well

Clay's value is the visual waterfall: drag vendors into columns, chain enrichment, branch on missing data, score, write to CRM. The UI is fast for ideation. The cost is per-action pricing that climbs with steady-state volume.

The 200-Line Replacement

The pattern is straightforward. Define the vendors as functions. Define the waterfall as an array of (vendor, condition) tuples. Run each record through the array and stop at first hit per field. Write to Postgres. Done.

import "dotenv/config";

const SCAVIO = process.env.SCAVIO_API_KEY!;
const ZEROBOUNCE = process.env.ZEROBOUNCE_API_KEY!;

type Record = { domain: string; firstName?: string; lastName?: string; email?: string; linkedin?: string };

async function scavioLinkedin(r: Record): Promise<Partial<Record>> {
  const q = `site:linkedin.com/in ${r.firstName} ${r.lastName} ${r.domain}`;
  const resp = await fetch("https://api.scavio.dev/api/v1/google", {
    method: "POST",
    headers: { "x-api-key": SCAVIO, "Content-Type": "application/json" },
    body: JSON.stringify({ query: q })
  }).then(r => r.json());
  const hit = resp.organic_results?.[0];
  return hit ? { linkedin: hit.link } : {};
}

async function zeroBounceVerify(r: Record): Promise<Partial<Record>> {
  if (!r.email) return {};
  const resp = await fetch(`https://api.zerobounce.net/v2/validate?api_key=${ZEROBOUNCE}&email=${r.email}`).then(r => r.json());
  return resp.status === "valid" ? { email: r.email } : {};
}

const waterfall = [scavioLinkedin, zeroBounceVerify];

export async function enrich(records: Record[]): Promise<Record[]> {
  const out: Record[] = [];
  for (const r of records) {
    let merged = { ...r };
    for (const step of waterfall) {
      const result = await step(merged);
      merged = { ...merged, ...result };
    }
    out.push(merged);
  }
  return out;
}

The Cost Math

At 10,000 records per day, the difference is real. Clay's steady state at that volume: $5K to $8K per month depending on which vendors the waterfall hits. The TypeScript clone with Scavio plus ZeroBounce plus a focused emails vendor: $300 to $1,000 per month for the same record volume. That is a 70 to 85% reduction at scale.

What You Lose

Visual UI. Clay is fast for ideation precisely because the UI shows the waterfall. The TypeScript clone is fast for steady state precisely because there is no UI. The trade-off is real and depends on whether you are still iterating on the waterfall or running a stable pipeline.

What You Gain

Full control. Per-vendor caching. Custom scoring across columns. Easy version control of the waterfall logic. Easy testing. Easy CI. None of these are first-class in Clay.

Where Scavio Fits

Scavio replaces the SERP, Reddit, and public LinkedIn portion of most Clay waterfalls. One credit pool, one JSON shape, no per-vendor contract. Pair with a focused emails-only vendor (ZeroBounce, Apollo Direct Dials, NeverBounce) and a focused people-data vendor for the edge cases.

The Hybrid Pattern

The right play is hybrid. Keep Clay Launch ($185/mo) for ideating new waterfalls. When a waterfall stabilizes and starts running at thousands of records per day, port it to TypeScript. The two tools serve different jobs: Clay for prototyping, code for steady state.

Open-Source Implementations

Several open-source Clay clones landed in 2026. Most are MIT-licensed and BYOK (bring your own keys). They handle vendor-call orchestration, rate limiting, and Postgres writes. Pick one that uses Scavio for the SERP layer; the alternatives lock you into a single SERP vendor that often costs more than Scavio.

What This Approach Cannot Do

It cannot replace verified emails for the long tail of obscure contacts. It cannot replace a great SDR or great copy. It is a data layer plus orchestration; the strategy still matters.