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

1,090 downloads since launch
Goal 10k daily downloads

npm registry API · weekly · Mar 23 – Aug 10, 2026

Weekly npm downloads for key-searcher
Week startingDownloads
2026-03-23395
2026-03-3014
2026-04-067
2026-04-139
2026-04-2010
2026-04-276
2026-05-045
2026-05-1110
2026-05-185
2026-05-255
2026-06-0116
2026-06-0817
2026-06-156
2026-06-227
2026-06-2917
2026-07-0616
2026-07-131
2026-07-2010
2026-07-271
2026-08-037
2026-08-10526

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 has 1,090 downloads to date, 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.

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.