I don't think it's possible natively.
Two options come to mind
1. Use the list identities endpoint, and do your own filtering on the results, although probably doesn't scale well if you're dealing with thousands of identities.
2. Create your own data dictionary, which you use to perform your search against, and return the relevant identity ID. You'd need to use the Kratos webhooks to keep the dictionary in-sync too.