<p>You can use Bitquery Bitcoin APIs.
<a href="https://docs.bitquery.io/v1/docs/category/bitcoin-examples" rel="nofollow noreferrer">https://docs.bitquery.io/v1/docs/category/bitcoin-examples</a></p>
<p>Here's the query to get latest block info: <a href="https://ide.bitquery.io/latest-Bitcoin-blocks-number" rel="nofollow noreferrer">https://ide.bitquery.io/latest-Bitcoin-blocks-number</a></p>
<p>You can create a <a href="https://account.bitquery.io/auth/signup" rel="nofollow noreferrer">free developer account</a> and use it.</p>
<p>Full disclosure: I work at Bitquery. Feel free to ask questions in our support channels.</p>

CC BY-SA 4.0
2024-04-17T13:23:15.583Z
2024-04-19T09:11:15.227Z
2024-04-19T09:11:15.227Z
Divyasshree
<p>Trying to create a scrip to <a href="https://wordpress.stackexchange.com/questions/414952/how-to-display-block-number-instead-date-value-on-wordpress-posts">convert wordpress posts/pages date and display it as <code>blockNumber</code></a> instead. For context, a <a href="https://bitcoin.stackexchange.com/questions/117706/how-to-display-block-number-instead-date-value-on-wordpress-posts">similar question also posted on this stack</a>.</p>
<p>Do anyone knows if there's any open API or where the <code>blockNumber</code> can be retrieved from?</p>

CC BY-SA 4.0
2023-03-30T16:05:31.963Z
Similar question was answered in this stack overflow: [Getting Bitcoin's block number in a specific date and hour?](https://stackoverflow.com/questions/53788151/getting-bitcoins-block-number-in-a-specific-date-and-hour)
Example: Convert the time of your wordpress post "Thursday, March 30, 2023 3:57:52 PM" to seconds since the UNIX epoch --> 1680191872, add three zeroes to that number --> 1680191872000 and insert it in URL like this: https://blockchain.info/blocks/1680191872000?format=json
deyw
CC BY-SA 4.0
2023-08-02T02:12:34.887Z
There is an answer to a similar question on the WordPress StackExchange site [here](https://wordpress.stackexchange.com/questions/414952/how-to-display-block-number-instead-date-value-on-wordpress-posts/417816#417816)
SuperAtic
<api><block>
There's any open API to gather the blockNumber data?
SuperAtic
# There's any open API to gather the blockNumber data?

(Asked by: username_0 on 2023-03-30)

Trying to create a scrip to [convert wordpress posts/pages date and display it as `blockNumber`](https://wordpress.stackexchange.com/questions/414952/how-to-display-block-number-instead-date-value-on-wordpress-posts) instead. For context, a [similar question also posted on this stack](https://bitcoin.stackexchange.com/questions/117706/how-to-display-block-number-instead-date-value-on-wordpress-posts).

Do anyone knows if there's any open API or where the `blockNumber` can be retrieved from?

**Tags:** api, block

> **Comments:**
> **username_1**: Similar question was answered in this stack overflow: [Getting Bitcoin's block number in a specific date and hour?](https://stackoverflow.com/questions/53788151/getting-bitcoins-block-number-in-a-specific-date-and-hour) Example: Convert the time of your wordpress post "Thursday, March 30, 2023 3:57:52 PM" to seconds since the UNIX epoch --> 1680191872, add three zeroes to that number --> 1680191872000 and insert it in URL like this: https://blockchain.info/blocks/1680191872000?format=json  
> **username_0**: There is an answer to a similar question on the WordPress StackExchange site [here](https://wordpress.stackexchange.com/questions/414952/how-to-display-block-number-instead-date-value-on-wordpress-posts/417816#417816)  

---

## 1 answers

### Answer by username_2 on 2024-04-17. Score: 2

You can use Bitquery Bitcoin APIs.
<https://docs.bitquery.io/v1/docs/category/bitcoin-examples>

Here's the query to get latest block info: <https://ide.bitquery.io/latest-Bitcoin-blocks-number>

You can create a [free developer account](https://account.bitquery.io/auth/signup) and use it.

Full disclosure: I work at Bitquery. Feel free to ask questions in our support channels.


---

