Moralis API getNFTOwners using .next()

Hi, I’m trying to get all holders of my NFT collection and I’m doing something like this:

const results = [];
let response = await Moralis.EvmApi.token.getNFTOwners({
  address: '0x99903e8eC87b9987bD6289DF8eff178d6E533561',
  chain: EvmChain.ETHEREUM,
});
results.push(...response.result);

while (response.next) {
  const nextResponse = await response.next();
  results.push(...nextResponse.result);
  response = nextResponse;
}

My total is 1731, but after 17th loop iteration (I have 1700 items by then) I am getting error

MoralisError [Moralis SDK API Error]: [A0002] Cannot call .next(). Page limit exceeded.

I don’t really know if this is the correct way of getting all the data, but can anyone help me with getting the remaining 31 positions?

1 Like

you say that you are not able to get latest 31 results with .next()?

@kscibior, it looks like an issue on our side for the SDK, we are working on fixing it

Okay then, thanks for the response, I will be waiting.

1 Like

it should be fixed in the next release of the sdk, you could try again with latest version of the SDK

release 2.2.0 will have the fix

Hi, I think there still might be something wrong. After sdk update I updated my code accordingly:

    const results: EvmNft[] = [];
    let response = await Moralis.EvmApi.token.getNFTOwners({
      address: '0x99903e8eC87b9987bD6289DF8eff178d6E533561',
      chain: EvmChain.ETHEREUM,
    });
    results.push(...response.result);
    let stop = false;

    while (response.hasNext() && !stop) {
      try {
        const nextResponse = await response.next();
        results.push(...nextResponse.result);
        response = nextResponse;
      } catch (err) {
        stop = true;
        console.log(err);
      }
    }

I run this function in a cron every five minutes and I sometimes it works perfectly fine, but sometimes it throws errors like:

MoralisError [Moralis SDK Core Error]: [C0006] Request failed with status 400: Request failed with status code 400 with cause [AxiosError: Request failed with status code 400]

MoralisError [Moralis SDK Core Error]: [C0006] Request failed with status undefined: read ECONNRESET with cause AxiosError: read ECONNRESET

Am I still doing something wrong or maybe I’m calling API too often?

when you get that error, can you try again to run it again to see if the second time works?

how many error of that type did you get?
you are still getting those type of errors or it happened only sometimes in a specific time interval?

I rewrite the loop so it wouldn’t stop but keep trying after failed request and for sometime it worked but after a couple of cron iterations it just started to throw 429 errors. Where can I check and adjust rate limits in Moralis Admin Panel? I’m paying for the highest subscription tier.

if you get 429 errors, it means that it is a rate limit error, you can check the response headers or the error message to see if it provides more info about that error

Hey so I updated my code and now it looks like this:

await Moralis.start({
      apiKey: process.env.MORALIS_API_KEY,
    });

    const results: EvmNft[] = [];
    let response;

    try {
      response = await Moralis.EvmApi.token.getNFTOwners({
        address: '0x99903e8eC87b9987bD6289DF8eff178d6E533561',
        chain: EvmChain.ETHEREUM,
      });
      results.push(...response.result);
    } catch (err) {
      console.log(err);
    }
    let iterations = 0;

    while (response && response.hasNext()) {
      if (iterations === 100) {
        break;
      }

      try {
        const nextResponse = await response.next();
        results.push(...nextResponse.result);
        console.log(results.length);
        response = nextResponse;
        iterations += 1;
      } catch (err) {
        console.log(err);
        if (iterations === 0) {
          break;
        }
      }
    }

It runs every ten minutes and if there is no errors while loop runs 22 times as the collection I’m checking consists of 2137 NFTs. I also added the mechanism that the loop will break if there were 100 iterations (of errors) and then it waits patiently for another cron job. But once the errors start coming there is no turning back for some reason and the only thing that works is stopping the app for some time and then restarting it again.

The error I’m logging is

