How do I use a dynamic command with copy from program?
If you want to use dynamic commands, you need the right context for it.  Plain SQL is not one.

One possibility is using PL/pgSQL, and it's EXECUTE functionality.  Use DO to get into the context:

DO $$
DECLARE page integer;
BEGIN
FOR page IN SELECT i FROM generate_series(1, 10) AS t(i)
LOOP
    EXECUTE format($cmd$ COPY _temp 
                         FROM PROGRAM 'curl -uri "https://url?&amp;page=%s"'$cmd$,
                   page::text);
END LOOP;
END; $$;


The other way is to run the loop on the shell side.  The following example is using bash:

for i in $(seq 1 10); do
    psql -c "COPY _temp FROM PROGRAM 'curl -uri https://url?&amp;page=${i}'"
done


Notes:


I am using two levels of dollar-quoting ($$ and $cmd$) to prevent quote multiplication.
I am also using format() instead of the messy concatenation.
If you really have to quote the URI of the curl command, you will have to escape the quotes in there.