It looks like you are using the Standard REST API. How are you creating your url string? You can use a variable when you build the url string and change the value of the variable in the code.
However, why do you need to change the maxRecords from day to day? If you want all records, omit the maxRecords query parameter. If there are fewer than 100 records, all of the records will be returned without you specifying a specific number of records. If you want more than 100 records, you will need to get into multiple calls and pagination, which is a bit more complex.