> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hedera.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get NFT info

A query that returns information about a non-fungible token (NFT). You request the info for an NFT by specifying the NFT ID.

**Token Allowances**

Only when a spender is set on an explicit NFT ID of a token, we return the spender ID in the `TokenNftInfoQuery` for the respective NFT. If `approveTokenNftAllowanceAllSerials` is used to approve all NFTs for a given token class and no NFT ID is specified, we will not return a spender ID for all the serial numbers of that token.

<Note>
  #### **Recommend Using Mirror Node REST API**

  For obtaining NFT information and historical data, consider using the Mirror Node REST API endpoint [**Get NFT Info**](https://docs.hedera.com/api-reference/tokens/get-nft-info) which offers several advantages:

  * **Cost-effective and scalable:** [Mirror node providers](/operators/mirror-node#mainnet) offer paid plans with a large number of queries included. The Hedera-hosted mirror node offers free queries with specific throttles for testing. While some SDK queries are currently free, these are subject to change in the future.
  * **Performance:** Mirror nodes don't burden consensus nodes, allowing them to focus on processing transactions and providing efficient access to historical data without impacting network performance.
  * **Historical data:** Mirror nodes store complete transaction history, records, and events - ideal for analytics, auditing, and monitoring past activity.

  📚 ***For more details, please read our [blog post on querying data](https://hedera.com/blog/querying-data-on-hedera-sdk-vs-mirror-node-rest-api).***
</Note>

**Query Fees**

* Please see the transaction and query [fees](/networks/fees#transaction-and-query-fees) table for base transaction fee
* Please use the [Hedera fee estimator](https://hedera.com/fees) to estimate your query fee cost

<Warning>
  Requesting NFT info by Token ID or Account ID is deprecated.
</Warning>

The request returns the following information:

<table><thead><tr><th>Item</th><th>Description</th></tr></thead><tbody><tr><td><strong>NFT ID</strong></td><td>The unique ID of a non-fungible token composed of the token ID and serial number in the format: <code>\<shardNum>.\<realmNum>.\<tokenNum>/\<serialNum></code> (e.g., <code>0.0.1234/1</code>).</td></tr><tr><td><strong>Account ID</strong></td><td>The account ID of the current owner of the NFT</td></tr><tr><td><strong>Creation Time</strong></td><td>The effective consensus timestamp at which the NFT was minted</td></tr><tr><td><strong>Metadata</strong></td><td>Represents the unique metadata of the NFT</td></tr><tr><td><strong>Ledger ID</strong></td><td>The ID of the network (mainnet, testnet, previewnet). Reference <a href="https://hips.hedera.com/hip/hip-198">HIP-198</a>.</td></tr><tr><td><strong>Spender ID</strong></td><td>The spender account ID for the NFT. This is only returned if the NFT ID was specifically approved.</td></tr></tbody></table>

### Methods

<table><thead><tr><th>Method</th><th>Type</th><th>Description</th><th>Requirement</th></tr></thead><tbody><tr><td><code>setNftId(\<nftId>)</code></td><td><a href="/native/tokens/nft-id">NftId</a></td><td>Applicable only to tokens of type <code>NON\_FUNGIBLE\_UNIQUE</code>. Gets info on a NFT for a given TokenID (of type <code>NON\_FUNGIBLE\_UNIQUE</code>) and serial number.</td><td>Optional</td></tr></tbody></table>

<CodeGroup>
  ```java Java theme={null}
  //Returns the info for the specified NFT ID
  List<TokenNftInfo> nftInfos = new TokenNftInfoQuery()
       .setNftId(nftId)
       .execute(client);

  //v2.0.14
  ```

  ```javascript JavaScript theme={null}
  //Returns the info for the specified NFT ID
  const nftInfos = await new TokenNftInfoQuery()
       .setNftId(nftId)
       .execute(client);

  //v2.0.28
  ```

  ```go Go theme={null}
  //Returns the info for the specified NFT ID
  nftInfo, err := NewTokenNftInfoQuery().
     SetNftID(nftID).
  	 Execute(client)

  //v2.1.16
  ```

  ```rust Rust theme={null}
  // Returns the info for the specified NFT ID
  let nft_infos = TokenNftInfoQuery::new()
      .nft_id(nft_id)
      .execute(&client).await?;

  // v0.34.0
  ```
</CodeGroup>
