Small utility · Precise result

Find the key.
Keep the value.

Recursively search for keys inside JSON objects and retrieve their values.

npm install key-searcher
View on npm
  • MIT
  • zero dependencies
  • ESM
  • 3.3 kB unpacked

Growth story

2,363 downloads settled through Aug 10, 2026 · plus 1,273 provisional on Aug 11
Goal 10k daily downloads
All-time settled peak
526 · Aug 10, 2026
Before this window
488 downloads

Daily activity chart, Jun 13–Aug 11, 2026. Linear, zero-based scale; bars show magnitude; dots mark days with activity too small to draw. The 1,875-download window includes 1,273 provisional downloads on Aug 11. Baked npm registry snapshot through Aug 11, 2026.

Daily npm downloads for key-searcher from 2026-06-13 through 2026-08-11, followed by unwindowed context totals
Date or contextDownloads
2026-06-131
2026-06-1410
2026-06-150
2026-06-160
2026-06-170
2026-06-182
2026-06-190
2026-06-200
2026-06-214
2026-06-221
2026-06-230
2026-06-240
2026-06-252
2026-06-260
2026-06-274
2026-06-280
2026-06-290
2026-06-307
2026-07-010
2026-07-026
2026-07-032
2026-07-041
2026-07-051
2026-07-064
2026-07-070
2026-07-080
2026-07-098
2026-07-100
2026-07-114
2026-07-120
2026-07-130
2026-07-140
2026-07-151
2026-07-160
2026-07-170
2026-07-180
2026-07-190
2026-07-200
2026-07-210
2026-07-220
2026-07-231
2026-07-241
2026-07-258
2026-07-260
2026-07-270
2026-07-281
2026-07-290
2026-07-300
2026-07-310
2026-08-010
2026-08-020
2026-08-030
2026-08-040
2026-08-051
2026-08-060
2026-08-075
2026-08-080
2026-08-091
2026-08-10526
2026-08-11 (provisional)1,273
Before displayed window488
Lifetime total2,363

Live playground

Search the structure.

Edit the strict JSON and choose the keys to retrieve. The result updates as you type and preserves matched subtrees.

Input Strict JSON
Result 3 requested

Result updated.

Works in the browser. Zero dependencies.

The story

From painful JSON to a tiny, focused tool.

It began as a small internal utility for messy JSON and repetitive data hunting.

It was published quietly on 2026-03-23. It had 2,363 downloads recorded, settled through August 10, 2026, plus 1,273 provisional on August 11, and the goal is to keep it small and do one thing well.

Portrait of Adonis Nuñez

Adonis Nuñez

Founder / CEO

Without types 😎 you don’t need them when you don’t know what you are parsing. — Adonis Nuñez

No hype. Just utility.

No AI wrappers.
No magic hype.
Just a utility that solves a real problem.

No proxies. No cloud.
No data leaves your machine.
Simple, predictable, reliable.

The author

Adonis Nuñez, beyond the package.

Adonis Nuñez holding a microphone on a stage beside a “Búsqueda” tree diagram and TEDx República Dominicana signage.
Search trees, on a bigger stage.
Adonis Nuñez receiving a “Best Key Searcher Algorithm” trophy on an awards stage.
Best Key Searcher Algorithm — for a notable contribution to efficiency in search structures.

Features

Package features

Recursive search

Traverses objects recursively to find matching keys.

Finds keys at any depth

Matches keys wherever they are nested.

Preserves matched subtrees

Keeps the entire object beneath a matched key.

Does not mutate input

Returns a new object and leaves the source untouched.

Example

One import. One call.

key-searcher is ESM-only and exposes a single default export.

import searchIn from "key-searcher";

const obj1 = {
  key1: false,
  key2: {
    key3: "val2",
    key4: {
      key5: "val3",
      key6: { key7: "val4", key8: { key9: "val5" } },
    },
    key5: "val4",
  },
  key10: { key11: "val6" },
};

const newJSON = searchIn(obj1, "key25", "key1", "key6");
// { key25: undefined, key1: false, key6: { key7: 'val4', key8: { key9: 'val5' } } }

Use cases

Ways to use key-searcher

Filtering API responses

Keep only the fields needed from noisy responses.

Extracting deeply nested fields

Pull values from complex JSON structures.

Cleaning large JSON structures

Return only the requested keys and their values.