I built a cruddy tool for this: https://github.com/coracle-social/navigatr You could potentially stand up a relay, scrape the network, then query your database. I think nostr:nprofile1qyghwumn8ghj7vf5xqhxvdm69e5k7tcppemhxue69uhkummn9ekx7mp0qyfhwumn8ghj7ur4wfcxcetsv9njuetn9uqzp75cf0tahv5z7plpdeaws7ex52nmnwgtwfr2g3m37r844evqrr6jm89g02 was working on something like this.