I have an Insight API Server running, it's fully synced and working. I would like to get a json to receive every tx within a block.

On https://github.com/bitpay/insight-api it says I have to use:

Transactions by Block

For example we take block #301453. This block has 725 transactions.


If I use the api to get the json file with this link:


... then it shows the first 10 transactions only (numbers 0 - 9). But there are 725 tx in this block.

It looks like the number 10 are those addresses are the first who are displayed. If i scroll further down, more transactions appear. But why does the json request only show 10 txs?

How can I get ALL transactions in this block - as the documentations mentions?

1 Answer 1


You have two options.

Option 1:
The returned json includes a "pageTotal":'some number'.
You can create a for-loop to loop through all the pages with API calls.

Let assume there are two pages aka "pageTotal":2

To fetch the first page, append parameter [&pageNum=0] to the end
Example usage:


To fetch the second page, add param [&pageNum=1]
Example usage:


Option 2:
Modify transactions.js , 'var pageLength' on Line 253.
The default is 'var pageLength = 10;'
Unsure if there are consequences by doing this, but I assume it should be fine.

  • Thanks! I changed "var pageLength" to 50000. This should list 50.000 tx and should last a while. :) I think option two is the faster solution.
    – A.c
    Dec 21, 2017 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.