What is the f doing in url = f" https://api.ourservice.com/media?page{page}&step=100 ?
It does the same thing as `https://api.ourservice.com/media?page${page}&step=100` [sic] in Javascript, or "https://api.ourservice.com/media?page$page&step=100" in Bash, PHP, Perl or Groovy (and other languages). It outs you into variable substitution / interpolation in the string literal.
In Python these string literals are called f-strings if you want to look it up. They are defined in PEP 498 - Literal String Interpolation [1] and available since Python 3.6.
[1] https://peps.python.org/pep-0498/
[sic] there probably would be a missing '=' in this url after "?page"