> For the complete documentation index, see [llms.txt](https://docs.manifold.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.manifold.xyz/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval.md).

# NFT Information Retrieval

NFT APIs allow you to read NFT metadata and ownership information.  These API's include:

* [getNFT](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/getnft.md)\
  \&#xNAN;*Get NFT metadata (both ERC721 and ERC1155) and current ownership information (for ERC721)*
* [getNFTTsOfOwner](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/getnftsofowner.md)\
  \&#xNAN;*Get NFTs of the current authenticated wallet*
* [ownerHasNFT](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/ownerhasnft.md)\
  \&#xNAN;*Check if the current authenticated wallet owns an NFT*
* [getCollectors](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/getcollectors.md)

  *Get collectors of an NFT*

More APIs will be added in the near future.

## Supported Networks

* Ethereum Mainnet
* Optimism
* Polygon
* Base
* Sepolia
* ~~Goerli~~ (deprecated)
* ~~Rinkeby~~ (deprecated)

## Filtering Data

Most APIs take in an array of filters and attribute filters, in the following format:

````
/**
 * 1. Filter for specific tokens by passing in a tokenId
 * 2. Filter for a set of tokens by passing in an array of tokenIds
 * 3. Filter for a range of tokens by passing in the minTokenId and maxTokenId
 * 4. Filter for a set of token attributes by passing in an array of TokenAttribute
 * You can use either 1, 2 or 3, but not all of them together.
```
 */
interface Filter {
  contractAddress: string;
  tokenId?: string;
  tokenIds?: Array<string>
  minTokenId?: string;
  maxTokenId?: string;
  attributes?: Array<Attribute>;
}

interface Attribute {
  traitType?: string;
  value: string;
}
````

Each filter is treated as an 'or' statement.

### Example: Get BAYC and MAYC NFTs for the user:

```
client.getNFTsOfOwner({
  filters: [
    {
      contractAddress: '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'
    },
    {
      contractAddress: '0x60e4d786628fea6478f785a6d7e704777c86a7c6'
    }
  ]
})
```

### Example: Get Doodles with both 3D Glasses AND a Navy Sweater

```
client.getNFTsOfOwner({
  filters: [
    {
      contractAddress: '0x8a90cab2b38dba80c64b7734e58ee1db38b8992e',
      attributes: [
        {
          traitType: 'body',
          value: 'navy sweater'
        },
        {
          traitType: 'face',
          value: '3d glasses'
        },
      ]
    },
  ]
})
```

### Example: Get Doodles with both 3D Glasses OR a Navy Sweater

```
client.getNFTsOfOwner({
  filters: [
    {
      contractAddress: '0x8a90cab2b38dba80c64b7734e58ee1db38b8992e',
      attributes: [
        {
          traitType: 'face',
          value: '3d glasses'
        },
      ]
    },
    {
      contractAddress: '0x8a90cab2b38dba80c64b7734e58ee1db38b8992e',
      attributes: [
        {
          traitType: 'body',
          value: 'navy sweater'
        }
      ]
    }
  ]
})
```

### Example: Get Mad Dog Jones Thought as a System

```
client.getNFTsOfOwner({
  filters: [
    {
      contractAddress: '0x4ac3d17fd6c2db18ec619fe2d68d2c22b18378ff',
      minTokenId: '11600030001',
      maxTokenId: '11600030050',
    },
  ]
})
```

### Example: Get Collectors of scuderia ferrari by yungwknd// Some code

```
client.getCollectors({
  filters: [
    {
      contractAddress: '0xefE6A6032fd27B7B7615Fb0D0E08FB3E49Db53b8',
      tokenId: '2'
    },
  ]
})
```

{% content-ref url="/pages/V24JE2LODwjb5SrhQTAl" %}
[getNFT](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/getnft.md)
{% endcontent-ref %}

{% content-ref url="/pages/jU2fC8ih5DCtByHQJzGJ" %}
[getNFTsOfOwner](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/getnftsofowner.md)
{% endcontent-ref %}

{% content-ref url="/pages/iP36JOU2V56zeBJq4NkP" %}
[ownerHasNFT](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/ownerhasnft.md)
{% endcontent-ref %}

{% content-ref url="/pages/DlgEfqTfBZQ3SA0N1l3i" %}
[getCollectors](/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval/getcollectors.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.manifold.xyz/manifold-for-developers/resources/widgets/connect-widget/data-client/nft-information-retrieval.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
