The Zariski spectrum is essentially the classifying topos for prime ideal of $A$, or to be more precise, the classifying topos for subsets of $A$ that are "complement of prime ideals of $A$". The precise geometric theory is given by:
$$x+y \in U \Rightarrow x \in U \text{ or } y \in U$$ $$xy \in U \Leftrightarrow x \in U \text{ and } y \in U$$ $$ 1 \in U$$ $$ 0 \notin U$$
where the $x \in U$ are the basic proposition of the theory (and $U$ represents this "subset of $A$ which is the complement of a prime ideals").
This can be immediately translated into the fact that that (the frame corresponding to) the Zariski spectrum is the frame freely generated by the symbols $D(a)$ for $a \in A$ subject to the relations:
$$D(x+y) \leqslant D(x) \cup D(y)$$ $$D(xy)= D(x) \cap D(y)$$ $$D(1) = \top$$ $$D(0) = \bot$$
You can rewrite this as a site if you want - but generally, the presentation as a free locale is more convenient. Of course, the relation $D(f^n)=D(f)$ immediately follow from the second condition.
The structure sheaf of the Zariski spectrum can easily be obtained form this as well: internally in the topos of sheaf over the Zariski spectrum, you have the generic such subsheaf $U \subset A$ (where $A$ is the constant sheaf). The Structure sheaf is $A[U^{-1}]$.
Note that this definitely appears in a few places in the literature. But I'm not sure what is the appropriate reference to attribute it to. My Guess is Johnstone's Stone Space, but I can't check it right now.