I came across this Wikipedia definition of an algebraic expression:
"In mathematics, an algebraic expression is an expression built up from integer constants, variables, and the algebraic operations (addition, subtraction, multiplication, division and exponentiation by an exponent that is a rational number). For example, $3x^2 − 2xy + c$ is an algebraic expression.
It talks about integer constants in its definition, hence if I involve $\pi$ in my expression, $$x+y-\pi$$ will this be regarded as algebraic expression?
For saying an expression is algebraic or not, specifying the underlying field of constants is necessary. If no underlying field of constants is specified, $\mathbb{Q}$ is meant. And this is the case in the cited definition in the Wikipedia article.
$x+y-\pi$ is an algebraic expression (means algebraic over $\mathbb{Q}$) regarding $x$, $y$ and $\pi$. The cause is that $x+y-\pi$ is generated from rational numbers, $x$, $y$ and $\pi$ only by only algebraic operations. But the expression is not algebraic (means non-algebraic over $\mathbb{Q}$) regarding $x$ and $y$ - because $x+y-\pi$ is generated from rational numbers, $x$ and $y$ with help of the number/expression $\pi$ which is not algebraic (means non-algebraic over $\mathbb{Q})$.