How to find users with API Enabled Permissions(API Only Users) in Salesforce?

"PermissionsApiEnabled" is used to grant API Enabled Permission to the user via Profile or Permission Set. Following SOQLs can be used to find users with API Enabled Permissions(API Only Users) in Salesforce.
 
Profile:
SELECT Id, Name FROM User WHERE ProfileId IN ( SELECT Id FROM Profile WHERE PermissionsApiEnabled = true )

Based on Permission Set:
SELECT AssigneeId, Assignee.Name FROM PermissionSetAssignment WHERE PermissionSet.PermissionsApiEnabled = true