〜や means “it’s… / that’s…” (Kansai). In Kansai speech the plain copula だ becomes や: そうだ → そうや, 何だ → なんや, 無理だ → 無理や. It is the base of other Kansai endings too, like やろ, やん and やで.
Is 〜や rude? Who can you say it to?
With friends: OK. With coworkers: careful. With a boss or teacher: avoid. The plain Kansai way to say “it is.” Casual and used constantly by Kansai speakers.
How common is 〜や in real speech?
In 2,334 live comedy routines, 〜や appears in 310 lines from 66 comedians.