Identify the setting or mission first
Los Santos and the V store listing point to GTA V. Leonida and the Only in Leonida profiles point to GTA VI. GTA IV is a separate title with Niko Bellic in Liberty City. Use the game numeral when searching character names.
Quick help
Can a familiar city alone prove the character is from the same game?
No. Different series entries can reuse a location.
Source and scope
Based on the listed public sources. Nisu did not test this in-game.