MoralisError [Moralis SDK Core Error]: [C0006] Request failed with status 400: Request failed with status code 400
    at RequestController.makeError (/usr/src/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:137:20)
    at RequestController.<anonymous> (/usr/src/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:118:38)
    at step (/usr/src/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:44:23)
    at Object.throw (/usr/src/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:25:53)
    at rejected (/usr/src/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:17:65)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  isMoralisError: true,
  code: 'C0006',
  details: {
    status: 400,
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTI1OTE5Ny4zNDMiLCIxNjYxNzY3NTQ0LjUyMSIsIjE2NjE4NjM4MjAuMTY5IiwiMTY2MjA1NDU1OC41NDMiLCIxNjYyMzU1NDAwLjAwOCIsIjE2NjMwMTgwMzcuMDY2Il0sIndoZXJlIjp7InRva2VuX2FkZHJlc3MiOiIweDk5OTAzZThlYzg3Yjk5ODdiZDYyODlkZjhlZmYxNzhkNmU1MzM1NjEifSwibGltaXQiOjEwMCwib2Zmc2V0IjowLCJvcmRlciI6W10sInRvdGFsIjoyMTM3LCJwYWdlIjo2LCJ0YWlsT2Zmc2V0IjoxLCJpYXQiOjE2NjM2OTkyMDB9.bG-aYMZuEdlJTeMpa9aMZEUEiZ-JmJ6M1bBvIhhGO-k&offset=4000 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'x-api-key: 423535\r\n' +
        'User-Agent: axios/0.27.2\r\n' +
        'Host: deep-index.moralis.io\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTI1OTE5Ny4zNDMiLCIxNjYxNzY3NTQ0LjUyMSIsIjE2NjE4NjM4MjAuMTY5IiwiMTY2MjA1NDU1OC41NDMiLCIxNjYyMzU1NDAwLjAwOCIsIjE2NjMwMTgwMzcuMDY2Il0sIndoZXJlIjp7InRva2VuX2FkZHJlc3MiOiIweDk5OTAzZThlYzg3Yjk5ODdiZDYyODlkZjhlZmYxNzhkNmU1MzM1NjEifSwibGltaXQiOjEwMCwib2Zmc2V0IjowLCJvcmRlciI6W10sInRvdGFsIjoyMTM3LCJwYWdlIjo2LCJ0YWlsT2Zmc2V0IjoxLCJpYXQiOjE2NjM2OTkyMDB9.bG-aYMZuEdlJTeMpa9aMZEUEiZ-JmJ6M1bBvIhhGO-k&offset=4000',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'deep-index.moralis.io',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kUniqueHeaders)]: null
    },
    response: {
      status: 400,
      statusText: 'Bad Request',
      headers: [Object],
      config: [Object],
      request: [ClientRequest],
      data: [Object]
    }
  },
  [cause]: [AxiosError: Request failed with status code 400] {
    code: 'ERR_BAD_REQUEST',
    config: {
      transitional: [Object],
      adapter: [Function: httpAdapter],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 10000,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [Object],
      url: 'https://deep-index.moralis.io/api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners',
      params: [Object],
      method: 'get',
      data: undefined
    },
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTI1OTE5Ny4zNDMiLCIxNjYxNzY3NTQ0LjUyMSIsIjE2NjE4NjM4MjAuMTY5IiwiMTY2MjA1NDU1OC41NDMiLCIxNjYyMzU1NDAwLjAwOCIsIjE2NjMwMTgwMzcuMDY2Il0sIndoZXJlIjp7InRva2VuX2FkZHJlc3MiOiIweDk5OTAzZThlYzg3Yjk5ODdiZDYyODlkZjhlZmYxNzhkNmU1MzM1NjEifSwibGltaXQiOjEwMCwib2Zmc2V0IjowLCJvcmRlciI6W10sInRvdGFsIjoyMTM3LCJwYWdlIjo2LCJ0YWlsT2Zmc2V0IjoxLCJpYXQiOjE2NjM2OTkyMDB9.bG-aYMZuEdlJTeMpa9aMZEUEiZ-JmJ6M1bBvIhhGO-k&offset=4000 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'x-api-key: 32423424\r\n' +
        'User-Agent: axios/0.27.2\r\n' +
        'Host: deep-index.moralis.io\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTI1OTE5Ny4zNDMiLCIxNjYxNzY3NTQ0LjUyMSIsIjE2NjE4NjM4MjAuMTY5IiwiMTY2MjA1NDU1OC41NDMiLCIxNjYyMzU1NDAwLjAwOCIsIjE2NjMwMTgwMzcuMDY2Il0sIndoZXJlIjp7InRva2VuX2FkZHJlc3MiOiIweDk5OTAzZThlYzg3Yjk5ODdiZDYyODlkZjhlZmYxNzhkNmU1MzM1NjEifSwibGltaXQiOjEwMCwib2Zmc2V0IjowLCJvcmRlciI6W10sInRvdGFsIjoyMTM3LCJwYWdlIjo2LCJ0YWlsT2Zmc2V0IjoxLCJpYXQiOjE2NjM2OTkyMDB9.bG-aYMZuEdlJTeMpa9aMZEUEiZ-JmJ6M1bBvIhhGO-k&offset=4000',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'deep-index.moralis.io',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kUniqueHeaders)]: null
    },
    response: {
      status: 400,
      statusText: 'Bad Request',
      headers: [Object],
      config: [Object],
      request: [ClientRequest],
      data: [Object]
    }
  }
}

