Skip to content
Advertisement

API call in express says maximum rows exceeded

I have an express app that makes an api call and prints out the results like so:

 const PORT = 8000
const express = require ('express')
const cors = require('cors')
const axios = require('axios')



app.use(cors())

const app = express()

 app.get('/acs_chart', (req,res) => { 
   (API Call)
  async function APICall(){
    const result = await fetch(url, opts).then(res => res.json()) 
   
      
       res.json(result)
  }
  bitqueryAPICall()
  
  }
  
)

app.listen(8000, () => console.log(`Server is running on port ${PORT}`))

The issue now is that once the API call is made, the result says

Limit for result exceeded, max rows: 25.00 thousand, current rows: 40.11 thousand

I know that you can increase the file size, but I don’t think that also increases the maximum number of rows. Is there a way to increase the maximum number of rows?

Advertisement

Answer

Api that returns row in thousands should have pagination support. send pagination parameter to get paged data based on threshold set from api provider. If you are owner of the api you should add support for server side pagination.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement