You can use nak to check if a note is on a relay. nostr.band relay is also free. https://github.com/fiatjaf/nak