0

I'm trying to use this API to fetch data directly in my google spreadsheet, I'm using Google AppScript.

Below is my API

=ImportJSON("https://rest.yyy.com/v2/matches?date=2022-06-01(Date start - yyyy-mm-dd)_2022-07-02(Date end - yyyy-mm-dd)&per_page=2000&token=xxx-xxx-xxxx-xx&status=1,2,3,4 &paged=1")

There is a "Paged" value in the API parameter this parameter limits the output range.

How can I iterate the "paged" parameter so that I don't have to change it manually? So that I could get all the data at once?

I'm doing this using Google App Script.

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Yogesh
  • 13
  • 6
  • 1
    Can you share the full code you have on Apps Script? Also, if your API call returns the page, you can get that number, add +1 to it and make another call with it. – Kessy Jun 15 '22 at 10:45
  • (if your API call returns the page, you can get that number, add +1 to it and make another call with it) How can i do this ?? – Yogesh Jun 15 '22 at 10:56
  • 1
    You can use `Logger.log()` to see the structure that the API returns and then use a for loop to get the information you need. Can you share your full code on Apps Script? – Kessy Jun 17 '22 at 15:13

0 Answers0