You should split your job into multiple requests to get x number of records. with all entries at once you may run OOM
Maybe 500 or 1000 items at once or so...
After you got the data you start an sql transaction and fill the 500 items into sqlite db. close transaction.
Get 500 more items...