Blocks

Get Block And Uncle Rewards by BlockNo

Returns the block reward and 'Uncle' block rewards.
1
https://api-goerli.etherscan.io/api
2
?module=block
3
&action=getblockreward
4
&blockno=5783995
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":"5783995",
6
"timeStamp":"1635934428",
7
"blockMiner":"0x22ea9f6b28db76a7162054c05ed812deb2f519cd",
8
"blockReward":"355924429292421",
9
"uncles":[
10
11
],
12
"uncleInclusionReward":"0"
13
}
14
}
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-goerli.etherscan.io/api
2
?module=block
3
&action=getblockcountdown
4
&blockno=5793995
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":"5783999",
6
"CountdownBlock":"5793995",
7
"RemainingBlock":"9996",
8
"EstimateTimeInSec":"142957.8"
9
}
10
}
Copied!

Get Block Number by Timestamp

Returns the block number that was mined at a certain timestamp.
1
https://api-goerli.etherscan.io/api
2
?module=block
3
&action=getblocknobytime
4
&timestamp=1635934550
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":"5784003"
5
}
Copied!
Last modified 2mo ago