RDAP 404 means unregistered, not available
A domain lookup saying 'not found' doesn't mean you can buy it.
how it works
Registry premium/reserved status is invisible to RDAP; confirm with a registrar checker.
Technique: A pattern or hard-won lesson, written down so it isn't learned twice.
The code for this one lives in a private repo. This page explains the idea so you can build your own.