Blocks
Get Block Number by Timestamp
Retrieves the block number mined at a specific timestamp.
GET
Get Block Number by Timestamp
Documentation Index
Fetch the complete documentation index at: https://docs.etherscan.io/llms.txt
Use this file to discover all available pages before exploring further.
Query Parameters
Your Etherscan API key.
Chain ID you query, eg
1 for Ethereum, 8453 for Base from our supported chains.Set to
block for this endpoint.Set to
getblocknobytime for this endpoint.Unix timestamp in seconds.
Closest available block to the provided timestamp, either
before or after.