user7012: I'm wanting to display the NFT count of a wallet on my website. I've gone through the blockfrost SDK and I don't see anything that relates to NFTs. Is there a method to return this value?
Here is my code which currently returns the ADA amount:


        const Http = new XMLHttpRequest();        
        const url = 'https://cardano-mainnet.blockfrost.io/api/v0/accounts/stake1u9r0sh6hl6csxt90k5ueh5pl404r6qs995kjnzmp8u3mr2csgg2q8';
        Http.open("GET", url);
        Http.setRequestHeader('project_id', 'mainnetxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
        Http.send();
        Http.onreadystatechange = (e) => {
            if (e.currentTarget.readyState == 4 && e.currentTarget.status == 200 && e.currentTarget.responseText != '') {
                var stake = (parseFloat(JSON.parse(Http.responseText).controlled_amount) / 1000000);
                console.log(stake)
            }
        }

Thanks for any help!

user4627: You'll probably need two steps for this.
First, fetch all assets at the stake address using this endpoint:
https://cardano-mainnet.blockfrost.io/api/v0/accounts/{stake_address}/addresses/assets
(documented here: https://docs.blockfrost.io/#tag/Cardano-Accounts/paths/~1accounts~1{stake_address}~1addresses~1assets/get)
Then filter all but those with a quantity of "1" (technically all tokens are identical, but NFTs should only exist with a quantity of "1").
Just counting these could already be enough for a rough counter on a website.
But the next step would be to check that only one of each of those token is in existance and the metadata suggests it is actually an NFT.
So you can look up each of those assets using this endpoint:
https://cardano-mainnet.blockfrost.io/api/v0/assets/{asset}
(documented here: https://docs.blockfrost.io/#tag/Cardano-Assets/paths/~1assets~1{asset}/get)
If this lookup also shows a quantity of "1" exists and the "onchain_metadata" is populated (with fields from this NFT metadata standard https://cips.cardano.org/cips/cip25/) you could assume it's an NFT, and then just count them up.

7012: <p>I'm wanting to display the NFT count of a wallet on my website. I've gone through the blockfrost SDK and I don't see anything that relates to NFTs. Is there a method to return this value?</p>
<p>Here is my code which currently returns the ADA amount:</p>
<blockquote>

</blockquote>
<pre><code>        const Http = new XMLHttpRequest();        
        const url = 'https://cardano-mainnet.blockfrost.io/api/v0/accounts/stake1u9r0sh6hl6csxt90k5ueh5pl404r6qs995kjnzmp8u3mr2csgg2q8';
        Http.open(&quot;GET&quot;, url);
        Http.setRequestHeader('project_id', 'mainnetxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
        Http.send();
        Http.onreadystatechange = (e) =&gt; {
            if (e.currentTarget.readyState == 4 &amp;&amp; e.currentTarget.status == 200 &amp;&amp; e.currentTarget.responseText != '') {
                var stake = (parseFloat(JSON.parse(Http.responseText).controlled_amount) / 1000000);
                console.log(stake)
            }
        }
</code></pre>
<p>Thanks for any help!</p>
 4627: <p>You'll probably need two steps for this.</p>
<p>First, fetch all assets at the stake address using this endpoint:</p>
<p><a href="https://cardano-mainnet.blockfrost.io/api/v0/accounts/%7Bstake_address%7D/addresses/assets" rel="nofollow noreferrer">https://cardano-mainnet.blockfrost.io/api/v0/accounts/{stake_address}/addresses/assets</a></p>
<p><em>(documented here: <a href="https://docs.blockfrost.io/#tag/Cardano-Accounts/paths/%7E1accounts%7E1%7Bstake_address%7D%7E1addresses%7E1assets/get" rel="nofollow noreferrer">https://docs.blockfrost.io/#tag/Cardano-Accounts/paths/~1accounts~1{stake_address}~1addresses~1assets/get</a>)</em></p>
<p>Then filter all but those with a quantity of &quot;1&quot; <em>(technically all tokens are identical, but NFTs should only exist with a quantity of &quot;1&quot;)</em>.</p>
<p>Just counting these could already be enough for a rough counter on a website.</p>
<p>But the next step would be to check that only one of each of those token is in existance and the metadata suggests it is actually an NFT.</p>
<p>So you can look up each of those assets using this endpoint:</p>
<p><a href="https://cardano-mainnet.blockfrost.io/api/v0/assets/%7Basset%7D" rel="nofollow noreferrer">https://cardano-mainnet.blockfrost.io/api/v0/assets/{asset}</a></p>
<p><em>(documented here: <a href="https://docs.blockfrost.io/#tag/Cardano-Assets/paths/%7E1assets%7E1%7Basset%7D/get" rel="nofollow noreferrer">https://docs.blockfrost.io/#tag/Cardano-Assets/paths/~1assets~1{asset}/get</a>)</em></p>
<p>If this lookup also shows a quantity of &quot;1&quot; exists and the &quot;onchain_metadata&quot; is populated <em>(with fields from this NFT metadata standard <a href="https://cips.cardano.org/cips/cip25/" rel="nofollow noreferrer">https://cips.cardano.org/cips/cip25/</a>)</em> you could assume it's an NFT, and then just count them up.</p>
