1. request /api/v1/instance. if contact_account has the keys "is_pro" and/or "is_verified", then it is running gab social or a variation.
that isn't super reliable, as they may change the keys or a contact_account may not exist, which leads me onto my second check:
2. check the response to "/users/[username].json", where any valid username on that instance goes in [username]. if a json-ld namespace named "gab" exists, then it is running gab social or a variation