{"id":15527,"date":"2025-12-01T17:00:00","date_gmt":"2025-12-01T17:00:00","guid":{"rendered":"https:\/\/hederav2stg.wpenginepowered.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/"},"modified":"2025-12-08T17:53:16","modified_gmt":"2025-12-08T17:53:16","slug":"querying-data-on-hedera-sdk-vs-mirror-node-rest-api","status":"publish","type":"post","link":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/","title":{"rendered":"Querying Data on Hedera: SDK vs Mirror Node REST API"},"content":{"rendered":"<div class=\"body-text BodyCopy mb-40 style-1\">\n<p dir=\"ltr\">When you are building applications on Hedera, a key action you will need to do is <strong>querying entity data<\/strong>, such as account balances or transaction history.<\/p>\n<p dir=\"ltr\">Developers have two main ways to query network data:<\/p>\n<ol>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Using the <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/sdks#consensus-node-code-sdks\" target=\"_blank\">Hiero SDKs<\/a>, which interact with the consensus nodes<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>[Recommended]<\/strong> Using the <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/rest-api\" target=\"_blank\">Mirror Node REST API<\/a>, which provides read access to historical and current data<\/p>\n<\/li>\n<\/ol>\n<p dir=\"ltr\">Both options work, but they serve different purposes. Let\u2019s look at how each works and why the <strong>Mirror Node REST API is the preferred method for production applications<\/strong>.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Option 1: Querying Data with the Hiero SDK<\/h4>\n<p dir=\"ltr\">The Hiero SDKs provide direct access to Hedera\u2019s consensus nodes. You can use queries such as AccountBalanceQuery or AccountInfoQuery to check balances or retrieve account details.<\/p>\n<p dir=\"ltr\">Here is an example in JavaScript:<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">import { Client, AccountBalanceQuery } from \"@hiero-ledger\/sdk\";\n\nconst client = Client.forTestnet().setOperator(process.env.MY_ACCOUNT_ID, process.env.MY_PRIVATE_KEY);\n\nconst balance = await new AccountBalanceQuery()\n  .setAccountId(\"0.0.800\")\n  .execute(client);\n\nconsole.log(`Account balance: ${balance.hbars.toString()}`);\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p dir=\"ltr\">This type of query goes directly to a consensus node, which processes and returns the latest balance available from that node\u2019s state.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Why SDK queries are not ideal<\/h4>\n<ul>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Performance impact:<\/strong> Consensus nodes are optimized to validate and process transactions, not to handle large volumes of read requests.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Consensus Assurance<\/strong>: SDK queries return data from a single consensus node\u2019s local state and are not validated by network-wide consensus.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Deprecations:<\/strong><a href=\"https:\/\/hedera.com\/blog\/token-information-returned-by-getaccountinfo-and-getaccountbalance-to-be-deprecated\" target=\"_blank\"> Token balance queries through consensus nodes were deprecated<\/a> with<a href=\"https:\/\/hips.hedera.com\/hip\/hip-367\" target=\"_blank\"> HIP-367<\/a>, and future SDK updates may <em>limit<\/em> or remove some balance query functions.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Complexity and Cost:<\/strong> You need to sign and configure your client properly for each network environment. Also, while some SDK queries are currently free, these are subject to change in the future. <\/p>\n<\/li>\n<\/ul>\n<p dir=\"ltr\">For these reasons, developers should begin transitioning to the <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/rest-api\" target=\"_blank\">Mirror Node REST API<\/a> for all read operations.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Option 2: Querying Data with the Mirror Node REST API (Recommended)<\/h4>\n<p dir=\"ltr\">The <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/rest-api\" target=\"_blank\">Mirror Node REST API<\/a> is the recommended and future-proof method for querying data on Hedera. Mirror nodes store and serve network data, including balances, transactions, tokens, topics, and more. These queries source data that has been finalized, signed, and verified across a majority of consensus nodes, providing strong assurances of accuracy and immutability.<\/p>\n<p dir=\"ltr\">Unlike consensus nodes, mirror nodes are optimized for reading and indexing data. They provide an efficient, low-cost way to perform queries, are easy to integrate with, and scale well for production applications.<\/p>\n<p dir=\"ltr\">While <a href=\"https:\/\/docs.hedera.com\/hedera\/core-concepts\/mirror-nodes\/hedera-mirror-node\" target=\"_blank\">Hedera offers a free, Hedera-hosted mirror node<\/a> suitable for development and testing, <strong>production applications should use <\/strong><a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/rest-api#community-providers\" target=\"_blank\"><strong>commercial mirror node providers<\/strong><\/a><strong> such as Arkhia, Hgraph, LinkPool or Validation Cloud<\/strong>, which offer paid plans with a large number of queries included, dedicated infrastructure, high throughput, and service-level guarantees.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\"><strong>Querying an Account Balance from the Mirror Node API<\/strong><\/h4>\n<p dir=\"ltr\">Mirror node queries are simple HTTP requests, which makes them easy to use from any language or environment. Below are a few examples:<\/p>\n<h4 class=\"color-ultraviolet\">Example 1: JavaScript with fetch<\/h4>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">const accountId = \"0.0.800\";\nconst url = `https:\/\/testnet.mirrornode.hedera.com\/api\/v1\/balances?account.id=${accountId}`;\n\nconst response = await fetch(url);\nconst data = await response.json();\n\nconsole.log(\"Account balance:\", data.balances[0].balance, \"tinybars\");\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Example 2: curl<\/h4>\n<p dir=\"ltr\">Enter the following command in your terminal:<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">curl \"https:\/\/testnet.mirrornode.hedera.com\/api\/v1\/balances?account.id=0.0.800\"\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Example 3: Browser<\/h4>\n<p dir=\"ltr\">Open this URL directly in your browser. You will see a JSON response that includes the account ID, the HBAR balance (in tinybars), and any token balances if they exist.<\/p>\n<\/div>\n<div class=\"hedera-code-window\" style=\"background-image:url('https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg');padding:24px;border-radius:8px;margin:24px 0;\">\n<p>  <!-- Hidden image so WP All Import downloads this background image into Media Library --><br \/>\n  <img decoding=\"async\" src=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/CodeSnippetBackground-scaled.jpg\" alt=\"code window background\" style=\"display:none;\" \/><\/p>\n<div class=\"code-window-header\">\n<div class=\"code-window-title\"><\/div>\n<div class=\"code-window-body\"><\/div>\n<\/p><\/div>\n<pre><code class=\"language-javascript\">https:\/\/testnet.mirrornode.hedera.com\/api\/v1\/balances?account.id=0.0.800\n<\/code><\/pre>\n<\/div>\n<div class=\"body-text BodyCopy mb-40 style-1\">\n<p dir=\"ltr\">For more examples with other endpoints and additional query parameters, check out <a href=\"https:\/\/hedera.com\/blog\/how-to-look-up-transaction-history-on-hedera-using-mirror-nodes-back-to-the-basics\" target=\"_blank\">this article on How to Look Up Transaction History on Hedera Using Mirror Nodes<\/a>.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Understanding Mirror Node Balance Timing<\/h4>\n<p dir=\"ltr\">Mirror nodes receive <strong>balance files<\/strong> from the Hedera network periodically. These files contain snapshots of all account balances at a specific timestamp. When you query a mirror node, the result represents the most recent snapshot available.<\/p>\n<p dir=\"ltr\">If a transaction has just completed, there may be a small delay before that balance appears in the mirror node data. This delay depends on network conditions but is typically short enough for most application needs.<\/p>\n<p dir=\"ltr\">If your application requires real-time confirmation of a balance change (for example, right after a transaction submission), you can still use an SDK query as a temporary fallback. However, for the majority of use cases, relying on the mirror node is more efficient and scalable.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">How to Prepare Your Code for the Future<\/h4>\n<p dir=\"ltr\">To make your applications future-proof:<\/p>\n<ol>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Abstract balance queries:<\/strong> Write your code so that your balance-fetching logic is separate from business logic. This allows you to switch easily between SDK and REST API methods.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Start migrating:<\/strong> Begin using the Mirror Node REST API in testing and production environments.<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\"><strong>Avoid assumptions:<\/strong> Remember that mirror node balances represent snapshots. Always confirm timing expectations when displaying balances in UI or reports.<\/p>\n<\/li>\n<li dir=\"ltr\"><strong>Test across networks:<\/strong> Use<a href=\"https:\/\/testnet.mirrornode.hedera.com\" target=\"_blank\"> https:\/\/testnet.mirrornode.hedera.com<\/a> during development, and switch to<a href=\"https:\/\/mainnet.mirrornode.hedera.com\" target=\"_blank\"> https:\/\/mainnet.mirrornode.hedera.com<\/a> for production.\n<ol>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Remember that the free, Hedera-hosted mirror node is intended to support testing and development. Use a <a href=\"https:\/\/docs.hedera.com\/hedera\/sdks-and-apis\/rest-api#community-providers\" target=\"_blank\">commercial mirror node provider<\/a> once you deploy your application in production.<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Try It Yourself: Developer Playground<\/h4>\n<p dir=\"ltr\">The   <a href=\"https:\/\/hubs.ly\/Q03WmLPC0\" target=\"_blank\">Hedera Developer Playground<\/a>   gives you a simple, interactive way to experiment with Mirror Node queries. <\/p>\n<p dir=\"ltr\">Try the example above   and see how you can create a new Hedera account, create a new fungible token managed by that new account, and then query the account balances with the Mirror Node REST API.<\/p>\n<p dir=\"ltr\">It is a great way to get familiar with the REST API and see how responses look in real time.<\/p>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\">Summary<\/h4>\n<table>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\"><strong>Approach<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>Where it Queries<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>Use Case<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\"><strong>Notes<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\"><strong>SDK Queries<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Consensus Node<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Simple development checks or direct validation<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">May be deprecated for balances and tokens<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p dir=\"ltr\"><strong>Mirror Node REST API<\/strong><\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Mirror Node<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Production applications, analytics, explorers<\/p>\n<\/td>\n<td>\n<p dir=\"ltr\">Scalable and stores historical data<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 class=\"color-ultraviolet\" dir=\"ltr\"><strong>Key Takeaways for Devs<\/strong><\/h4>\n<ul>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Use the Mirror Node REST API for querying balances and data<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Balances reflect snapshot timing, which provides the perfect level of freshness for applications like wallets, explorers, analytics, and more<\/p>\n<\/li>\n<li dir=\"ltr\">\n<p dir=\"ltr\">Migrate away from SDK-based balance queries to avoid disruptions with any future SDK changes<\/p>\n<\/li>\n<\/ul>\n<p>Use the <a href=\"https:\/\/hubs.ly\/Q03WmLPC0\">Developer Playground to try Mirror Node queries today<\/a>!<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When building applications on Hedera, a key action you will need to perform is querying entity data, such as account balances or transaction history. This article outlines the available options for querying network data and highlights why the Mirror Node REST API is the recommended method for production applications.<\/p>\n","protected":false},"author":10,"featured_media":16595,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[1],"tags":[45],"ppma_author":[43],"class_list":["post-15527","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-technical"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Querying Data on Hedera: SDK vs Mirror Node REST API | Hedera<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Querying Data on Hedera: SDK vs Mirror Node REST API | Hedera\" \/>\n<meta property=\"og:description\" content=\"When building applications on Hedera, a key action you will need to perform is querying entity data, such as account balances or transaction history. This article outlines the available options for querying network data and highlights why the Mirror Node REST API is the recommended method for production applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Hedera\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-01T17:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-08T17:53:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Hedera Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\"},\"author\":{\"name\":\"Hedera Team\",\"@id\":\"https:\/\/hedera.com\/#\/schema\/person\/2dc6146f9f20a44d3de58c834d52e9f4\"},\"headline\":\"Querying Data on Hedera: SDK vs Mirror Node REST API\",\"datePublished\":\"2025-12-01T17:00:00+00:00\",\"dateModified\":\"2025-12-08T17:53:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\"},\"wordCount\":947,\"publisher\":{\"@id\":\"https:\/\/hedera.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png\",\"keywords\":[\"technical\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\",\"url\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\",\"name\":\"Querying Data on Hedera: SDK vs Mirror Node REST API | Hedera\",\"isPartOf\":{\"@id\":\"https:\/\/hedera.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png\",\"datePublished\":\"2025-12-01T17:00:00+00:00\",\"dateModified\":\"2025-12-08T17:53:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage\",\"url\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png\",\"contentUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png\",\"width\":1200,\"height\":628},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hedera.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Querying Data on Hedera: SDK vs Mirror Node REST API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hedera.com\/#website\",\"url\":\"https:\/\/hedera.com\/\",\"name\":\"Hedera\",\"description\":\"Hello future\",\"publisher\":{\"@id\":\"https:\/\/hedera.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hedera.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hedera.com\/#organization\",\"name\":\"Hedera\",\"url\":\"https:\/\/hedera.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hedera.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png\",\"contentUrl\":\"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png\",\"width\":500,\"height\":375,\"caption\":\"Hedera\"},\"image\":{\"@id\":\"https:\/\/hedera.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Querying Data on Hedera: SDK vs Mirror Node REST API | Hedera","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/","og_locale":"en_US","og_type":"article","og_title":"Querying Data on Hedera: SDK vs Mirror Node REST API | Hedera","og_description":"When building applications on Hedera, a key action you will need to perform is querying entity data, such as account balances or transaction history. This article outlines the available options for querying network data and highlights why the Mirror Node REST API is the recommended method for production applications.","og_url":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/","og_site_name":"Hedera","article_published_time":"2025-12-01T17:00:00+00:00","article_modified_time":"2025-12-08T17:53:16+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png","type":"image\/png"}],"author":"Hedera Team","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#article","isPartOf":{"@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/"},"author":{"name":"Hedera Team","@id":"https:\/\/hedera.com\/#\/schema\/person\/2dc6146f9f20a44d3de58c834d52e9f4"},"headline":"Querying Data on Hedera: SDK vs Mirror Node REST API","datePublished":"2025-12-01T17:00:00+00:00","dateModified":"2025-12-08T17:53:16+00:00","mainEntityOfPage":{"@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/"},"wordCount":947,"publisher":{"@id":"https:\/\/hedera.com\/#organization"},"image":{"@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage"},"thumbnailUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png","keywords":["technical"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/","url":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/","name":"Querying Data on Hedera: SDK vs Mirror Node REST API | Hedera","isPartOf":{"@id":"https:\/\/hedera.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage"},"image":{"@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage"},"thumbnailUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png","datePublished":"2025-12-01T17:00:00+00:00","dateModified":"2025-12-08T17:53:16+00:00","breadcrumb":{"@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#primaryimage","url":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png","contentUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner.png","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/hedera.com\/blog\/querying-data-on-hedera-sdk-vs-mirror-node-rest-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hedera.com\/"},{"@type":"ListItem","position":2,"name":"Querying Data on Hedera: SDK vs Mirror Node REST API"}]},{"@type":"WebSite","@id":"https:\/\/hedera.com\/#website","url":"https:\/\/hedera.com\/","name":"Hedera","description":"Hello future","publisher":{"@id":"https:\/\/hedera.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hedera.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hedera.com\/#organization","name":"Hedera","url":"https:\/\/hedera.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hedera.com\/#\/schema\/logo\/image\/","url":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png","contentUrl":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/09\/hedera_logo.png","width":500,"height":375,"caption":"Hedera"},"image":{"@id":"https:\/\/hedera.com\/#\/schema\/logo\/image\/"}}]}},"featured_image_src":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner-600x400.png","featured_image_src_square":"https:\/\/hedera.com\/wp-content\/uploads\/2025\/12\/Querying-Data-Blog-Hedera-Banner-600x600.png","author_info":{"display_name":"Hedera Team","author_link":"https:\/\/hedera.com\/blog\/author\/hedera-team\/"},"authors":[{"term_id":43,"user_id":10,"is_guest":0,"slug":"hedera-team","display_name":"Hedera Team","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/7ed01931dc9498365746508c4ca49ed0507ef65e04e0b82ffe88c50ef9242b1d?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":""}],"_links":{"self":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/posts\/15527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/comments?post=15527"}],"version-history":[{"count":0,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/posts\/15527\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/media\/16595"}],"wp:attachment":[{"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/media?parent=15527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/categories?post=15527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/tags?post=15527"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/hedera.com\/wp-json\/wp\/v2\/ppma_author?post=15527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}