and unfortunately it tells me nothing. I’m using this service in production and it is responsible for really important function in our product’s website (it displays leaderboard of token holders). We are paying for highest subscription tier so is there any way to contact someone support that would help us with the issue?

How often does this happen? Which Moralis SDK version are you using now?

this offset parameter should not be present there

Errors begin to happen after about 15th cron job, which runs every 10 minutes so it takes about 2-3 hours after everything breaks down. I was using moralis 2.2.0, now I updated it to 2.5.2 and changed EvmApi.token.getNFTOwners to EvmApi.nft.getNFTOwners, hope that it will help.

Regarding offset parameter - I didn’t set it, it was all set by moralis library.

Yes, I don’t expect to be set by you for that offset parameter, it shouldn’t be present there, it gives an error if it is present.

Still the same thing after update:

MoralisError [Moralis SDK Core Error]: [C0006] Request failed with status 400: Request failed with status code 400
    at RequestController.makeError (/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:137:20)
    at RequestController.<anonymous> (/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:118:38)
    at step (/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:44:23)
    at Object.throw (/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:25:53)
    at rejected (/app/node_modules/@moralisweb3/core/lib/controllers/RequestController.js:17:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  isMoralisError: true,
  code: 'C0006',
  details: {
    status: 400,
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTc2NzkyMi44NzEiLCIxNjYxNzg4NjY2LjM3OCIsIjE2NjE4NDM5MDkuMzkzIiwiMTY2MTg1OTM2Ny41NzkiLCIxNjYxODYyMjUxLjIxIiwiMTY2MTg2MzgzOS40MzQiLCIxNjYxODY3NTA2LjA5OCIsIjE2NjE5MDA2NjYuNTY3IiwiMTY2MTk1MDA4NS4zOTIiLCIxNjYyMDU1MzU0LjkyOCJdLCJ3aGVyZSI6eyJ0b2tlbl9hZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImxpbWl0IjoxMDAsIm9mZnNldCI6MCwib3JkZXIiOltdLCJ0b3RhbCI6MjEzNywicGFnZSI6MTUsInRhaWxPZmZzZXQiOjEsImlhdCI6MTY2MzgzOTAwMH0.uX9tj0_Qe9avbNoFKHBmEgyhgCfsfh5CNPq-xor50j4&offset=8500 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'x-api-key: 4324\r\n' +
        'User-Agent: axios/0.27.2\r\n' +
        'Host: deep-index.moralis.io\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTc2NzkyMi44NzEiLCIxNjYxNzg4NjY2LjM3OCIsIjE2NjE4NDM5MDkuMzkzIiwiMTY2MTg1OTM2Ny41NzkiLCIxNjYxODYyMjUxLjIxIiwiMTY2MTg2MzgzOS40MzQiLCIxNjYxODY3NTA2LjA5OCIsIjE2NjE5MDA2NjYuNTY3IiwiMTY2MTk1MDA4NS4zOTIiLCIxNjYyMDU1MzU0LjkyOCJdLCJ3aGVyZSI6eyJ0b2tlbl9hZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImxpbWl0IjoxMDAsIm9mZnNldCI6MCwib3JkZXIiOltdLCJ0b3RhbCI6MjEzNywicGFnZSI6MTUsInRhaWxPZmZzZXQiOjEsImlhdCI6MTY2MzgzOTAwMH0.uX9tj0_Qe9avbNoFKHBmEgyhgCfsfh5CNPq-xor50j4&offset=8500',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'deep-index.moralis.io',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kUniqueHeaders)]: null
    },
    response: {
      status: 400,
      statusText: 'Bad Request',
      headers: [Object],
      config: [Object],
      request: [ClientRequest],
      data: [Object]
    }
  },
  [cause]: [AxiosError: Request failed with status code 400] {
    code: 'ERR_BAD_REQUEST',
    config: {
      transitional: [Object],
      adapter: [Function: httpAdapter],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 10000,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [Object],
      url: 'https://deep-index.moralis.io/api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners',
      params: [Object],
      method: 'get',
      data: undefined
    },
    request: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTc2NzkyMi44NzEiLCIxNjYxNzg4NjY2LjM3OCIsIjE2NjE4NDM5MDkuMzkzIiwiMTY2MTg1OTM2Ny41NzkiLCIxNjYxODYyMjUxLjIxIiwiMTY2MTg2MzgzOS40MzQiLCIxNjYxODY3NTA2LjA5OCIsIjE2NjE5MDA2NjYuNTY3IiwiMTY2MTk1MDA4NS4zOTIiLCIxNjYyMDU1MzU0LjkyOCJdLCJ3aGVyZSI6eyJ0b2tlbl9hZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImxpbWl0IjoxMDAsIm9mZnNldCI6MCwib3JkZXIiOltdLCJ0b3RhbCI6MjEzNywicGFnZSI6MTUsInRhaWxPZmZzZXQiOjEsImlhdCI6MTY2MzgzOTAwMH0.uX9tj0_Qe9avbNoFKHBmEgyhgCfsfh5CNPq-xor50j4&offset=8500 HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'x-api-key: 42434\r\n' +
        'User-Agent: axios/0.27.2\r\n' +
        'Host: deep-index.moralis.io\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/v2/nft/0x99903e8eC87b9987bD6289DF8eff178d6E533561/owners?chain=0x1&cursor=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21QYXJhbXMiOnsidG9rZW5BZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImtleXMiOlsiMTY2MTc2NzkyMi44NzEiLCIxNjYxNzg4NjY2LjM3OCIsIjE2NjE4NDM5MDkuMzkzIiwiMTY2MTg1OTM2Ny41NzkiLCIxNjYxODYyMjUxLjIxIiwiMTY2MTg2MzgzOS40MzQiLCIxNjYxODY3NTA2LjA5OCIsIjE2NjE5MDA2NjYuNTY3IiwiMTY2MTk1MDA4NS4zOTIiLCIxNjYyMDU1MzU0LjkyOCJdLCJ3aGVyZSI6eyJ0b2tlbl9hZGRyZXNzIjoiMHg5OTkwM2U4ZWM4N2I5OTg3YmQ2Mjg5ZGY4ZWZmMTc4ZDZlNTMzNTYxIn0sImxpbWl0IjoxMDAsIm9mZnNldCI6MCwib3JkZXIiOltdLCJ0b3RhbCI6MjEzNywicGFnZSI6MTUsInRhaWxPZmZzZXQiOjEsImlhdCI6MTY2MzgzOTAwMH0.uX9tj0_Qe9avbNoFKHBmEgyhgCfsfh5CNPq-xor50j4&offset=8500',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'deep-index.moralis.io',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kUniqueHeaders)]: null
    },
    response: {
      status: 400,
      statusText: 'Bad Request',
      headers: [Object],
      config: [Object],
      request: [ClientRequest],
      data: [Object]
    }
  }
}

we plan to fix this on api level, you can also make REST API requests directly if you want.

here you have an example in python:
https://v1docs.moralis.io/misc/rate-limit#example-of-how-to-use-cursor-python