I want to get site users by their location but I don't see any method for that.
And it's not possible with a filter either.
Is there any way to get users based on location or is it not possible?
No, this is not possible with the API:
You can't even brute-force it, by downloading every user either. Because:
You could brute-force smaller sites that have less than 1 million users, but I wouldn't recommend it.
You can search by location using SEDE. For example:
Note that SEDE data may be up to 1 week old and there is no API for it.