Polkadot via Polkadot REST API

Use the Polkadot REST API to call native Polkadot REST methods through Blockdaemon-hosted endpoints.

The Polkadot REST API exposes REST-style access to supported Polkadot-based networks. Start with the base URL for the network you want to query, authenticate with your Blockdaemon API key, then append the /v1/ method path for the data you need.


Step 1: To access Polkadot via the Polkadot REST API, use the following native access endpoints:

  • Network: Polkadot Mainnet
  • Request Type: GET
https://svc.blockdaemon.com/polkadot/mainnet/native/polkadot/rest/v1
  • Network: Polkadot Westend
  • Request Type: GET
https://svc.blockdaemon.com/polkadot/westend/native/westend/rest/v1
  • Network: Polkadot Mainnet Asset Hub
  • Request Type: GET
https://svc.blockdaemon.com/polkadot/mainnet/native/assethub/rest/v1
  • Network: Polkadot Westend Asset Hub
  • Request Type: GET
https://svc.blockdaemon.com/polkadot/westend/native/assethub/rest/v1

Step 2: Authenticate your request using your API key:

Bearer Token

Authorization: Bearer YOUR_API_KEY

Step 3: Add a REST API method at the end of the query, including the required /v1/ prefix:

Learn more about Polkadot REST API methods here.

https://svc.blockdaemon.com/polkadot/mainnet/native/polkadot/rest/v1/YOUR_METHOD

Example Request

Here is a cURL example using GET /v1/blocks/head/header to retrieve the header of the most recently finalized block on Polkadot Mainnet:

curl -X GET \
https://svc.blockdaemon.com/polkadot/mainnet/native/polkadot/rest/v1/blocks/head/header \
-H 'Authorization: Bearer YOUR_API_KEY'

Typical response:

{
    "parentHash": "0xce2dacd2a92d2ae272786c9fcca3f7bd831ef0f87fca252442a0e698a3366490",
    "number": "11557833",
    "stateRoot": "0xec013a64ddfc05f4a1fcc84e2a15d6e158fbd88fce541b7b96ed40c3d4ba6c40",
    "extrinsicsRoot": "0x4ebf6e119dff512925598aade56145811aa09f459f816f8e77dc8b9c396de2ec"
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.