Blocks
Endpoints with
are under the API Pro subscription. To upgrade your API plan, browse through the Etherscan APIs page.

Get Block And Uncle Rewards by BlockNo

Returns the block reward and 'Uncle' block rewards.
1
https://api.etherscan.io/api
2
?module=block
3
&action=getblockreward
4
&blockno=2165403
5
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
blockno
the integer block number to check block rewards for eg. 12697906​
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":{
5
"blockNumber":"2165403",
6
"timeStamp":"1472533979",
7
"blockMiner":"0x13a06d3dfe21e0db5c016c03ea7d2509f7f8d1e3",
8
"blockReward":"5314181600000000000",
9
"uncles":[
10
{
11
"miner":"0xbcdfc35b86bedf72f0cda046a3c16829a2ef41d1",
12
"unclePosition":"0",
13
"blockreward":"3750000000000000000"
14
},
15
{
16
"miner":"0x0d0c9855c722ff0c78f21e43aa275a5b8ea60dce",
17
"unclePosition":"1",
18
"blockreward":"3750000000000000000"
19
}
20
],
21
"uncleInclusionReward":"312500000000000000"
22
}
23
}
Copied!
​​
⏳
Tip : The timestamp field is denoted in Unix timestamp.​

Get Estimated Block Countdown Time by BlockNo

Returns the estimated time remaining, in seconds, until a certain block is mined.
1
https://api.etherscan.io/api
2
?module=block
3
&action=getblockcountdown
4
&blockno=16701588
5
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
blockno
the integer block number to estimate time remaining to be mined eg. 12697906​
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":{
5
"CurrentBlock":"12715477",
6
"CountdownBlock":"16701588",
7
"RemainingBlock":"3986111",
8
"EstimateTimeInSec":"52616680.2"
9
}
10
}
Copied!

Get Block Number by Timestamp

Returns the block number that was mined at a certain timestamp.
1
https://api.etherscan.io/api
2
?module=block
3
&action=getblocknobytime
4
&timestamp=1578638524
5
&closest=before
6
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
timestamp
the integer representing the Unix timestamp in seconds.
closest
the closest available block to the provided timestamp, either before or after
​
⏳
Tip : Convert a regular date-time to a Unix timestamp.​
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":"12712551"
5
}
Copied!

Get Daily Average Block Size
​

Returns the daily average block size within a date range.
1
https://api.etherscan.io/api
2
?module=stats
3
&action=dailyavgblocksize
4
&startdate=2019-02-01
5
&enddate=2019-02-28
6
&sort=asc
7
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
startdate
the starting date in yyyy-MM-dd format, eg. 2019-02-01
enddate
the ending date in yyyy-MM-dd format, eg. 2019-02-28
sort
the sorting preference, use asc to sort by ascending and desc to sort by descending
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":[
5
{
6
"UTCDate":"2019-02-01",
7
"unixTimeStamp":"1548979200",
8
"blockSize_bytes":20373
9
},
10
{
11
"UTCDate":"2019-02-28",
12
"unixTimeStamp":"1551312000",
13
"blockSize_bytes":25117
14
}
15
]
16
}
Copied!

Get Daily Block Count and Rewards
​

Returns the number of blocks mined daily and the amount of block rewards.
1
https://api.etherscan.io/api
2
?module=stats
3
&action=dailyblkcount
4
&startdate=2019-02-01
5
&enddate=2019-02-28
6
&sort=asc
7
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
startdate
the starting date in yyyy-MM-dd format, eg. 2019-02-01
enddate
the ending date in yyyy-MM-dd format, eg. 2019-02-28
sort
the sorting preference, use asc to sort by ascending and desc to sort by descending
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":[
5
{
6
"UTCDate":"2019-02-01",
7
"unixTimeStamp":"1548979200",
8
"blockCount":4848,
9
"blockRewards_Eth":"14929.464690870590355682"
10
},
11
{
12
"UTCDate":"2019-02-28",
13
"unixTimeStamp":"1551312000",
14
"blockCount":4366,
15
"blockRewards_Eth":"12808.485512162356907132"
16
}
17
]
18
}
Copied!

Get Daily Block Rewards
​

Returns the amount of block rewards distributed to miners daily.
1
https://api.etherscan.io/api
2
?module=stats
3
&action=dailyblockrewards
4
&startdate=2019-02-01
5
&enddate=2019-02-28
6
&sort=asc
7
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
startdate
the starting date in yyyy-MM-dd format, eg. 2019-02-01
enddate
the ending date in yyyy-MM-dd format, eg. 2019-02-28
sort
the sorting preference, use asc to sort by ascending and desc to sort by descending
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":[
5
{
6
"UTCDate":"2019-02-01",
7
"unixTimeStamp":"1548979200",
8
"blockRewards_Eth":"15300.65625"
9
},
10
{
11
"UTCDate":"2019-02-28",
12
"unixTimeStamp":"1551312000",
13
"blockRewards_Eth":"12954.84375"
14
}
15
]
16
}
Copied!

Get Daily Average Time for A Block to be Included in the Ethereum Blockchain
​

Returns the daily average of time needed for a block to be successfully mined.
1
https://api.etherscan.io/api
2
?module=stats
3
&action=dailyavgblocktime
4
&startdate=2019-02-01
5
&enddate=2019-02-28
6
&sort=asc
7
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
startdate
the starting date in yyyy-MM-dd format, eg. 2019-02-01
enddate
the ending date in yyyy-MM-dd format, eg. 2019-02-28
sort
the sorting preference, use asc to sort by ascending and desc to sort by descending
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":[
5
{
6
"UTCDate":"2019-02-01",
7
"unixTimeStamp":"1548979200",
8
"blockTime_sec":"17.67"
9
},
10
{
11
"UTCDate":"2019-02-28",
12
"unixTimeStamp":"1551312000",
13
"blockTime_sec":"19.61"
14
}
15
]
16
}
Copied!

Get Daily Uncle Block Count and Rewards
​

Returns the number of 'Uncle' blocks mined daily and the amount of 'Uncle' block rewards.
1
https://api.etherscan.io/api
2
?module=stats
3
&action=dailyuncleblkcount
4
&startdate=2019-02-01
5
&enddate=2019-02-28
6
&sort=asc
7
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
startdate
the starting date in yyyy-MM-dd format, eg. 2019-02-01
enddate
the ending date in yyyy-MM-dd format, eg. 2019-02-28
sort
the sorting preference, use asc to sort by ascending and desc to sort by descending
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":[
5
{
6
"UTCDate":"2019-02-01",
7
"unixTimeStamp":"1548979200",
8
"uncleBlockCount":287,
9
"uncleBlockRewards_Eth":"729.75"
10
},
11
{
12
"UTCDate":"2019-02-28",
13
"unixTimeStamp":"1551312000",
14
"uncleBlockCount":288,
15
"uncleBlockRewards_Eth":"691.5"
16
}
17
]
18
}
Copied!
Last modified 7d ago